This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Hierarchy problem
- From: "Michael Kay" <michael dot h dot kay at ntlworld dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Sat, 20 Jul 2002 16:35:26 +0100
- Subject: RE: [xsl] Hierarchy problem
- Reply-to: xsl-list at lists dot mulberrytech dot com
> Does this do what you want - it checks if the node in $point2
> is the parent of the node in $point1 (I think):
>
> <xsl:when test="$point1/.. = $point2">
No, it tests whether they have the same string-value.
Consider
<a>123</a><b><c>12</c><d>3</d></b>
then your condition would be true for nodes <c> and <a>.
To do comparisons on identity rather than content, use generate-id().
(or in XPath 2.0, the "is" operator).
Michael Kay
Software AG
home: Michael.H.Kay@ntlworld.com
work: Michael.Kay@softwareag.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list