This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Indexing Tree Elements


> 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]