Closed Bug 341238 Opened 20 years ago Closed 20 years ago

XSLT: Incorrect (random) order of nodes in a node-set on refreshing a page

Categories

(Core :: XSLT, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 323547

People

(Reporter: ruvim.pinka, Unassigned)

References

()

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4 On refreshing the sample test-module.xml page, the order of strings changes. The correct order is A, B, C. However, you can see that B and C swaps around from time to time. Reproducible: Always Steps to Reproduce: 1. Open http://www.forth.org.ru/~ruvim/test/XSLT-in-browser/test-module.xml 2. F5 ( 2 - 15 times ) Actual Results: text A text C text B Expected Results: text A text B text C This page is processed by the "struct.xls" file where the XInclude specification is partially implemented. This bug happens only in case of using external XML files (it seems that the bug happens when the "document()" function is used). In msxsl or saxon everithing works properly. You can see all the test files here: http://www.forth.org.ru/~ruvim/test/XSLT-in-browser/
I see the same behavior of Firefox 1.5.0.4 on Windows Vista
Assignee: nobody → xslt
Component: General → XSLT
Product: Firefox → Core
QA Contact: general → keith
Version: unspecified → Trunk
This is a dupe of bug 323547. However it is actually not very clear if this is a bug or not. The spec says # There are no constraints on how the implementation orders documents other than # that it must do so consistently: an implementation must always use the same # order for the same set of documents And since a new document object is created every time the page is reloaded it isn't clear if it is the "same set of documents". We always order documents the same order during a single transformation. But, it would be nice to produce a consistent result, no matter what the spec says. *** This bug has been marked as a duplicate of 323547 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
Some cites: "Given a set of components and a set of documents, the language must allow the order of processing to be specified" XML Processing Model Requirements, April 2004, http://www.w3.org/TR/proc-model-req/#d0e111 "The sequence of nodes returned by the function is in document order, with no duplicates. This order has no necessary relationship to the order in which URIs were supplied in the $uri-sequence argument." XSLT Version 2.0, June 2006, http://www.w3.org/TR/xslt20/#document "The relative order of nodes in distinct trees is stable but implementation-dependent, subject to the following constraint: If any node in a given tree, T1, occurs before any node in a different tree, T2, then all nodes in T1 are before all nodes in T2." XQuery 1.0 and XPath 2.0 Data Model (XDM), June 2006, http://www.w3.org/TR/xpath-datamodel/#document-order How can we specify the order of processing a documents ? (In real-life cases.., like my, for example ).
(In reply to comment #3) > http://www.w3.org/TR/proc-model-req/#d0e111 Unrelated to XPath/XSLT. > XSLT Version 2.0, June 2006, http://www.w3.org/TR/xslt20/#document We only do 1.0. > XQuery 1.0 and XPath 2.0 Data Model (XDM), June 2006, > http://www.w3.org/TR/xpath-datamodel/#document-order We only do 1.0.
(In reply to comment #4) > We only do 1.0. Those citation for thoughts and ways how to implement the implementation-dependent parts (within 1.0). Not as require.
You need to log in before you can comment on or make changes to this bug.