adding a namespace declaration to result stylesheet?

"DuCharme, Bob (LNG-CHO)" <[email protected]> Thu, 11 Sep 2003 13:31:49 -0400
Newsgroups gmane.text.xml.schematron
Message-ID <FEF4858E8AB32D4EAC2CF2A7D85386EBE52BA3@lnxdayexch06.lexis-nexis.com>
I've been fooling with the creation of Schematron rules to check datatypes
by using Saxon 7, which supports much of recent XSLT Working Drafts of XSLT
2.0, as the XSLT processor. For example:

    <rule context="quantity">
      <assert test="string(.) castable as xs:integer">
        All quantity values should be integers.
      </assert>
    </rule>

My problem is that xs: namespace prefix. Even if I include
xmlns:xs="http://www.w3.org/2001/XMLSchema" as an attribute of the root,
there are no elements or attributes in the document from that namespace, so
the XSLT processor that creates an XSLT stylesheet from this rules file
doesn't include the namespace declaration for xs, so Saxon 7 chokes on the
"castable" expression above because it didn't see a proper namespace
declaration for it in the generated stylesheet. Any suggestions?

thanks,

Bob DuCharme            www.snee.com/bob         <bob@  
snee.com>  see http://www.snee.com/bob/xsltquickly for
info on book "XSLT Quickly" from Manning Publications.


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf