|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Referencing namespace prefixes within an XSD Schem
if you were using xslt2 you could directly generate a namespace node
(and so a namespace declaration) with teh new xsl:namespace instruction
that works just like xsl:attribute but makes namespaces instead of
attributes, allowing both the nameand value to be generated dynamically.
In XSLT1 the usual trick is to just use xsl:attribute to put a spurious
attribute in the required namespace. so if you go
<schema>
<xsl:attribute name="tns:wibble" namespace="{$targetNS}"/>
then you get a spurious tns:wibble="" attribute which I think the schema
validator will ignore and a namespace declaration for tns: will get
added automatically. If you need to remove the tns:wibble the you can do
this into a variable and then use xx:node-set extension to extact teh
element and its attributes and namespace nodes, but don't copy the
tns:wibble attribute.
David
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








