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

Re: Client-side sorting without Microsoft extensions?


client side sorting
Ken,

IMHO, XSLT is a really bad option for what you are asking. JavaScript is 
much better for sorting tables based on the column type, since XSLT is 
an overhead and does not have a Date type.

You can find a JavaScript Implementation of a table sorter and a use 
sample attached. You can use it to sort based on date (various formats), 
numbers etc. Sorry for the poor documentation (and the example in Greek 
;-) but I was in a real hurry... you just got written permission to do 
whatever with it. I'll probably group this script with some other stuff 
and package it under the GPL or something when I find some time.

If you still want a crossbrowser XSLT API for javascript, I can email 
you something I'm working on (stable code, no errors or bugs) when I get 
home (in a day or two). Note however, that the XSLT interfaces for 
Mozilla/Netscape are not stable, meaning they'll probably change in a 
future release.

Cheers,

Manos

Ken Sall wrote:

>Does anyone know a cross-browser solution for XSLT access to the DOM to sort
>XML data in-place that works for *both* Netscape 6+ and IE 5.5+?
>
>In other words, my stylesheet renders XML in tabular form (as HTML) and I'm
>using Microsoft-specific XML DOM and XSLT features to enable client-side
>sorting of data merely by clicking on the column heading, based on a
>technique illustrated in an XML-J article [1]. The core of the
>Microsoft-specific code follows:
>
>    oldXMLDOM = document.all.participantsXML.XMLDocument;  // data
>    oldXSLDOM = document.all.tableXSL.XMLDocument;   // stylesheet
>    newHTML = oldXMLDOM.transformNode(oldXSLDOM);
>    document.all.tableBody.innerHTML = newHTML;
>....
>   XSLIsland = document.all.tableXSL.XMLDocument;
>   var objSelect =
>     XSLIsland.selectSingleNode("//xsl:sort/@select");
>
>Thanks in advance.
>
>[1] XML Journal, Volume 3, Issue 5; http://www.sys-con.com/xml/
>
>- Ken Sall                            ken@s... or kensall@c...
>- XML Consultant/Author
>- http://kensall.com or http://mywebpages.comcast.net/kensall/
>- XML Family of Specifications: A Practical Guide (just published)
>- http://WDVL.Internet.com/Authoring/Languages/XML/XMLFamily/
>
>
>
>
>
>-----------------------------------------------------------------
>The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
>initiative of OASIS <http://www.oasis-open.org>
>
>The list archives are at http://lists.xml.org/archives/xml-dev/
>
>To subscribe or unsubscribe from this list use the subscription
>manager: <http://lists.xml.org/ob/adm.pl>
>
>
>  
>


MB_TableSorter.js

Title: Untitled
Áñ÷åßï Çìåñïìçíßá ÐåñéãñáöÞ
PAGE0029.djvu 15/12/2000 ÅÍÇÌÅÑÙÔÉÊÏ ÓÇÌÅÉÙÌÁ ÅÎÏÄÏÕ
PAGE0027.djvu 28/11/2000 ÍÏÓÇËÅÕÔÉÊÏ ÄÅËÔÉÏ
PAGE0025.djvu 04/12/2000 ÄÅËÔÉÏ ÍÏÓÇËÅÉÁÓ
PAGE0003.djvu 27/10/1999 ÍÏÓÇËÅÕÔÉÊÏ ÄÅËÔÉÏ
PAGE0009.djvu 30/11/2000 ÉÁÔÑÉÊÏ ÓÇÌÅÉÙÌÁ
PAGE0037.djvu 13/12/2000 ÈÅÑÌÏÌÅÔÑÉÊÏ ÄÉÁÃÑÁÌÌÁ
PAGE0041.djvu 27/11/1999 ÈÅÑÌÏÌÅÔÑÉÊÏ ÄÉÁÃÑÁÌÌÁ
PAGE0021.djvu 28/11/2000 ÊÁÑÔÁ ÍÏÓÇËÅÉÁÓ
Page0033.djvu 28/11/2000 ÉÁÔÑÉÊÏ ÓÇÌÅÉÙÌÁ
Page0031.djvu 12/10/2000 ÉÁÔÑÉÊÏ ÓÇÌÅÉÙÌÁ
PAGE0039.djvu 28/11/2000 ÈÅÑÌÏÌÅÔÑÉÊÏ ÄÉÁÃÑÁÌÌÁ
PAGE0011.djvu 28/11/2000 ÉÁÔÑÉÊÏ ÓÇÌÅÉÙÌÁ ÅÉÓÏÄÏÕ
PAGE0001.djvu 12/01/1995 ÅÉÓÉÔÇÑÉÏ
PAGE0005.djvu 27/10/1999 ÊÁÑÔÁ ÍÏÓÇËÅÉÁÓ
xray11.sid 13/12/2000 ÁÊÔÉÍÏÃÑÁÖÉÁ
xray07.sid 27/10/1999 ÁÊÔÉÍÏÃÑÁÖÉÁ
xray12.sid 28/11/2000 ÁÊÔÉÍÏÃÑÁÖÉÁ
xray08.sid 30/08/2000 ÁÊÔÉÍÏÃÑÁÖÉÁ
xray03.sid 27/10/1999 ÁÊÔÉÍÏÃÑÁÖÉÁ
xray05.sid 29/10/1999 ÁÊÔÉÍÏÃÑÁÖÉÁ
xray02.sid 13/12/2001 ÁÊÔÉÍÏÃÑÁÖÉÁ
xray04.sid 12/01/1995 ÁÊÔÉÍÏÃÑÁÖÉÁ
xray10.sid 28/11/2000 ÁÊÔÉÍÏÃÑÁÖÉÁ
xray09.sid 30/08/2000 ÁÊÔÉÍÏÃÑÁÖÉÁ
xray13.sid 13/12/2000 ÁÊÔÉÍÏÃÑÁÖÉÁ
xray06.sid 12/01/1995 ÁÊÔÉÍÏÃÑÁÖÉÁ
xray01.sid 13/12/2001 ÁÊÔÉÍÏÃÑÁÖÉÁ
xaxon2.sid 04/10/2000 ÌÁÃÍÇÔÉÊÇ
xaxon1.sid 11/10/2000 ÌÁÃÍÇÔÉÊÇ

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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.