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

Re: RE: client-side ajax & xslt

Subject: Re: RE: client-side ajax & xslt
From: "Robert Koberg" <rob@xxxxxxxxxx>
Date: Fri, 09 Mar 2007 11:35:32 -0500
Re: RE:  client-side ajax & xslt
- the user can then update the display any number of times with a
minimum amount of network traffic (the browser cache will cache the
data and the xslt).

It will cache the *file* if the user's browser is set to do so. A better approach is to cache the browser specific processor object (created from the file->DOM).


now, i do know that ajax frameworks such as sarissa or even better freja are supposed to support this kind of functionality, but they are poorly documented, under constant development, and seem to routinely break with every minor version of a browser. so i have two questions:

- did anybody have success implementing the above scenario, and if so,
which framework did you use and on which browsers did you test it? and
would you recommend to do it in the same way you did it?

Yes, with dojo and the XslTransform constructor. I would recommend it (but, I wrote it :) ). There are examples in the $DOJO_HOME/tests/xml directory. It is pretty easy, though:

var myXsl = new dojo.xml.XslTransform("path/to/your.xsl");
myXsl.transformToRegion(
                        xmlSourceDom,
                        paramsArray,
                        htmlElementObject,
                        htmlDocumentObject
                        );

It works in IE, FF and Opera. The exception is Opera in that it does not
supprt the document function (yet...). So if you don't need the document
function, you should be fine in almost all browsers.

But, a general strategy I use is to have a snmallish config XML for the
main source of the transform and bring in larger/more XML files through
the document function. This way you don't need to build a real DOM and can
rely on the XSL processor's optimized DOM (usually a list of SAXish
events).



- in general, is there a chance that something like this runs reasonably stable and works for the majority of users? the static strting table should be good enough for those with older browsers, but i want the more flexible solution to be available to the majority of users.

dojo also has a widget that does this type of table, but with JSON data. It is pretty easy to use too.

best,
-Rob

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-2011 All Rights Reserved.