Complex Path Checking

Subject: Complex Path Checking
From: "Heiner de Wendt" <H.dewendt@xxxxxxxxx>
Date: Thu, 3 Aug 2000 10:16:19 +0200
Hello,

I have an XML structure like this:

<root>
 <node1>
  <node2>some content</node2>
 </node1>
 <node1>
  <node2>other content</node2>
 </node1>
.
.
.
</root>

This needs to stay as is. My problem is, I want to check the content 
of the first <node2> (with "some content") before I decide if I 
display the content of the other <node2> (with "other content"). I
need to do this through the whole large document.

Now, I'm not exactly experienced when it comes to XPath. I tried the 
following, but as I already expected ;) , it didn't work.

 <xsl:template match="//node2">

 <xsl:if 
test="contains(ancestor::following-sibling::child::node(),'X')">

<perform some actions with the "other content"-node2>
</perform>

</xsl:if>

</xsl:template>


Pleeeeeease help me, this is all what's keeping me from finishing my 
current small project ;)

Thanks,

Heiner


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread