Oxygen XML Editor
 
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] node-selection


Subject: [xsl] node-selection
From: "Stefan Borchert" <stefan@xxxxxxxxxxxx>
Date: Fri, 29 Oct 2004 14:39:24 +0130

Hello!
I've got:
<menu>
 <item key="key1" active="0"/>
 <item key="test" active="1">
  <children>
   <item key="test/sub1" active="0"/>
   <item key="test/sub2" active="1"/>
  </children>
 </item>
</menu>

How can I select the key of the last "active" node. If I try
"//item[@active=1]@key" both ("test" and "test/sub2") are selected. But I only
wanted to select "test/sub2".
In the following case "key1" should be selected:
<menu>
 <item key="key1" active="1"/>
 <item key="test" active="0"/>
</menu>

So how can I select the attribute "key" of the "last" item with attribute
"active" set to "1"?

thanks,

 Stefan


Current Thread
 
© 2002-2008 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy
This website was created & generated with <oXygen/> XML Editor