[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: xsl:sort descending causes attribute nodes to be
> The following issue is easy to workaround, but I am wondering if this is > correct behavior after the XSLT 2 (or even 1) recommendation. yes that's the expected behaviour (although of course it's nothing really to do with the xsl:sort, a more direct case is <x> hello <xsl:attribute name="x"/> In 1.0 it's a recoverable error (with the alternative of ignoring the attribute) section 7.1.3 Adding an attribute to an element after children have been added to it; implementations may either signal the error or ignore the attribute. in 2.0 it's a hard error, section 5.7.1 [ERR XTDE0410] It is a non-recoverable dynamic error if the result sequence used to construct the content of an element node contains a namespace node or attribute node that is preceded in the sequence by a node that is neither a namespace node nor an attribute node. > Any thoughts on this? Is this behavior desired and/or required, or is > this the processor's mistake? It's required to allow an implemenation to start serialising the result tree before processing is finished. If you were allowed to generate an entire document then generate a version="2" attribute as the last node before closing teh document element, the processor would always haveto buffer the entire result tree in memory just in case the system did this. 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
|