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

Help with XPath statement

Subject: Help with XPath statement
From: Raymond Bissonnette <raybiss@xxxxxxxxxxx>
Date: Sat, 01 Mar 2008 17:34:37 -0500
 Help with XPath statement
Hi,

Given the following xml, I'd like to get the 0803 (last) section's set
elements + the 0802 (before last) set elements that are not already in 0803.


<application>
   <section id="0802">
    <set key="jazz" value="4" />
    <set key="pop" value="61" />
    <set key="rock" value="43" />
  </section>
  <section id="0803">
    <set key="jazz" value="2" />
    <set key="vocal" value="2" />
  </section>
</application>

In this case: 

jazz
vocal
pop
rock

Here's what I came up with so far but it still misses an important part: ???

//section[@id='0803']/set|//section[@id='0802']/set[count(//section[@id='080
3']/set[@key=???]) = 0]

I tried things like self::@key and {@key} without success.

Any help would be welcome.

Regards,
Raymond

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.