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

how to sort by different attributes in a table

Subject: how to sort by different attributes in a table
From: "Shen, Ching" <Shenc@xxxxxxxx>
Date: Mon, 30 Aug 2004 14:54:16 -0500
xsl different attributes of column
I have a xml file which looks like
<Rows>
  <Row>
    <Columns A=3D"HOSTNAME" B=3D"IPADDRESS" C=3D"BRAND/MODEL" />
  </Row>
 <Row>
    <Columns A=3D"AA" B=3D"23" C=3D"ibm" />
  </Row>
......
</Rows>


I have all attributes list in a table as columns and I need a xsl syntax =
which will allow me to sort by selected attribute, when they click =
attribute header,=20

i. e. when user click 2nd column header, all xml file will sorted by =
<xsl:sort select=3D"*/@B" />

The following syntax failed to work and I run out clue. Here  header =
link set to Sort=3D{position()}=20

    <xsl:apply-templates select=3D"*/*">
                <xsl:sort select=3D"*/@Columns[$Sort]" />
    </xsl:apply-templates>

Does anybody have done this before and can help me out with right syntax?
Your suggestions will be greatly appreciated


Thank you!

Ching

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.