This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: how do I retrieve element node by predicating attribute value


<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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]