cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Petru Dimulescu <>
Subject slow xalan transformation
Date Sun, 19 May 2002 18:44:09 GMT

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 src="carti/stylesheets/{1}-html.xsl"/>

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 

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.

* * *

Here is a sketch of the biblie.xml:

<?xml version="1.0" encoding="iso-8859-2" ?> 
"/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 ... -->

<div0 type="parte" id="vt" n="1">
<head>Vechiul Testament</head>


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



Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message