[XSL-LIST Mailing List Archive Home]
[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
- 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
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");
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
- 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
dojo also has a widget that does this type of table, but with JSON data.
It is pretty easy to use too.
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