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]
Other format: [Raw text]

RE: Hierarchy problem


> 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


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