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

RE: Get specific elements

Subject: RE: Get specific elements
From: TSchutzerWeissmann@xxxxxxxxxxxxxxxx
Date: Mon, 28 Apr 2003 10:52:07 +0100
eric chevillard video
Hi Johan,

> Hello
> 
> I have an XML looking like
> 
> <AAA>
>    <BBB>
>       <CCC>
>       </CCC>
>    </BBB>
>    <CCC>
>    </CCC>
> </AAA>
> 
> How can I specify to get the CCC with parent /AAA/BBB element 
> separated from the
> CCC with parent /AAA/. Meaning getting an element depending 
> on all preceding 
> parents. I reckon this could be done recursively. But Im 
> stuck at the moment...

Depending on what you're trying to do:

- use different templates, one to match "BBB/CCC", the other to match
"AAA/CCC"
- actually test for the parent 
	<xsl:if test="parent::BBB">,
	<xsl:if test="../self::BBB">
	<xsl:if test="ancestor::*[1][local-name()='BBB']">

regards,
TomSW

 "They put us through the pain of learning to walk and talk, and when
we manage that, they tell us to be quiet and sit still."
Eric Chevillard - Préhistoires


 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.