[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

Subject: RE: 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
porsche maker
<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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.