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

RE: Traversing to a parent node...

Subject: RE: Traversing to a parent node...
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Fri, 17 Oct 2003 12:04:53 +0100
traversing parent .
You actually want an ancestor rather than a parent.

Specifically, you want ancestor::*[last()-1]

Michael Kay

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Karl J. Stubsjoen
> Sent: 16 October 2003 22:26
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Traversing to a parent node...
> 
> 
> Hello,
> I need help traversing to a specifi parent node.  The result 
> should always be the same parent node no matter where you are 
> at in the document.  Let me
> illustrate:
> 
> <AAA>
>     <BBB>
>             <S/>
>             <T/>
>             </U>
>     </BBB>
>             <X/>
>             <Y>
>                 <1/>
>                 <2/>
>                 <3/>
>             <Z/>
>     <CCC>
>             <MY>
>                 <DOG/>
>                 <AND/>
>                 <CAT/>
>             </MY
>     </CCC>
>     <DDD>
>     </DDD>
> </AAA>
> 
> 
> These specific parent nodes would always resolve to the node 
> 1 below the document element, so <BBB> or <CCC> or <DDD>.  
> How is this possible?
> 
> Thanks, Karl
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.