RE: [xsl] interactive XSLT

Subject: RE: [xsl] interactive XSLT
From: "Jack Cane" <jwcane@xxxxxxxxxxx>
Date: Sat, 3 May 2003 07:44:04 -0400
Some thoughts occurred as I read your questions. Perhaps they will help. See
>>> below.

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Simone Rehm
Sent: Saturday, May 03, 2003 5:23 AM
To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
Subject: [xsl] interactive XSLT

Sorry, if this question is simple for you. But I can not find a good
solution from the Web articles I found.

My problem sound very simple:

I want to display the XML source applying different XSL style sheets
dependent on the user interaction (e.g. buttons) or (preferred) the same
style sheet with different parameter settings. The xml should not be
transformed to html and then displayed, but directly viewed in the browser
( starting first a parser with different parameters would be too much
handling overhead at customer side).

  Can I modify parameters (xsl:param) from Javascript based on user
interaction? How?

>>> IMO, you would first receive user preferences from an HTML form

>>> Personally I would use Delphi or whatever tool to do the heavy lifting
on the server. More secure and easier (for me) to implement. But I guess you
could do the same with JavaScript on the client. In any case, you "edit" the
old file by the following procedure: Open the old stylesheet. Create a new
text file. Then repeatedly read from the old, write to the new,
changing/adding params or other code as needed. Obviously, you will need to
take care to preserve your original content, as you go about, copying and
renaming files.

  Can I combine one XML document with different style sheets based on user
interaction (e.g. Javascript)?

>>> Here again, I would use javascript to create a new xml file having the
desired style sheet in its <?xml-stylesheet...> element.

>>> There may be a more elegant method, if somehow xml has a way of reading
parameters from an external source (such as the user's response). Or you
could look at rendering the page dynamically using a Web application on the
server, building the xml source on the fly, based upon the user's input.

The XML should be viewed at our customers. On these Linux PCs mozilla is
installed as browser. No web server is available.

>>> Not sure what that means. You cannot do any of this without a web
server. Or do you mean that all content resides on the local machine? Then
you must create all the different versions statically and install on the
local machine.

Thank you very much for a hint, how to go on.

Simone Rehm

 XSL-List info and archive:



 XSL-List info and archive:

Current Thread