Hi Andrew,
How I can get "preceding-sibling" node in for-each flow:
<xsl:for-each select="//some-node">
<xsl:value-of select="*[position()-1]"/>
</xsl:for-each>
seems not work.
If I interpret you correctly, you can do something like:
<xsl:variable name="nodes" select="//some-node" />
<xsl:for-each select="$nodes">
<xsl:variable name="pos" select="position()" />
<xsl:value-of select="$nodes[$pos - 1]" />
</xsl:for-each>
But it's very inefficient and I doubt that it's the best way to
achieve what you want to achieve. If you told us what you're trying to
do (what your source and desired result is) we might be able to show
you a better approach.
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list