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

Re: Recursion (I think)

Subject: Re: Recursion (I think)
From: Nicholas Orr <nick@xxxxxxxxxxx>
Date: Mon, 26 Sep 2005 21:35:29 +1000
nearest 1000
On 26/09/2005, at 8:59 PM, David Carlisle wrote:



How do you do that if you don't know how far back up the tree they are?


ancestor-or-self::*[@id][1]/@id


selects the nearest id attribute.

Ok, thanks. Does that mean it finds the nearest id attribute for any node? Can I specify that it's the id attribute from the nearest "ObjectType" node?


Would that be

ancestor-or-self::*[ObjectType][1]/@id

What purpose does the [1] serve?

Thanks again,
Nick

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.