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
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--