No, it's not what I mean. I'm sorry that I didn't explain it clear enough.

For XSL, it can be declared to accept parameter. (not parameter to XSLT
services but 'parameter for the transformation')
        e.g. <xsl:param name="parametername">parametervalue</xsl:param>
In java, it's implemented by using the setParameter method of a Transformer.

I've checked the API doc and source code of the TurbineXSLTService.java and
the class doesn't implement that feature. So, I'm now modifying the java and
I'll send you the updated source code once I've finished testing.

Regards,
mingfai



-----Original Message-----
From: Leon Messerschmidt [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 01, 2001 5:24 PM
To: [EMAIL PROTECTED]
Subject: Re: XSLTService takes parameter


Yes,  the XSLTService takes the xsl name of the first parameter.  The actual
.xsl file is loaded from the xsl directory specified in the TR.properties.

The .xsl file is compiled into a memory format with Xalan.  If caching is
switched on (see the TR.properties) the compiled version will be used for
all subsequent transformations.  This improves performance a lot.

~ Leon


----- Original Message -----
From: "Ming Fai" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 01, 2001 10:15 AM
Subject: XSLTService takes parameter


> Could XSLTService take a parameter for XSLT during transformation?  I use
> jsp and my page can create a html string, but my requirement is to pass in
a
> parameter to the myXSL.xsl stylesheet. Does XSLTService support this
> function?
>
> <%@ page
>
import="java.io.File,java.io.FileReader,org.apache.turbine.services.xslt.Tur
> bineXSLT"%>
> <%
>  File f = new File("../myXML.xml");    file://make a file obj for checking
file
> existence, i.e. get f.exists()
>  FileReader fr = new FileReader(f) ;
> %>
> <html>
> <body>
> <%=TurbineXSLT.transform("myXSL.xsl",fr)%>
> </body>
> </html>
>
> regards,
> mingfai
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to