|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Adding namespaces to output
Close, but I can think of two problems with this, Kevin,
At 2002-12-23 16:38 +0000, Kevin Jones wrote: Hi Felix, (1) if the user is using W3C standard XSLT 1.0 without extensions, a result tree fragment cannot be supplied to xsl:copy-of except by variable name only. (2) XSLT 1.1 allowed this, but since the order of namespace nodes is arbitrary and possibly different with all processors, and there may be any number of ancestral namespace declarations, the namespace for 'p:' isn't necessarily the first and the following would not be subject to the order: <xsl:copy-of select="$dummy/*/namespace::*[name(.)='p']"/> There may be a minor portability issue here in that a processor is not required to respect your choice of prefix, i.e. the 'p' may be changed to something else, although that is unlikely unless you have used 'p' for something else. I agree the end of 7.1.2 states: "XSLT processors may make use of the prefix of the QName specified in the name attribute when selecting the prefix used for outputting the created element as XML; however, they are not required to do so." But I think it has generally been experienced in real-world use of XSLT 1.0 that the prefix used in the stylesheet has to be used in the result because the processor doesn't know which attributes are QNames which would require the prefix in the attribute value to be modified if not what the user used for instructions. This came to light for some processors in the implementation of xsl:namespace-alias for some stylesheets I was writing in the early days. I hope this helps. ............. Ken p.s. Happy holidays everyone! -- Upcoming hands-on in-depth XSLT/XPath and/or XSL-FO: - North America: Feb 3 - Feb 7,2003 G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) ISBN 0-13-065196-6 Definitive XSLT and XPath ISBN 0-13-140374-5 Definitive XSL-FO ISBN 1-894049-08-X Practical Transformation Using XSLT and XPath ISBN 1-894049-10-1 Practical Formatting Using XSL-FO Next conference training: 2003-03-03,06 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
|

Cart








