Subject: Re: [xsl] Can sets have order? From: Mike Moran <Mike.Moran@xxxxxxxxxxx> Date: Thu, 25 Jan 2001 18:23:13 +0000 |
Michael Kay wrote: > > > Isn't it a bit confusing to say that it returns it in reverse document > > order? My understanding is that ancestor:: is ordered most immediate > > first i.e direct parent, then parent of parent and so on, all > > the way up to the root. > > An axis identifies an (ordered) list of nodes. The predicate associated with > the axis is applied to the ordered list. The result of an XPath expression, > however, is always a node-set, not a list. The node-set is unordered, but > the nodes have an ordering, called document order. Many operations on > node-sets process the nodes in document order. Is that clear now? Well, no. Two sections confuse me: 1: "An axis identifies an (ordered) list of nodes. The predicate associated with the axis is applied to the ordered list." I would have thought that the following would make more sense, because it seems wierd to throw away an ordering that is never seen: "An axis identifies an (ordered) list of nodes. The predicate associated with the axis is applied to the *unordered set*." Perhaps it is the case that the ordered list mentioned is the path from the root to the current node which is re-ordered to run from child to ancestors, rather than from parent to children? 2: "The node-set is unordered, but the nodes have an ordering, called document order." It is confusing to say that node-sets are unordered, whilst nodes are. Is this ordering intrinsic to a node? It makes more sense to think of ordering as associated with collections and not instances (i.e. members of the collection). This seems more sensible, regardless of how it may be implemented (eg a "next" pointer or suchlike). -- Mike.Moran@xxxxxxxxxxx Web: http://houseofmoran.com/ AvantGo: http://houseofmoran.com/Lite/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Can sets have order?, Michael Kay | Thread | RE: [xsl] Can sets have order?, Michael Kay |
Re: [xsl] xsl sort, Goetz Bock | Date | Re: [xsl] Can sets have order?, David Carlisle |
Month |