You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Julius Lerm <jl...@us.ibm.com> on 2007/02/28 22:02:12 UTC

XSLTC and Coccon

Is there a way of incorporating into a Cocoon map translets compiled 
outside of Cocoon via XSLTC command line?
Thanks,
Julius Lerm

Re: XSLTC and Coccon

Posted by Mark Lundquist <lu...@gmail.com>.
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


Re: XSLTC and Coccon

Posted by Julius Lerm <jl...@us.ibm.com>.
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?

Please let me know if you need further clarification.

-j





"Steven D. Majewski" <sd...@virginia.edu> 
02/28/2007 03:10 PM
Please respond to
users@cocoon.apache.org


To
users@cocoon.apache.org
cc

Subject
Re: XSLTC and Coccon







On Feb 28, 2007, at 4:02 PM, Julius Lerm wrote:

>
> Is there a way of incorporating into a Cocoon map translets 
> compiled outside of Cocoon via XSLTC command line?
> Thanks,
> Julius Lerm

I don't understand this question, and, off the top of
my head, I can think of at least 2 very different things
you might be asking. Could you try to be a little more explicit?

-- Steve Majewski


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



Re: XSLTC and Coccon

Posted by "Steven D. Majewski" <sd...@virginia.edu>.
On Feb 28, 2007, at 4:02 PM, Julius Lerm wrote:

>
> Is there a way of incorporating into a Cocoon map translets  
> compiled outside of Cocoon via XSLTC command line?
> Thanks,
> Julius Lerm

I don't understand this question, and, off the top of
my head, I can think of at least 2 very different things
you might be asking. Could you try to be a little more explicit?

-- Steve Majewski


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