[xsl] XPath problem

Subject: [xsl] XPath problem
From: "Liron" <magilam@xxxxxxxxxxxxxxxx>
Date: Mon, 30 Jan 2006 17:24:33 +0100
Hello all,

Assuming I have a document like this:

<root>
  <test>
     <para>Text1</para>
     <para>Text2</para>
     <para>Text3</para>
   </test>
   <test>
     <para>Text1</para>
     <para>Text2</para>
     <para>Text3</para>
   </test>
   <test>
     <para>Text1</para>
     <para>Text2</para>
     <para>Text3</para>
   </test>
</root>

I'm trying to figure out how to build a xpath statement to get all the text nodes besides from the 2nd <para> element of the 2nd <test> element. I was trying to write something like /root/test/para[position()!=2 and ancestor::*[1][position()!=2]]/text() but it didn't work (I guess that you're not surprised by that result...)
Is such a statement even possible in xpath? Also, how would I implement such a query on xslt?


(In my real document there could be more levels to avoid)

Thank you very much for your patience and help
Liron


Current Thread
  • [xsl] XPath problem
    • Liron - Mon, 30 Jan 2006 17:24:33 +0100 <=
      • Jay Bryant - Mon, 30 Jan 2006 12:00:12 -0600
        • Liron - Mon, 30 Jan 2006 20:42:44 +0100
      • <Possible follow-ups>
      • cknell - Mon, 30 Jan 2006 11:58:59 -0500