This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Using Attribute in a Predicate
- From: Joerg Heinicke <joerg dot heinicke at gmx dot de>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Tue, 30 Jul 2002 16:50:06 +0200
- Subject: Re: [xsl] Using Attribute in a Predicate
- References: <20020730144019.61653.qmail@web12302.mail.yahoo.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi Matt,
<xsl:value-of select="//Script/Group[@Grp]/Desc/@Name"/>
means: a Group which has a attribute @Grp
<xsl:value-of select="//Script/Group[0]/Desc/@Name"/>
means: the Group with the position() 0
The second one should return nothing, because there is no position() 0 in a
node set in XSLT.
The question is what you really want:
the Group with a special attribute value
Group[@Grp = '0']
or a specific position:
Group[position() = @Grp]
But one more time: there is no position() = 0.
Regards,
Joerg
--
System Development
VIRBUS AG
Fon +49(0)341-979-7419
Fax +49(0)341-979-7409
joerg.heinicke@virbus.de
www.virbus.de
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list