[xsl] Help with XPath statement

Subject: [xsl] Help with XPath statement
From: Raymond Bissonnette <raybiss@xxxxxxxxxxx>
Date: Sat, 01 Mar 2008 17:34:37 -0500
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