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

Re: Dynamic sort on the client side XSL

Subject: Re: Dynamic sort on the client side XSL
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Wed, 17 Mar 2004 18:46:54 -0500
javascript dynamic sort
Hi Bret,

At 06:19 PM 3/17/2004, you wrote:
Hi there !
        I have a XML/XSL table that is generated
server side and then parsed into HTML and sent to the
client side . I want the user  be able to click any of
the headings of the table and have the table sort by
that heading. Is this possible to do the sorting using
any XSL Sorting functions on the client side without
having to go back to the server(The reason i dont want
to go back to the server and request and then sort is
redundancy ) .

If you are willing to lock yourself into one or another browser's API for running the transform on the client, you can serve a page that allows a user to control how the transform is performed. But this only works if you're relying on the browser's tranformation engine, whereas in your scenario the client doesn't perform a transform at all: it's already happened on the server.


Or would i have to use javascript to do the sort on
client side based on the selection .

That's the way I would do it -- using DOM Javascript that should be portable across browsers. In other words, just send (D)HTML, with the scripting to allow the user to sort in place just as it would be if there were no XML in back. Think of the HTML/Javascript as your presentation layer, discrete from your transform. At least you'll have a promise and hope for portability that way (whereas the XSLT glue isn't standard at all). But test!


Other experts on the different browsers' approaches to XSLT may have other insights. But if you're serving up HTML fully cooked, I think you answered your own question.

Cheers,
Wendell


====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================


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.