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]

Re: select attribute value based on attribute value


At 08:03 PM 3/16/01, Chris wrote:
>On Behalf Of Alex Reuter
>
>This runs through them all and displays @att1
>
><xsl:for-each select="listOfelements/animal">
>         <xsl:if test=".[@att2='frogKEY']">
>                 <xsl:value-of select="@att1"/>
>         </xsl:if>
>...

Unfortunately, I don't think you can say ".[@att2='frogKEY']" -- you can't 
use a predicate on top of a location step, only as part of one; and . is a 
complete (abbreviated) step.

But you don't need to, in any case. <xsl:if test="@att2='frogKEY'"> will 
work fine.

Cheers,
Wendell



 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]