OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   RE: [xml-dev] client side XML functionalities

[ Lists Home | Date Index | Thread Index ]

Hello Michael,

Topic: local transformation.
> So the question is: Can I do a client side XSLT transformation and be
able to pass these parameters to the XSLT template?  

Yes, you can do this from Javascript using an API such as Sarissa.

Didier replies:
You are right, you can do that with javascript. Doing it with Sarissa may
poses some problems like:
a) Sarissa is copying every element into javascript objects. New functions
like "selectSingleNode" can then be added to the newly created object. This
may be or not a problem dependent on the DOM size, potential memory leaks
(due to DCOM refcount), etc... But for the moment let's pretend it doesn't
cause any problem at that level.
b) if you use Sarissa to transform the document, this last thing is not
included in Sarissa, you'll have to develop your own rendering of the
result. Here are some of the drawbacks you'll encounter on different
platforms. 1) Microsoft internet Explorer: if you use the
window.document.write function to write the result of the transform, then
your platform will freeze unless you write the content in an embedded
iframe. Why? Because doing a write will overwrite the script and hang the
browser. Natural you say? 2) Mozilla: you do the same thing as previously
mentioned for IE and this time it will work because Mozilla independently
handle the function. Hence, the function can finish it's job without
On and on....
So yes you can do that with Sarissa but only a fraction of the process is
handled by it. You're still on your own for the other part: rendering the
result. And I just scratched the surface of all the problems you'll
encounter on the different platforms.

Topic: parameter passing through a URL:
> Can I do that through a URL? Is it possible to link from one document to
select a certain XML document, a certain XSLT template, some parameters all
from a URL?

Not as far as I know: except of course with a "javascript:" URL that invokes
the above Javascript code.

Didier replies:
Again, you'll have to implement it. It's not an "off the shelf" solution

Michael said:
Your point?

Didier replies:
Firstly, thanks Michael for your answers that honestly reflected the actual
state of the art.

You were the only one responding, so I guess that your answers reflected the
current knowledge/toolset of the community.

We are still far from a tool able to work on at least the IE and Mozilla
platforms. Why? Because both represent at least 96% of the total market
place and offer a cross platform solution (able to run Mozilla on several
platforms, IE on Windows)

A) Transform XML documents on the client side with parameters and render the
B) Possibility to assemble several XML document or to process a pipeline of
transforms and render the result.
C) Possibility to specify in a URL either the pipeline/assembly process or
all the parameters to be passed to the engine. Why? Because different
referrers can define different parameters or XSLT templates to render the
same encoded data.

Didier PH Martin


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS