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]
Other format: [Raw text]

Re: Using Attribute in a Predicate


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]