RE: [xsl] Vertical table display with sort

Subject: RE: [xsl] Vertical table display with sort
From: Jarno.Elovirta@xxxxxxxxx
Date: Wed, 30 Apr 2003 11:20:03 +0300
Hi,

> This is the output I expect:
> 
> raman1 1 33
> raman2 2 11
> raman3 3 44
> raman4 4 22
> 
> The o/p I am getting:
> 
> raman1 4 22 
> raman2 1 33 
> raman3 3 44 
> raman4 2 11 
> 
> The XSL File I used  to process This :
> 
> <?xml version="1.0"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
>   <xsl:output method="html" indent="yes" /> 	
>   <xsl:template match="/">
>  <table>
>  <xsl:variable name="y" select="o/com/*" />
>      <xsl:for-each select="$y[1]/*">
>      	<xsl:sort select="@displayposition"/>
>       <xsl:variable name="x" select="position()" />

Change this to 

  <xsl:variable name="x" select="count(preceding-sibling::*) + 1" />

Cheers,

Jarno - Linnunradan käsikirja liftareille: Osa 24

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


Current Thread