You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Adrian Petru Dimulescu <ad...@free.fr> on 2002/05/19 20:44:09 UTC

slow xalan transformation

Hello,

I installed today a cvs cocoon on a Tomcat 4.0.3 / jdk 1.3.1_01 and it works 
fine if it weren't for the slow xslt transformation.

What do i mean by slow? 

I want to make HTML versions of Bible chapters. In order to do that, I have a 
main biblie.xml file which includes all its chapters using entities. I apply 
a stylesheet which simply selects a chapter and then another stylesheet which 
transforms this selection to HTML markup.

it should be said that the xml file (with its chapters) is no small xml file 
(it is the Bible after all).

the relevant sitemap.conf part:

   <map:match pattern="carti/**.html">
                <map:generate src="carti/resources/{1}.xml"/>
                <map:transform src="carti/stylesheets/tei-select-subdiv.xsl">
                  <map:parameter name="use-request-parameters" value="true"/>
                </map:transform>
            <map:transform src="carti/stylesheets/{1}-html.xsl"/>
                <map:serialize/>
   </map:match>


I measured the time it takes several xslt processors on my machine 
(Thunderbird 1.2 GHz, 250MB RAM) to isolate a chapter of the Bible (say, 
Genesis or Matthew)  

* xalan2 (Java):  40 seconds
* saxon6.5 (Java):  18 seconds
* xsltproc (C): 3 seconds !

Under jdk1.4 xalan is catastrophic: it takes more than 2 minutes to do this 
transformation.

Now, my question is: do you think these times are normal, do they include DTD 
validation and if they do how can I disable DTD validation?

Is there a Java solution to this problem (other than writing a TraxTransformer 
implementaion which would simply execute xsltproc?)

==
Thank you,
Adrian Petru Dimulescu.



* * *

PS: 
Here is a sketch of the biblie.xml:

<?xml version="1.0" encoding="iso-8859-2" ?> 
<!DOCTYPE TEI.2 PUBLIC "-//TEI//DTD TEI Lite XML ver. 1//EN"
"/home/dadi/xml/dtds/tei/myPizza.dtd" [
<!-- Vechiul Testament -->

<!ENTITY facerea 	SYSTEM "capitole/facerea.xml">
<!ENTITY iesirea 	SYSTEM "capitole/iesirea.xml">
<!-- ... and all the other chapter here ... -->

<TEI.2>
<text>
<body>
<div0 type="parte" id="vt" n="1">
<head>Vechiul Testament</head>

&facerea;
&iesirea;

<!-- ... and all the other chapters here ... -->
</div0>

</body>
</text>

</TEI.2>



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

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


Re: slow xalan transformation

Posted by KOZLOV Roman <r-...@opencascade.com>.
    It's possible to import/read documents encoded in "ISO-8859-1" (I put french
accented characters) and in "Windows-1251" (russian) into Xindice db. So I think
it is also possible for the latin2 documents - just set proper system locale and
xml encoding attribute. However it is not possible to use such characters in
xpath expressions for queries (queries containing ASCII characters only works
fine even results contain different languages - it is UTF-8 always as well as
inside Xindice). I've read that it is because of CORBA restrictions.

Roman

Adrian Petru Dimulescu wrote:

> ... I am also having trouble with XIndice in what concerns the specific
> ISO-8859-2 characters. apparently, importing such a latin2 document into
> XIndice makes me lose those characters...
>
> On Monday 03 June 2002 15:47, KOZLOV Roman wrote:
> > Unfortunatelly, Xindice has a very hard restriction on queries: xpath
> > expression cann't contain non-ASCII characters.
> >
> > Roman
> >
> > Adrian Petru Dimulescu wrote:
> > > > I installed today a cvs cocoon on a Tomcat 4.0.3 / jdk 1.3.1_01 and it
> > > > works fine if it weren't for the slow xslt transformation.
> > >
> > > A bit late as self-response but here it goes: extracting sub-trees with
> > > XSLT is not really a sign of genius as long as tools as Xindice exist.
> > >
> > > so a native xml database solves the problem -- two second-average time
> > > per chapter extraction --- i'll play some more with indexes maybe it can
> > > get even better.
> > >
> > > and as if it weren't enough, XIndice is just perfectly integrated into
> > > Cocoon...
> > >
> > > ---------------------------------------------------------------------
> > > Please check that your question has not already been answered in the
> > > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> > >
> > > To unsubscribe, e-mail: <co...@xml.apache.org>
> > > For additional commands, e-mail: <co...@xml.apache.org>
> >
> > ---------------------------------------------------------------------
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> >
> > To unsubscribe, e-mail: <co...@xml.apache.org>
> > For additional commands, e-mail: <co...@xml.apache.org>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>


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

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


Re: slow xalan transformation

Posted by Adrian Petru Dimulescu <ad...@free.fr>.
... I am also having trouble with XIndice in what concerns the specific 
ISO-8859-2 characters. apparently, importing such a latin2 document into 
XIndice makes me lose those characters...


On Monday 03 June 2002 15:47, KOZLOV Roman wrote:
> Unfortunatelly, Xindice has a very hard restriction on queries: xpath
> expression cann't contain non-ASCII characters.
>
> Roman
>
> Adrian Petru Dimulescu wrote:
> > > I installed today a cvs cocoon on a Tomcat 4.0.3 / jdk 1.3.1_01 and it
> > > works fine if it weren't for the slow xslt transformation.
> >
> > A bit late as self-response but here it goes: extracting sub-trees with
> > XSLT is not really a sign of genius as long as tools as Xindice exist.
> >
> > so a native xml database solves the problem -- two second-average time
> > per chapter extraction --- i'll play some more with indexes maybe it can
> > get even better.
> >
> > and as if it weren't enough, XIndice is just perfectly integrated into
> > Cocoon...
> >
> > ---------------------------------------------------------------------
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> >
> > To unsubscribe, e-mail: <co...@xml.apache.org>
> > For additional commands, e-mail: <co...@xml.apache.org>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>


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

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


Re: slow xalan transformation

Posted by KOZLOV Roman <r-...@opencascade.com>.
Unfortunatelly, Xindice has a very hard restriction on queries: xpath expression
cann't contain non-ASCII characters.

Roman

Adrian Petru Dimulescu wrote:

> > I installed today a cvs cocoon on a Tomcat 4.0.3 / jdk 1.3.1_01 and it
> > works fine if it weren't for the slow xslt transformation.
>
> A bit late as self-response but here it goes: extracting sub-trees with XSLT
> is not really a sign of genius as long as tools as Xindice exist.
>
> so a native xml database solves the problem -- two second-average time per
> chapter extraction --- i'll play some more with indexes maybe it can get even
> better.
>
> and as if it weren't enough, XIndice is just perfectly integrated into
> Cocoon...
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>


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

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


Re: slow xalan transformation

Posted by Adrian Petru Dimulescu <ad...@free.fr>.
> I installed today a cvs cocoon on a Tomcat 4.0.3 / jdk 1.3.1_01 and it
> works fine if it weren't for the slow xslt transformation.

A bit late as self-response but here it goes: extracting sub-trees with XSLT 
is not really a sign of genius as long as tools as Xindice exist.

so a native xml database solves the problem -- two second-average time per 
chapter extraction --- i'll play some more with indexes maybe it can get even 
better.

and as if it weren't enough, XIndice is just perfectly integrated into 
Cocoon...


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

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