[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] How I can get an ancestor ....
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|