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

Re: Fw: Is it possible to sort the way I want

Subject: Re: Fw: Is it possible to sort the way I want
From: Ian Lang <ianplang@xxxxxxxxx>
Date: Sun, 11 Apr 2004 22:59:36 -0700 (PDT)
xsl sort ancestor
I was afraid of that.  I think it will be easier to
adjust my XML input a bit since I can control that
some what.

Thanks for the info,

IL


"Michael Kay" <mhk@xxxxxxxxx> wrote on 2004-04-09
01:51:28:

> If there's a limit on the nesting depth you can
> declare a series of sort keys:
> 
> <xsl:sort select="(ancestor::*/@name)[1]"/> 
> <xsl:sort select="(ancestor::*/@name)[2]"/>
> <xsl:sort select="(ancestor::*/@name)[3]"/>
> <xsl:sort select="(ancestor::*/@name)[4]"/>
> <xsl:sort select="(ancestor::*/@name)[5]"/>
> 
> Otherwise you need a multi-phase approach: one
> phase to compute the sort keys, the second 
> phase to do the sort.
> 
> It's easy in XSLT 2.0, just do
> 
> <xsl:sort select="string-join(ancestor::*/@name,
> '.')"/>
> 
> Michael Kay


__________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th
http://taxes.yahoo.com/filing.html

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.