Vadim Gritsenko wrote:

> > From: Alessandro Marcellini [mailto:[EMAIL PROTECTED]]
> >
> > Vadim Gritsenko wrote:
> >
> > > > From: Alessandro Marcellini [mailto:[EMAIL PROTECTED]]
> > > >
> > > > Hi all,
> > > > I've a problem transforming big xml Files with Xalan or Saxon.
> > >
> > > How big are they?
> >
> > they are dinamically generated (XSP pages) so have variable sizes but
> one of
> > the biggest is 7017 KB
>
> I assume you have enough memory for transofmration (java -Xmx)?

I think so ... TOMCAT_OPTS=" -Xmx128m -Xms64m "


>
>
> > > > I'm using Cocoon2.0.3 with tomcat3.3a on a Red Hat 7.2.
> > > > So, using Xalan, C2 throws an exception (No more DTM available
> ....
> > > > Known problem of Xalan)
> > > > using Saxon C2 throws this strange exception:
> > > > Original exception : java.lang.ClassCastException:
> > > > com.icl.saxon.Controller at
> > > > org.apache.xalan.processor.TransformerFactoryImpl.
> > > > newTransformerHandler(TransformerFactoryImpl.java:670)
>
> This line look strange to me: why org.apache.xalan involved when you use
> saxon?
>
> Why don't you try without xalan in the classpath?

So, I like to use both:
I defined a component
"<component ... "
with:
<parameter name="transformer-factory"
value="com.icl.saxon.TransformerFactoryImpl"/>

." that uses Saxon in cocoon.xconf
and i defined another transformer (xslt-saxon) that calls this component
with:
"<xslt-processor-role>org.apache.cocoon.components.xslt.XSLTProcessor/Saxon</xslt-processor-role>"

In WEB-INF/lib there is saxon652.jar
Here are the coplete extracts of my cocoon.xconf and sitemap.xmap:

# cocoon.xconf
<component
    role="org.apache.cocoon.components.xslt.XSLTProcessor/Saxon"
    class="org.apache.cocoon.components.xslt.XSLTProcessorImpl"
    logger="core.xslt-processor">
  <parameter name="use-store" value="true"/>
  <parameter name="incremental-processing" value="false"/>
  <parameter name="transformer-factory"
value="com.icl.saxon.TransformerFactoryImpl"/>
</component>

# sitemap.xmap
<map:transformer name="xslt-saxon" pool-grow="2" pool-max="32" pool-min="8"
       src="org.apache.cocoon.transformation.TraxTransformer">
    <use-request-parameters>false</use-request-parameters>
    <use-browser-capabilities-db>false</use-browser-capabilities-db>

<xslt-processor-role>org.apache.cocoon.components.xslt.XSLTProcessor/Saxon</xslt-processor-role>

  </map:transformer>


>
>
> > > Does Saxon works for you on small files?
> >
> > Yes, It work's fine (really faster than Xalan).
>
> (same here).
>
> > > > So, what can I do?
> > > > I've to give up to transform big xml files?
> > > > (Note that there are no problems transforming this files using
> Xalan
> > > > or Saxon but commandline!!)
>
> (I failed once to transform 100Mb file using command line tool, instant
> saxon).
>
> Vadim
>
> > > > Bye & thanks
> > > >
> > > >     Alessandro
>
> ---------------------------------------------------------------------
> 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:     <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>


---------------------------------------------------------------------
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:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to