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

How I can get an ancestor ....

Subject: How I can get an ancestor ....
From: Éric Riblair <eriblair@xxxxxxxxxxxx>
Date: Fri, 08 Jan 1999 10:38:06 -0500
xsl ancestor description
HI,

In my work, I want to have an attribute value of an ancestor of a node ...

There is the context:

I built a list of HREF with the disorders to pass 2 arguments to an asp
file ... but I can't get the ID of the plant

...<xsl:for-each select="disorders/SgDisorderType" order-by="@IDENTIFIER">
            <DIV STYLE="margin-left:26pt; margin-right:1pt; font-size:10pt; 
	     font-weight:bold; padding-top:0pt;">
           <A TARGET="description">
           <xsl:attribute name="HREF" >
              disorder.asp?disorder=<xsl:value-of select="@IDENTIFIER" />
	&amp;plant=<xsl:value-of select="ancestor(SgPlantType[@ID])"/> 
           </xsl:attribute> 
           <xsl:value-of select="@NAME"/>
           </A>
           </DIV>
</xsl:for-each> ... 

The result of this is: ...disorder.asp?disorder=doryphore&plant=solanacées
And the XML look like this:

<SgPlantType CLASS="SgPlantType" NAME="tomate, aubergine et poivron"
ID="tomate,_aubergine_et_poivron">    
        <description></description>
        <categories>    
            <category>solanac&#233;es</category>
        </categories>
        <disorders MANAGER="DisorderTypes">    
            <SgDisorderType NAME="doryphore"
IDENTIFIER="doryphore"></SgDisorderType>
            <SgDisorderType NAME="anthracnose"
IDENTIFIER="anthracnose"></SgDisorderType>
            <SgDisorderType NAME="mildiou"
IDENTIFIER="mildiou"></SgDisorderType>
            <SgDisorderType NAME="br&#251;lure alternarienne"
IDENTIFIER="brulure_alternarienne"></SgDisorderType>
            <SgDisorderType NAME="septoriose"
IDENTIFIER="septoriose"></SgDisorderType>
</SgPlantType>

Thanks for any help,
Eric


 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.