tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marius Scurtescu <>
Subject RE: sending params to an xsl file using the xsl taglib
Date Mon, 30 Oct 2000 20:11:54 GMT

I run into the same problem. I have to set a parameter for a
style sheet and it is not possible.

Some implementation suggestions:

1. You could add an optional attribute to the "apply" tag 
called "param" which will specify the XSL parameter in the
url encoding style: name = value. Example:

<xsl:apply xml="some.xml" xsl="some.xsl" param="name1=value1" param="name2=value2"/>

I don't know what character you can use in a parameter name. If "=" can
be used then probably you will have to url encode both the name and the
value. If not, then no encoding is needed.

2. You could add a tag, called "param", which should be used only
inside an "apply" tag. This tag will specify the parameters.

<xsl:apply xml="some.xml" xsl="some.xsl">
    <param name="name1" value="value1"/>
    <param name="name2" value="value2"/>

The second approach feels cleaner.

Should I post this to taglibs-dev as well? I am not
subscribed to that list. I would implement this, but I don't
know how can I get commit rights.


> from the xalan api (, it
> looks like the setStylesheetParam method would have to be used.
> matt.

Marius Scurtescu, Software Engineer
Tel: (604) 899-2835 Fax: (604) 899-2899
Multiactive Software Inc.
Attract and retain customers with Multiactive Software --
proud winners of PC WEEK's "Best of COMDEX" award.

View raw message