Subject: [xsl] [xsl:sort] sort by text that correspond to code in xml From: Matts Isuls <matts.isuls@xxxxxxxxxxx> Date: Fri, 17 Jan 2003 13:10:33 +0200 |
Let's say i have a xml file like this: <root> ... ... <lunastusarvot> <lunastusarvo> <arvo_osalajikoodi>4410</arvo_osalajikoodi> <tunnus>12</tunnus> <nimi>ALLMÄN VÄG</nimi> </lunastusarvo> <lunastusarvo> <arvo_osalajikoodi>2300</arvo_osalajikoodi> <tunnus>5</tunnus> <nimi>ALLMÄN VÄG</nimi> </lunastusarvo> .. .. <lunastusarvot> ... ... </root> and i would have to sort the by <arvo_osalajikoodi>. But not by the number (4410,2300) rather by the text that the codes correspond to. The code is changed to text by a template. <xsl:for-each select="../lunastusarvo"> <!-- this sorts by the code --> <xsl:sort select="lunastuslajikoodi" data-type="number" /> <!-- and this doesn't work obviously --> <xsl:sort><xsl:apply-templates select="$lunastuslaji-koodisto"><xsl:with-param name="arvo" select="lunastuslajikoodi"/></xsl:apply-templates></xsl:sort> .. .. </xsl:for-each> Regards, Matts Isuls XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Re: your mail, Marco Guazzone | Thread | [xsl] import entire tags, Johannes . Becker |
RE: [xsl] SAX filters (was Re: Gene, David . Pawson | Date | [xsl] calling extension java functi, Laura |
Month |