This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: one xml file + one xsl file => user based output


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]