[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Order by with XSL

Subject: Re: Order by with XSL
From: "Andrew Curry" <andrew.curry@xxxxxxxxxxxx>
Date: Mon, 29 Mar 2004 10:39:28 +0100
xsl order by
<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>

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.