<xsl:value-of select="../../subsequence(colspec, position(),
1)/@colname"/>
Sorry, that's wrong, because position() also changes on the rhs of "/". -
MHK
Michael Kay
http://www.saxonica.com/
XML:
<table>
<colspec colname="c1"/>
<colspec colname="c2"/>
<colspec colname="c3"/>
<row>
<entry colname="c1">r1_1</entry>
<entry colname="c2">r1_2</entry>
<entry colname="c3">r1_2</entry>
</row>
</table>
XSL:
<xsl:template match="entry">
<xsl:variable name="mypos">
<xsl:value-of select="position()"/>
</xsl:variable>
<xsl:value-of select="../../colspec[position() =
$mypos]/@colname"/>
</xsl:template>
Best regards and thanks for your comments,
Norbert Heidbrink
--~------------------------------------------------------------------
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>
--~--
--~------------------------------------------------------------------
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>
--~--
--~------------------------------------------------------------------
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>
--~--