You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Diana Shannon <sh...@apache.org> on 2002/06/19 14:05:01 UTC

[doc] DRAFT FAQ (was: Re: XSLT processor with different options)

Please check this draft FAQ based on Vadim's emails. I'll update the 
FAQs based on your feedback.

-- Diana

QUESTION
Can I use the same XSLT processor and still specify different options 
for different pipelines?
For example, I found that PDF is faster with XSLT Xalan processor when I 
specify the following:
  <parameter name="incremental-processing" value="false"/>

ANSWER
1. For version of Cocoon 2.0.3 and above, add one more xslt processor to 
cocoon.xconf, but give it another role. In the snippet below, the new 
role is 
"org.apache.cocoon.components.xslt.XSLTProcessor/NotIncremental". Note 
that the value "false" for incremental-processing parameter is also 
specified in this snippet.

<component
     role="org.apache.cocoon.components.xslt.XSLTProcessor/NotIncremental"
     class="org.apache.cocoon.components.xslt.XSLTProcessorImpl">
   <parameter name="use-store" value="true"/>
   <parameter name="incremental-processing" value="false"/>
</component>


2. Next, add one more xslt transformer component to the components 
declaration section of your sitemap.xmap file.

<map:components>
   ...
<map:transformers>

   <map:transformer
     name="xslt-notinc"
     src="org.apache.cocoon.transformation.TraxTransformer"
     logger="sitemap.transformer.xslt"
     pool-max="32" pool-min="8" pool-grow="2">
     <use-request-parameters>false</use-request-parameters>
     <use-browser-capabilities-db>false</use-browser-capabilities-db>
     <use-deli>false</use-deli>
     <xslt-processor-
role>org.apache.cocoon.components.xslt.XSLTProcessor/NotIncremental</xslt-processor-role>
</map:transformer>
...
</map:components>

3. Finally, in your pipeline, specify the xslt transformer you want to 
use by referring to its name in its type attribute.

    <map:match pattern="*.pdf">
     <map:generate src="docs/*.xml"/>
     <map:transform type="xslt-notinc" src="stylesheets/page2fo.xsl"/>
     <map:serialize type="fo2pdf"/>
    </map:match>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: [doc] DRAFT FAQ (was: Re: XSLT processor with different options)

Posted by Diana Shannon <sh...@apache.org>.
On Wednesday, June 19, 2002, at 08:05  AM, Diana Shannon wrote:

> 3. Finally, in your pipeline, specify the xslt transformer you want to 
> use by referring to its name in its type attribute.
>
>    <map:match pattern="*.pdf">
>     <map:generate src="docs/*.xml"/>

Oops, this should be
     <map:generate src="docs/{1}.xml"/>

-- Diana


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


RE: [doc] DRAFT FAQ (was: Re: XSLT processor with different options)

Posted by Vadim Gritsenko <va...@verizon.net>.
> From: Diana Shannon [mailto:shannon@apache.org]
> 
> Please check this draft FAQ based on Vadim's emails. I'll update the
> FAQs based on your feedback.

Diana,

This FAQ also should help to those willing to use Xalan and SAXON
simultaneously (this was asked several says ago on the list).

This FAQ should work for Cocoon 2.0.1 up to 2.0.3. Answer for 2.1 will
be different.

Thanks for draft,

Vadim


> -- Diana
> 
> QUESTION
> Can I use the same XSLT processor and still specify different options
> for different pipelines?
> For example, I found that PDF is faster with XSLT Xalan processor when
I
> specify the following:
>   <parameter name="incremental-processing" value="false"/>
> 
> ANSWER
> 1. For version of Cocoon 2.0.3 and above, add one more xslt processor
to
> cocoon.xconf, but give it another role. In the snippet below, the new
> role is
> "org.apache.cocoon.components.xslt.XSLTProcessor/NotIncremental". Note
> that the value "false" for incremental-processing parameter is also
> specified in this snippet.
> 
> <component
>
role="org.apache.cocoon.components.xslt.XSLTProcessor/NotIncremental"
>      class="org.apache.cocoon.components.xslt.XSLTProcessorImpl">
>    <parameter name="use-store" value="true"/>
>    <parameter name="incremental-processing" value="false"/>
> </component>
> 
> 
> 2. Next, add one more xslt transformer component to the components
> declaration section of your sitemap.xmap file.
> 
> <map:components>
>    ...
> <map:transformers>
> 
>    <map:transformer
>      name="xslt-notinc"
>      src="org.apache.cocoon.transformation.TraxTransformer"
>      logger="sitemap.transformer.xslt"
>      pool-max="32" pool-min="8" pool-grow="2">
>      <use-request-parameters>false</use-request-parameters>
>      <use-browser-capabilities-db>false</use-browser-capabilities-db>
>      <use-deli>false</use-deli>
>      <xslt-processor-
>
role>org.apache.cocoon.components.xslt.XSLTProcessor/NotIncremental</xsl
t-
> processor-role>
> </map:transformer>
> ...
> </map:components>
> 
> 3. Finally, in your pipeline, specify the xslt transformer you want to
> use by referring to its name in its type attribute.
> 
>     <map:match pattern="*.pdf">
>      <map:generate src="docs/*.xml"/>
>      <map:transform type="xslt-notinc" src="stylesheets/page2fo.xsl"/>
>      <map:serialize type="fo2pdf"/>
>     </map:match>
 


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>