cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Lundquist <lundquist.m...@gmail.com>
Subject Re: XSLTC and Coccon
Date Thu, 01 Mar 2007 02:39:43 GMT

On Feb 28, 2007, at 1:38 PM, Julius Lerm wrote:

>
> Let's say i have a stylesheet named "sample.xsl":
>
> 1) First, I compile "sample.xsl" into a java class using Apache 
> Xalan's XSLTC with a command like:
>
>         java org.apache.xalan.xsltc.cmdline.Compile -d sampleDir -j 
> sample.jar -p sampleTest sample.xsl
>
> The above should create, from "sample.xsl", a jar file "sample.jar" 
> containing a class "sample.class".
>
> 2) Then I would like to use that "sample.class" as a transformer in a 
> Cocoon map.
>         Instead of pointing to the sample.xsl, I would point to the 
> class that "sample.xsl" was compiled into, namely "sample.class".
>
> This would allow me to ship to the customer the compiled stylesheet, 
> instead of the original XSL source code.
>
> Is this possible at all in the latest version of Cocoon?

XLSTC has what you need for invoking a precompiled translet, see the 
'use-classpath' and 'translet-name' attributes:

	http://xml.apache.org/xalan-j/commandline_xsltc.html#trax

But I think in Cocoon, all the TransformerFactory stuff is hidden by 
Excalibur's XSLTProcessor class :-/

—ml—


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message