|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Order by with XSL
<xsl:for-each.....>
<xsl:sort data-type="text" select="./ammlegal" order="ascending"/>
</xsl:for-each>
Im not too sure if thats too symplistic for your query though.
But for a given set of data that will sort alphabetically ascending.
If you want a specific order you can create a sort.xml file like :
And do something like
<?xml version="1.0"?>
<sort>
<x order="1">BBBBBBr</x>
<x order="2">AAAAAr</x>
<x order="3">CCCCC</x>
</sort>
<xsl:sort data-type="number"
select="document('sort.xml')/sort/x[.=current()/./ammegal]/@order"
order="ascending"/>
----- Original Message -----
From: "Gianni Ferrari" <gferrari@xxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Monday, March 29, 2004 10:29 AM
Subject: Order by with XSL
> Hi, thank you for the reply, i have a similar XML, and i would like to
order
> for ammlegal. In the stylesheet, with FO, i make a table, with three
> columns. Every row is a factory, and then with company address, ammlegal
and
> resarea. How i can order my table with ammlegal?
> Thank you...
> I hope you can help me...
> Regards
> Gianni
> ------
> <elenco>
> <title>Gerarchia GPI e HIT</title>
> <ditta company_name="sssss" Address="xxxxxx" Phone="1111111" City="eeeee">
> <ammlegal>FFFFFFF</ammlegal>
> <resarea>AAAAAAAA</resarea>
>
> </ditta>
> <ditta company_name="jjkhkj" Address="jkj" Phone="3329438" City="uihjh">
> <ammlegal>BBBBBBB</ammlegal>
> <resarea>RRRRRRRRR</resarea>
>
> </ditta>
> </ditta>
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








