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]

sort problem


Hi, I'm a very novice for both xsl and this list.

I'm given the following xml:
<parade>
<personaggio punteggio="14">
<nome>
Carolina di Monaco
</nome>
<tendenza>
salita
</tendenza>
</personaggio>
<personaggio punteggio="10">
<nome>
Luca Cordero di Montezemolo
</nome>
<tendenza>
salita
</tendenza>
</personaggio>
</parade>

I can list the items with the following xsl:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<TABLE WIDTH="316" CELLSPACING="0" CELLPADDING="0" BORDER="0">
    <tr> 
      <td align="center" valign="top">Posizione</td>
      <td align="center" valign="top">Personaggio</td>
      <td valign="top">Apparizioni</td>
      <td valign="top">Tendenza</td>
    </tr>
	<xsl:apply-templates select="parade/personaggio" />
</TABLE>
</xsl:template>

<xsl:template match="personaggio">
	<TR>
		<td align="center"></td>
		<TD><xsl:value-of select="nome" /></TD>
 		<TD align="center"><xsl:value-of select="@punteggio" /></TD>
		<TD align="center"><xsl:value-of select="tendenza" /></TD>
	</TR>	
</xsl:template>

</xsl:stylesheet>

but I don't know how to sort the items by the field punteggio

Thanks for your attention

___________________________________________________
Se vuoi un indirizzo di posta elettronica gratuito, 
iscriviti a http://www.katamail.com


 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]