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]

how do I retrieve element node by predicating attribute value


I'm trying to create a stylesheet that would filter out the specific
attribute value by predicating method, and return the 
element node name that holds the specific attribute value.  An example of
this problem would be clarify my problem that
I'm trying to present.

<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>
 

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



Confidentiality Notice: This email and any files transmitted with it are
confidential and are intended solely for the use of the individual or entity
to whom they are addressed. If you are not the original recipient or the
person responsible for delivering the email to the intended recipient, be
advised that you have received this email in error, and that any use,
dissemination, forwarding, printing, or copying of this email is strictly
prohibited. If you received this email in error, please notify the
originator immediately.

 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]