tomcat-taglibs-user mailing list archives

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

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.
Example:

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

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.

Marius



> from the xalan api (http://xml.apache.org/xalan/apidocs/index.html), it
> looks like the setStylesheetParam method would have to be used.
> 
> matt.
> 

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

Mime
View raw message