This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: numbering sorted list



> how could I look at the next item in the sorted list?

with difficulty (but its not impossible) using standard XSLT
but if your processor (eg xt, saxon, msxsl, xalan) offers
a node-set() extension function to convert from a result tree frafment
to a node-set (or in the case of msxsl, just implicit coercion)
then you can first sort your list
<xsl:variable name="x">
 <xsl:for-each select="....">
  <xsl:sort ...
...
</xsl:variable>

then process your sorted list
<xsl:for-each select="xt:node-set($x)/*">
....
now position() gives the sorted order, and following-sibling::*[1]
gives the next node after sorting.
</xsl:for-each>


David


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]