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

Re: Help with elements nested at different levels

Subject: Re: Help with elements nested at different levels
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Sun, 30 Dec 2007 23:25:32 +0100
Re:  Help with elements nested at different levels
Vincenzo Menanno wrote:

Ken already emailed me a suggestion where I could just use //Script to get all the script elements... but the problem with that is the CustomMenuCatalog might also have MenuItems with Script elements.


Originally I had this to get me all the script elements...

/FMPReport/File[1]/ScriptCatalog[1]/Script

But that now only gets me to the first Script if it is not within a group.

This however picks up all the entries inside the CustomMenuCatalog

//Script

Any suggestions on how I can get the complete list of all the Script entries even if they are nested 1, 2, 3, ...n levels?

Thanks

Hi Vincenzo,


To find all Script elements having a certain parent in common, you can use:

//parentnodename/Script

i.e.:

//ScriptCatalog/Script

or:

//group/Script

This will rule out any other possibilities. If you want all Script elements that do not have a parent of "CustomMenuCatalog" (assuming it will be at the first level above) you can do this, too:

//*[not(self::CustomMenuCatalog)]/Script

which will give you all Script elements that do not have CustomMenuCatalog as a direct parent.

HTH,

Cheers & Happy New Year,
-- Abel Braaksma

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.