[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Complex Path Checking
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|