W3C home > Mailing lists > Public > www-ql@w3.org > July to September 2003

RE: creation order vs. document order

From: Michael Rys <mrys@microsoft.com>
Date: Tue, 23 Sep 2003 14:54:24 -0700
Message-ID: <EB0A327048144442AFB15FCE18DC96C7D0A9F0@RED-MSG-31.redmond.corp.microsoft.com>
To: "Jan Hidders" <jan.hidders@ua.ac.be>, <www-ql@w3.org>

What Michael points out is that there are two notions of orders for
nodes. 

One is the order of a node within the context of a document. Free
standing nodes do not belong to a node and thus have no real document
order. Since we however have functions such as << that check for
document order, the data model specs says that such nodes have
implementation-dependent but stable document order.

The second kind of order is the sequence order of the result of an
expression. This may or may not be the same as the document order. So if
you say something like:

let $x := (doc("a.xml")/a/b[2], doc("a.xml")/a/b[1])
return $x

then $x[1] precedes $x[2] in the sequence order but follows it in the
document order.

Similarly, if you say

let $y := (<a/>, <b/>)
return $y

then $y[1] precedes $y[2] in the sequence order, but it is
implementation-dependent, how the two elements will fare w.r.t. their
document-order.

HTH
Michael

> -----Original Message-----
> From: www-ql-request@w3.org [mailto:www-ql-request@w3.org] On Behalf
Of
> Jan Hidders
> Sent: Tuesday, September 23, 2003 2:43 PM
> To: www-ql@w3.org
> Subject: Re: creation order vs. document order
> 
> 
> On Tuesday 23 September 2003 21:18, Michael Brundage wrote:
> > ?
> >
> > It is not possible for child nodes to be in anything other than
document
> > order.
> 
> Well, that is what I'm trying to find out. Can you tell me where in
the
> formal
> specification it says that? As Torsten and Bas already pointed out,
> Section
> 3.2 of the data model says:
> >> The relative order of free-standing nodes (elements, attributes,
and
> >> other nodes created outside the context of a particular document)
is
> >> also implementation-dependent but stable.
> 
> Are you saying that if I create an element with a few children and
assign
> it
> to a variable then I have created those children "in the context of a
> particular document"? Or is the bracketed part not the definition of
> "free-standing" and does free-standing mean "without a parent"?
> 
> -- Jan Hidders
> 
Received on Tuesday, 23 September 2003 17:54:28 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:17:16 UTC