This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: problem with position() function
- To: xsl-list at mulberrytech dot com, andreg at attglobal dot net
- Subject: Re: problem with position() function
- From: Gary L Peskin <garyp at firstech dot com>
- Date: Thu, 13 Jul 2000 23:22:44 -0700
- Organization: The Firstech Corporation
- References: <396E7845.7783AC22@attglobal.net>
- Reply-To: xsl-list at mulberrytech dot com
Andre --
Your problem is in this select:
<xsl:value-of select="//*[(name() = $elname) and
(parent::node()[position() = $n])]"/>
Each element has one parent. Therefore, the size of the node-set
created by parent::node() will always be one since you can't have
multiple parents for an element. Therefore,
parent::node()[position() = $n]
will only be true when n is 1 which is why you're only getting answers
for the first row.
Try:
<xsl:value-of select="(//*[name() = $elname])[position() = $n]"/>
Gary
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list