|
Subject: How I can get an ancestor .... From: Éric Riblair <eriblair@xxxxxxxxxxxx> Date: Fri, 08 Jan 1999 10:38:06 -0500 |
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" />
&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é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û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 |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Seeking advice on design of XML,DOM, Amit Rekhi | Thread | Understanding character handling, keshlam |
| RE: Displaying XML source with XSL, Markor, John (Non-HP | Date | An XML Namespaces Alternative..., keshlam |
| Month |