Subject: RE: [xsl] how do I retrieve element node by predicating attribute value From: "Kimberly Hahn" <Kimberly.Hahn@xxxxxxxxxx> Date: Mon, 12 Aug 2002 12:15:42 -0500 |
<cars> <porsche maker="German"> pure racing </porsche> <lexus maker="Japan"> luxury </lexus> <ford maker="USA"> economy</ford> <jaguar maker="UK">high-end luxury </jaguar> </cars> <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > <xsl:output method="html"/> <xsl:template match="cars/*"> <xsl:if test="@maker = 'German'"> <xsl:value-of select="name()"/> </xsl:if> </xsl:template> </xsl:stylesheet> -----Original Message----- in my snippet stylesheet, I would like to test the case for attribute value that is 'German' and get return of 'porsche' as the element name, how do I approach this problem? <xsl:if test="//*[@maker = 'German'] "> <!-- how would I retrieve element name 'porsche' --> <xsl:value-of select=????/> </xsl:if> thanks,. Ming XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] how do I retrieve element nod, Ming Fang | Thread | [xsl] how to reassign variable valu, James L. |
Re: [xsl] Re: Re: Accessing attribu, Joerg Heinicke | Date | [xsl] newbie value-of select and xi, John Moylan |
Month |