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

Re: table sort

Subject: Re: table sort
From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
Date: Fri, 25 Apr 2003 13:05:06 +0200
table sort
<David.Pawson@xxxxxxxxxxx> wrote in message
news:9B66BBD37D5DD411B8CE00508B69700F049E1705@xxxxxxxxxxxxxxxxxxxxxxxxx
> Given a simple table like the one below,
> I need to copy it, with the content sorted by the first entry.
>
> I *thought* it should work using an identity stylesheet,
>
> with
>
> <xsl:template match="tbody">
>   <tbody>
>    <xsl:apply-templates>
>     <xsl:sort select="row/entry[1]/para"/>
>    </xsl:apply-templates>
>   </tbody>
> </xsl:template>
>
> but it only works with
>    <xsl:sort/>
>

Hi Dave,

Probably you wanted:

<xsl:template match="tbody">
  <tbody>
   <xsl:apply-templates>
    <xsl:sort select="entry[1]/para"/>
   </xsl:apply-templates>
  </tbody>
</xsl:template>

Note that the value of the sort key is calculated relative to the selected
node. A "row" does not have a "row" child.



=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread
  • table sort
    • David . Pawson - Fri, 25 Apr 2003 06:17:19 -0400 (EDT)
      • Dimitre Novatchev - Fri, 25 Apr 2003 06:45:36 -0400 (EDT) <=

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.