cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vadim.gritse...@verizon.net>
Subject RE: Transforming Big XML Files
Date Tue, 06 Aug 2002 18:01:19 GMT
> From: Alessandro Marcellini [mailto:amarcell@tiscalinet.it]
> 
> It seems that using your suggestions, it works ...
> But: why I can not use both Xalan and Saxon?
> It is a bug ... or what?

>From your exception stacktrace... Looks like bug. But I'm not sure what
causing it and were bug is: in xalan, saxon, xerces, ... And, according
to you, it happens only when transforming large files.

If you want, you can try and find this bug. It should not be too hard -
if it is well reproducible.

Vadim

 
> Vadim Gritsenko wrote:
> 
> > > From: Alessandro Marcellini [mailto:amarcell@tiscalinet.it]
> > >
> > > Vadim Gritsenko wrote:
> > >
> > > > > From: Alessandro Marcellini [mailto:amarcell@tiscalinet.it]
> > > > >
> > > > > Vadim Gritsenko wrote:
> > > > >
> > > > > > > From: Alessandro Marcellini
[mailto:amarcell@tiscalinet.it]
> > > > > > >
> > > > > > > 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:
> >
> > But for the debug purposes, can you try running cocoon with only one
> > xslt processor, saxon, to see what result will you get?
> >
> > Also, try adding to TOMCAT_OPTIONS:
> > -Djavax.xml.transform.TransformerFactory=com.icl.saxon.
> > TransformerFactoryImpl
> >
> > Vadim
> >
> > > 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:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message