Re: [xsl] General rule for designing XPath expressions to return items in document order?

Subject: Re: [xsl] General rule for designing XPath expressions to return items in document order?
From: "Costello, Roger L." <costello@xxxxxxxxx>
Date: Wed, 8 Jan 2014 11:41:36 +0000
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:

<section>
  <section>
     <head/>
  </section>
  <head/>
</section>

I'm confused. David says one thing, the spec says the opposite. Who's right?

/Roger

Current Thread