>Same answer:
<Revision><Number><xsl:value-of select="$OtherSource[position()]"/></Number></Revision>
Umm, no: it needs to be
<Revision><Number><xsl:variable name="pos" select="position()"/><xsl:value-of select="$OtherSource[$pos]"/></Number></Revision>
because position() changes its value inside a predicate.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
Last edited by mhkay; July 6th, 2009 at 07:13 AM..
Reason: correction
|