[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: xpath question

Subject: Re: xpath question
From: xslt.new <xslt.new@xxxxxxxxx>
Date: Wed, 24 Jan 2007 08:38:24 -0600
 Re: xpath question
Small typo in the input <list2> was not closed:

<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>


On 1/24/07, xslt. new <xslt.new@xxxxxxxxx> wrote:
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.