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


> Chris Davidson
> This runs through them all and displays @att1
>
> <xsl:for-each select="listOfelements/animal">
> 	<xsl:if test=".[@att2='frogKEY']">


That syntax isn't valid in XSLT 1.0. ("." can't be followed by a predicate).
Write:

<xsl:if test="@att2='frogKey'">

The ".[predicate]" idea probably comes from too much exposure to WD-xsl.

Mike Kay
Software AG


 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]