This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: select attribute value based on attribute value
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] select attribute value based on attribute value
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Sat, 17 Mar 2001 15:39:34 -0000
- Reply-To: xsl-list at lists dot mulberrytech dot com
> 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