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

Re: the nearest ancestor with the attribute

Subject: Re: the nearest ancestor with the attribute
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 18 Jan 2001 11:22:42 GMT
Re:  the nearest ancestor with the attribute

> Is that the generality then Mike, given a 'confusing' mix
> of axis, it comes back unordered,

No it's simpler than that. it _always_ comes back as a set.
(and sets are by definition unordered).
select="ancestor::*"
produces the _set_ of ancestors, it isn't ordered at all.
<xsl:variable name="x" select="ancestor::*"/>
puts that variable in a set.
<xsl:variable name="x" select="$x[1]"/>
the operation of applying the predicate [1] (ie [position()=1]takes the
first node in document order. But that is a feature of the operation not
of the node set $x.

Note this is not the same as applying a predicate within a step, which
is the only place the axis order has any effect

<xsl:variable name="y" select="ancestor::*[1]"/>

selects the parent, unlike the $x[1] which selects the document element
(ie the outer most ancestor)


> operations on an unordered set

"unordered set" is a tautology. "set" _means_ unordered collection.

David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet delivered
through the MessageLabs Virus Control Centre. For further information visit
http://www.star.net.uk/stats.asp

 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.