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

RE: How can I always match the immediate ancestral el

Subject: RE: How can I always match the immediate ancestral element?
From: <Jarno.Elovirta@xxxxxxxxx>
Date: Wed, 12 May 2004 12:04:40 +0300
match.th
Hi,

> <section id="foo"><!-- *1 -->
>   <anchor id="a"><!-- *2 -->
>   <section><!-- *3 -->
>     <anchor id="b"><!-- *4 -->
>   </section>
> </section>
> 
> How can I define a template for the "anchor" so that I can 
> test if the 
> first "anchor" inside the immediate ancestral "section" is 
> the current 
> "anchor" node?
> 
> For example, when I'm processing *4, I want to test if the 
> first anchor 
> element inside its immediate ancestral section (*3) is itself (*4). 

(I had to read the sentence quite a few times, so I may have misunderstood your problem.) Test if it has preceding anchor siblings:

  not(preceding-sibling::anchor)

Cheers,

Jarno

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.