[xsl] xpath question

Subject: [xsl] xpath question
From: xslt.new <xslt.new@xxxxxxxxx>
Date: Wed, 24 Jan 2007 08:36:01 -0600
Hello:

For the following xml input:

<list1>
<text>
<para>
  <scene>
       <set1></set1>
       <set2></set2>
 </scene>
</para>
</text>
  <list2>
<text>
<para>
  <scene>
       <set1></set1>
       <set2></set2>

  </scene>
</para>
</text>

<list2>
</list1>

<list1>
<text>
<para>
  <scene>
       <set1></set1>
       <set2></set2>
 </scene>
</para>
</text>
  <list2>
<text>
<para>
  <scene>
       <set1></set1>
       <set2></set2>

  </scene>
</para>
</text>

<list2>
</list1>


where list2 is a child of list1, if I want to locate only the <scene> element under ALL<list1> elements in the whole XML input inside the <list1> template, and NOT the <scene> element under <list2>, and vice versa, what is the xpath expression to use?

I tried using .//scene. But this locates even the <scene> elements
under <list2> since it is a child of list1.

Thank you

Current Thread