Re: [xsl] Using Attribute in a Predicate

Subject: Re: [xsl] Using Attribute in a Predicate
From: Joerg Heinicke <joerg.heinicke@xxxxxx>
Date: Tue, 30 Jul 2002 16:50:06 +0200
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@xxxxxxxxx
www.virbus.de


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread