[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: re: generation of qnames/prefixes in content and v
> Actually, as far I can tell, it would also prevent the > generation of any XML > application that used qualified names in contexts other than tag or > attribute names. > Actually it *is* possible to safely output a QName as an attribute value, given the statements in the XSLT 1.0 errata about the effect of copying a namespace node. It's pretty obscure territory though, and you may find that not all processors get it right. You can produce a namespace node in the result tree by copying a namespace node either from a source document or the stylesheet. Normally namespace nodes are copied when a source element is copied using <xsl:copy> or when a literal result element in the stylesheet is copied; however one of the errata makes it clear that if there are no conflicts, you can also copy a namespace node using <xsl:copy> or <xsl:copy-of>, which means you can inject a new namespace node into the result by having a secondary source document <dummy xmlns:ppp="some.namespace.uri"/> and doing <xsl:copy-of select="document('dummy.xml')/*/namespace::ppp"/> When a namespace node is present on the result tree, the serializer must output a namespace declaration for it, and it is not allowed to change either the prefix or the URI. This means you can safely use this prefix in the value of a generated attribute. Mike Kay XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|