[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: how do I retrieve element node by predicating attr
<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
|
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
|