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

Sorting by attribute

Subject: Sorting by attribute
From: Eric Taylor <Eric.Taylor@xxxxxxxxxxxx>
Date: Thu, 31 Aug 2000 14:18:00 -0500
Sorting by attribute
My XML looks something like this:

  <related>
    <para><link internal="part2" text="c"/></para>
    <para><link page="test 1" text="a"/></para>
    <para><link page="test 2" text="d"/></para>
    <para><link page="test 3" text="b"/></para>
  </related>

I want to apply the link template to each of these, sorting them based on
what's in the text attribute.  I tried the following but got an "unspecified
error when I tried to display with IE5:
  <xsl:template match="related">
    <xsl:for-each select="para">
    <xsl:sort select="link/@text"/>
      <div><xsl:apply-templates/></div>
    </xsl:for-each>
  </xsl:template>

Could someone kindly set me straight.  Thanks.  Eric


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


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.