[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
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
|
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
|