[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: General rule for designing XPath expressions to r
On 8 Jan 2014, at 11:41, Costello, Roger L. <costello@xxxxxxxxx> wrote: > David Carlisle wrote: > > Path expressions constructed with / always > returns nodes in document order. > > Section 19.1 of the XSLT 3.0 specification says: > > ... evaluation of the path expression //section/head will not always deliver nodes in document order; this can be seen by examining the source document below, where a child of the first section appears in document order after a child of the second section: > You're quoting selectively. It actually says: "The reason for this is that a naive nested loop evaluation of the path expression //section/head will not always deliver nodes in document order" and then: "An implementation that literally followed the semantics of path expressions as defined in [XPath 3.0] would therefore require to sort the nodes into document order" In other words, a nested loop evaluation will not deliver the correct results (i.e. the sequence nodes in document order) unless it is followed by a sort, and the sort would prevent streaming. Michael Kay Saxonica
|
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
|