xsl-list
[Top] [All Lists]

Re: Order by with XSL

2004-03-29 02:39:28
<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(_at_)gpi(_dot_)it>
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Sent: Monday, March 29, 2004 10:29 AM
Subject: [xsl] 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>


--+------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--+--




<Prev in Thread] Current Thread [Next in Thread>