This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Indexing Tree Elements
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Subject: RE: Indexing Tree Elements
- From: Kay Michael <Michael dot Kay at icl dot com>
- Date: Fri, 7 Jul 2000 16:26:17 +0100
- Reply-To: xsl-list at mulberrytech dot com
> Thanks for your help, Mike. By 'indexing' I just meant
> something like:
>
> if (node[$i] == node[$i-1]) then....
>
You can index into any node-set. Take care with the equality operator ("="),
it compares the string-value of the nodes, not their identity. And the "-"
in the above is a hyphen, not a subtraction operator. So the likely syntax
is something like:
<xsl:if test="$node[$i] = $node[$i -1]">
Mike K
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list