Subject: Re: Fw: [xsl] Is it possible to sort the way I want From: Ian Lang <ianplang@xxxxxxxxx> Date: Sun, 11 Apr 2004 22:59:36 -0700 (PDT) |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Is it possible to sort th, Michael Kay | Thread | Re: RE: [xsl] Saxon servlet and xsl, xml4pharma |
Re: Fw: [xsl] xmlns added to some <, Ian Lang | Date | [xsl] Is it possible to reference t, Ian Lang |
Month |