xsl-list
[Top] [All Lists]

Re: [xsl] Using position() to retrieve corresponding value in another node

2011-01-30 19:02:52
if you use a numeric constrict in a filter like
 field[1]
it is short for the predicate
field [position()=1]

so if you go

field[position()]

it's short for


field[position()=position()]

and the predicate is always true.

You want

<xsl:for-each...>
  <xsl:variable name="p" select="position()"/>
  <xsl:value-of select=....field[position()=$p]



David



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>