xsl-list
[Top] [All Lists]

RE: interactive XSLT

2003-05-05 10:54:50
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).

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

You can in IE, but unfortunately I don't know anything about Mozilla,
and I think this is somewhat browser-specific.

To see how to do it in IE, go to:
http://www.biglist.com/lists/xsl-list/archives/200102/msg00277.html

In this model, the XSL transformation is done in Javascript with
  outputHTML = sourceXMLDoc.transformNode(stylesheet);

The above web page shows two ways to customize parameters.

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

Yes; in the above statement, simply use a different stylesheet
as the argument to transformNode().

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

I disagree with the other person who said you can't do any of this
without a web server.  I'm doing some similar things on my machine
using the browser alone (which uses Javascript and an XSLT processor)
to produce different kinds of output based on user input.
Hope you can find a way to do this in Mozilla.

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

Simone Rehm


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>