[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Can sets have order?

Subject: Re: Can sets have order?
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 25 Jan 2001 17:47:37 GMT
Re:  Can sets have order?
Just noticed you said:


> > It just constructs the set of ancestors.

> In a particular order, right?  Do you claim that it can return a node set in 
> any order besides reverse document order?


YES!!! If you want to claim that it returns a node set that is ordered,
it is ordered in document order.

<xsl:variable name="x" select="attribute::*"/>

OK so $x is a node set. If it is ordered, then presumably

<xsl:copy-of select="$x[1]"/>

is it's first element, no?

well it gets the outer most element, the relevant order being document
order not reverse document order.

If $x was an odered set ordered by reverse document order, then 

<xsl:copy-of select="$x[1]"/>

would be the same as

<xsl:copy-of select="ancestor::*[1]"/>

and select the parent.

It is in explaining why 

<xsl:copy-of select="$x[1]"/>
isn't the same as
<xsl:copy-of select="ancestor::*[1]"/>

that it is helpful to stress that the node set $x is just a set, that it
doesn't "remember" that it was constructed in reverse order. In other
words the ordering isn't a property of the set $x.

David

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.