RE: [xsl] Sort and paging problem

Subject: RE: [xsl] Sort and paging problem
From: Jarno.Elovirta@xxxxxxxxx
Date: Fri, 14 Mar 2003 11:18:38 +0200
Hi,

> <xsl:for-each select="DISPONIBILITY/LHOTEL/HOTEL[position() 
> >= $start and
> position() &lt;= $end]">
> 	<xsl:sort select="number(@price)"/>
> </xsl:for-each>

You have to first select, sort, and only then filter by position, i.e.

<xsl:for-each select="DISPONIBILITY/LHOTEL/HOTEL">
  <xsl:sort select="number(@price)"/>
  <xsl:if test="position() >= $start and position() &lt;= $end">
    ...

Cheers,

Jarno - This Morn'Omina: One Eyed Man

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


Current Thread