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

RE: Sortable data-table

Subject: RE: Sortable data-table
From: Roel Mertens <rmertens@xxxxxxx>
Date: Thu, 28 Dec 2000 08:48:22 +0100
dataset xsl
See 
http://213.46.13.143/metalweb/subcatalogus.xsl
for the XSL 

and for the XML:
http://213.46.13.143/scripts/metalweb.exe/%HOST%/scripts/metalweb.exe/showpa
ge?pagename=SubCatalogus&Product=18436

or go to http://213.46.13.143 and go to "CATALOGUS"



> -----Oorspronkelijk bericht-----
> Van: Koetje Boe [mailto:b_koetje@xxxxxxxxxxx]
> Verzonden: woensdag 27 december 2000 14:38
> Aan: XSL-list@xxxxxxxxxxxxxxxxxxxxxx
> Onderwerp:  Sortable data-table
> 
> 
> 
> Hi,
> I have a xml-file that respresents a data table, and a xsl-file that
> shows this table. What I want to do is this: When a column header is
> pressed(it`s a button) sort the resulting html-page on that column.
> For example, my xml-file looks like:
> 
> <?xml version="1.0" encoding="ISO8859-1"?>
> <!DOCTYPE dataset PUBLIC 'datasetDTD'  
> http://localhost/xmlDocs/dataset.dtd'>
> <?xml-stylesheet type="text/xsl" 
> href="http://localhost/xmlDocs/dataset.xsl"?>
> <?cocoon-process type="xslt"?>
> 
> <dataset>
>   <metaData>
>     <tableName>EMPLOYEES</tableName>
>     <columnInfo name="EMP_NO" type="SmallInt" size="6"/>
>     <columnInfo name="FIRST_NAME" type="VarChar" size="15"/>
>     <columnInfo name="LAST_NAME" type="VarChar" size="20"/>
>   </metaData>
>   <data>
>     <row>
>       <column name="EMP_NO">2</column>
>       <column name="FIRST_NAME">Robert</column>
>       <column name="LAST_NAME">Nelson</column>
>     </row>
>     <row>
>       <column name="FIRST_NAME">K. J.</column>
>       <column name="LAST_NAME">Weston</column>
>       <column name="EMP_NO">11</column>
>     </row>
>     <row>
>       <column name="FIRST_NAME">Luke</column>
>       <column name="EMP_NO">61</column>
>       <column name="LAST_NAME">Leung</column>
>     </row>
>   </data>
> </dataset>
> 
> And my xsl-file looks like this:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0" 
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> <xsl:output method="html" version="1.0" indent="yes"/>
> <xsl:template match="/">
> <xsl:processing-instruction 
> name="cocoon-format">type="text/html"</xsl:processing-instruction>
>   <html>
>     <body>
>       <table border="1" width="60%" bgcolor="WHITE" cellspacing="2" 
> cellpadding="2" frame="border">
>         <caption>
> 	    <xsl:value-of select="dataset/metaData/tableName"/>
> 	  </caption>
> 	  <tr>
> 	    <xsl:for-each select="dataset/metaData/columnInfo">
> 	      <th>
> 		  <INPUT>
> 		  <xsl:attribute name="TYPE">SUBMIT</xsl:attribute>
> 		  <xsl:attribute name="VALUE">
> 		    <xsl:value-of select="@name"/>
> 		  </xsl:attribute>
> 		  </INPUT>
> 		</th>
> 	    </xsl:for-each>
> 	  </tr>
>   	  <xsl:for-each select="dataset/data/row">
> 	    <xsl:variable name="row" select="."/>
>           <tr>
> 	      <xsl:for-each select="/dataset/metaData/columnInfo">
> 		  <td>
> 		    <xsl:value-of select="$row/column[@name = 
> current()/@name]"/>
> 		  </td>
> 		</xsl:for-each>
> 	    </tr>
> 	  </xsl:for-each>
> 	</table>
>     </body>
>   </html>
> </xsl:template>
> </xsl:stylesheet>
> 
> It there a way to do this? And if so, how?
> Any suggestions and/or examples are greatly appreciated.
> 
> J.S. Koldenhof
> ______________________________________________________________
> ___________
> Get Your Private, Free E-mail from MSN Hotmail at 
http://www.hotmail.com.


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

 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.