Order of nodes in xsl:for-each nodeset (Xalan-J)

Brian J. Sayatovic

Usenet Archive
Joined
Jun 9, 2000
Messages
52
Reaction score
0
I'm using Xalan-J to loop through some nodes with an xsl:for-each element, presumably in document order. As far as I can tell, the XSL speciciation says that a for-each element will loop through the nodeset in document order, meaning the order the elements occur in the document. Does Xalan-J obey this rule?

I'm encountering some oddities that could be explained if Xalan-J does not adhere to this, but it is a very rare circumstance, so its hard to test.

Regards,
Brian.
 

Martin Honnen

Usenet Archive
Joined
Apr 8, 2000
Messages
6,174
Reaction score
0
Brian said:
I'm using Xalan-J to loop through some nodes with an xsl:for-each element, presumably in document order. As far as I can tell, the XSL speciciation says that a for-each element will loop through the nodeset in document order, meaning the order the elements occur in the document. Does Xalan-J obey this rule?

I'm encountering some oddities that could be explained if Xalan-J does not adhere to this, but it is a very rare circumstance, so its hard to test.

The XSLT 1.0 specification says about xsl:for-each:

The nodes are processed in document order, unless a sorting specification is present.

I don't know whether Xalan-J has some bug, that might depend on the version of it. Do you get different results for the same XML document and XSL document when you try another XSLT processor?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
548,042
Messages
3,104,223
Members
248,131
Latest member
Tonypshaw1

Latest Threads

Top