Subject: How to get an ancestor ...(bis) From: Éric Riblair <eriblair@xxxxxxxxxxxx> Date: Tue, 12 Jan 1999 15:34:22 -0500 |
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" /> > &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 XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Feature Suggestion - result subtree, G. Ken Holman | Thread | Feature Request: a fail condition f, G. Ken Holman |
Re: GOTCHA!, G. Ken Holman | Date | Feature Request: a fail condition f, G. Ken Holman |
Month |