Subject: Re: [xsl] Re: Re: limiting preceding axis by ancestor From: Joerg Heinicke <joerg.heinicke@xxxxxx> Date: Thu, 09 May 2002 02:02:00 +0200 |
Joerg Heinicke <joerg dot heinicke at gmx dot de> wrote:
The [1] is implicit and not needed, because generate-id() on a nodeset returns the id of the first element in this nodeset. I wrote it for maybe better understanding.
<xsl:if test=". = preceding::bar[generate-id(ancestor::foo[1]) = generate-id(current()/ancestor::foo[1])]">
This is one case where the established belief that
generate-id(someXPathExpression) = generate-id(someXPathExpression[1])
is *not* true.
This is clearly not so, because "ancestor" is a reverse axis.
generate-id(ancestor::foo[1])
will be applied on the nearest ancesstor (the last in document order)
while
generate-id(ancestor::foo)
will be applied on the outermost ancestor (the first in document order).
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Re: Re: limiting preceding ax, Dimitre Novatchev | Thread | RE: [xsl] Re: Re: limiting precedin, Michael Kay |
Re: [xsl] Pass key from one XSL to , Joerg Heinicke | Date | Re: [xsl] Pass key from one XSL to , Xiaocun Xu |
Month |