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(_at_)mulberrytech(_dot_)com
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