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

Dynamic Sorting of XML Data

Subject: Dynamic Sorting of XML Data
From: Riju Abraham <R.Abraham@xxxxxxxxxxxx>
Date: Mon, 12 Jan 2004 19:01:15 +0300
sorting xml data
Hi All...

  
I want to be able to Dynamically sort my xml data according to which col
header i click .Hope I am clear. 
I want to acheive this with an XML and an XSL file ONLY.... 
if  u go to this link 
<http://rdcpro.com/xmldev/filterandsort/demo.html> 
u can see it to be done.But they have used an html page also.I want to
implement the html code in the the XSL File.I am not sure whether I can do
this.... 
Please revert ASAP if u are having any Idea.
I am not sure whether my requirement can be acheived with an XML and an XSL
file ONLY....

Any other Idea is also welcome...

**********************************cdCatalog.xml*****************************
**************************

<?xml version="1.0" encoding="ISO-8859-1"?> 
<?xml-stylesheet type="text/xsl" href="cdcatalog.xsl"?>
<!-- Edited with XML Spy v4.2 -->
<catalog>
	<cd>
		<title>Empire Burlesque</title>
		<artist>Bob Dylan</artist>
		<country>USA</country>
		<company>Columbia</company>
		<price>10.90</price>
		<year>1985</year>
	</cd>
	<cd>
		<title>Hide your heart</title>
		<artist>Bonnie Tyler</artist>
		<country>UK</country>
		<company>CBS Records</company>
		<price>9.90</price>
		<year>1988</year>
	</cd>	
</catalog>
**********************************cdCatalog.xml*****************************
**************************


********************************1My CDCatalog.xsl File is
***********************************************

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/">
  <html>
  <body>
    <h2>My CD Collection</h2> 
    <table border="1">
      <tr bgcolor="#9acd32">
        <th align="left">Title</th> 
        <th align="left">Artist</th> 
      </tr>
      <xsl:for-each select="catalog/cd">
      <tr>
        <td><xsl:value-of select="title" /></td>
        <td><xsl:value-of select="artist" /></td>
      </tr>
      </xsl:for-each>
  </table>
  </body>
  </html>
</xsl:template></xsl:stylesheet> 
****************************************************************************
*******************************


Regards, 
Riju 

 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.