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]