-
xml ordering question (3 messages)
- Posted by: Jim Hall
- Posted on: September 14 2002 12:11 EDT
If a set of XML elements are in a particular order, and you have XSL looping through them, is XSL guarranteed to output these elements in the same order in which they appear in the XML file?Threaded Messages (3)
- xml ordering question by Lasse Koskela on September 14 2002 15:24 EDT
- xml ordering question by Tony Brookes on September 14 2002 22:50 EDT
- xml ordering question by Gal Binyamini on September 15 2002 14:07 EDT
-
xml ordering question[ Go to top ]
- Posted by: Lasse Koskela
- Posted on: September 14 2002 15:24 EDT
- in response to Jim Hall
I would say yes. Any other implementation of XSL would sound stupid. -
xml ordering question[ Go to top ]
- Posted by: Tony Brookes
- Posted on: September 14 2002 22:50 EDT
- in response to Jim Hall
Yes it will. XML represents data. Order in data is implicitly important. The data items will come out the other side in the order they occur in the XML. XSLT processing would be useless without this fact. :)
Chz
Tony -
xml ordering question[ Go to top ]
- Posted by: Gal Binyamini
- Posted on: September 15 2002 14:07 EDT
- in response to Tony Brookes
Some reasonable heuristic arguments have been made to answer the question, but just for completement here is a normative reference: http://www.w3.org/TR/xslt#for-each:
"... The nodes are processed in document order, unless a sorting specification is present (see [10 Sorting])".
Gal