Re: [xsl] limiting preceding axis by ancestor

Subject: Re: [xsl] limiting preceding axis by ancestor
From: Joerg Heinicke <joerg.heinicke@xxxxxx>
Date: Wed, 08 May 2002 02:05:15 +0200
Hi Michael,

I would use the same approach as Joerg Pietschmann, but it has a little bug: The first generate-id() must be done on the ancestor::foo too.

Try preceding::bar[generate-id()=generate-id(current()/ancestor::foo)]

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])]">



XSL-List info and archive:

Current Thread