Re: [xsl] XSLT question on xsl:variable and/or xsl:param usage with user inputs

Subject: Re: [xsl] XSLT question on xsl:variable and/or xsl:param usage with user inputs
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 9 Mar 2006 12:10:03 GMT
> I am trying to assign a user-input value to a variable. I know that
> variable values can not be changed within a given template, but I am
> still not sure if what I am trying to do is possible or not? If it is
> not, can xsl:param be an alternative, and how or is there another
> alternative at all? Can this be done by templates?

what do you mean by "user-input value" ?
I am not at all sure, but I suspect that you mean a form on a web page?
If so you need to remember that XSLT just generates an HTML document, it
doesn't itself know anything about HTML. Once the HTML document is
created the XSLT process is _finished_ and the form is then passed to a
browser which interprets it as HTML and displays a form and accepts user
input. The prowser can then send the form data to whatever process is
handling the form, this may be another XSLT stylesheet but it's an
entirely different process from the one that generated the form
(although it could use the same stylesheet of course). If you want to
pass in values to a stylesheet then declare xsl:param at the top level
of the stylesheet and pass in the values when the stylesheet is
executed. There is a parallel thread on this list this week that
discusses various server and client side frameworks that allow such
parameters to be passed in.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

Current Thread