This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: limiting preceding axis by ancestor
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])]">
Regards,
Joerg
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list