Subject: Re: [xsl] the nearest ancestor with the attribute From: David Carlisle <davidc@xxxxxxxxx> Date: Thu, 18 Jan 2001 11:22:42 GMT |
> 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] the nearest ancestor with, DPawson | Thread | Re: [xsl] the nearest ancestor with, Uche Ogbuji |
Re: [xsl] Get XPath to Node from No, Sachidanandam E.K | Date | [xsl] Checking for unique mail adre, Heiner de Wendt |
Month |