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

How to get an ancestor ...(bis)

Subject: How to get an ancestor ...(bis)
From: Éric Riblair <eriblair@xxxxxxxxxxxx>
Date: Tue, 12 Jan 1999 15:34:22 -0500
ancestor
Hi,


In the previous message you write to me that 
...
You are currently using "ancestor(SgPlantType[@ID])"


Try using this: "ancestor(SgPlantType)/@ID"
...


In another place I want the ancestor of some nodes ... and I utilize the
same structure of codes: ancestor(SgPesticide)/@ID but it doesn't work
because the ancestor is not at the same level of the tree node ???


Can you give me some informations


Thanks in advance for your help,
Eric


There is my previous message:
Éric Riblair wrote:



> 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


 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.