[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Dynamic sort on the client side XSL
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
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|