This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: one xml file + one xsl file => user based output
- From: "Charles Knell" <cknell at onebox dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Tue, 06 Aug 2002 08:42:37 -0700
- Subject: Re: [xsl] one xml file + one xsl file => user based output
- Reply-to: xsl-list at lists dot mulberrytech dot com
All the processors I know permit passing a parameter to an XSLT file.
Since you are using Cocoon, you may want to get a copy of the recently-published
"Cocoon: Building XML Applications", by Matthew Langham and Carsten Zeigeler
(New Riders Press, ISBN 0735712352).
On page 92, in a section entitled "Parameters" there is a listing (Listing
4.23) entitled "Defining Parameters for a Sitemap Component"
<map:generate src="helloworld.xml" />
<map:transform src="stylesheet.xsl">
<map:parameter name="use-request-parameters" value="true" />
</map:transform>
<map:serialize />
This will permit the parameters supplied by the Request object to be
passed along to the transformation and included in the XSLT document.
Page 230 gives the details on the Request and Response interfaces, but
you won't need to worry about the details.
If you want to experiment with supplying parameters to a processor, you'll
need to check the format for supplying them on the command line which
will be particular to each processor. If you are using the Apache XALAN-J
(which comes with Cocoon), this link gives the details:
http://xml.apache.org/xalan-j/commandline.html
--
Charles Knell
cknell@onebox.com - email
---- Zenina Huskic <zehuskic@yahoo.com> wrote:
> Hello!
> I'm a student at the Salzburg University, and have the
> following problem:
> We have to implement a system, which is able to
> generate html pages dynamically.
> Is there a way to pass parameters to xsl file, before
> transformation?
>
> Any help is appreciated!
> Zenina
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list