Scanning the entire bible to pick a chapter seems very
wasteful. If you never serve more than one chapter, why
not store the chapters separately?

[EMAIL PROTECTED]
Author of Soap Programming with Java - Sybex; ISBN: 0782129285



> -----Original Message-----
> From: Adrian Petru Dimulescu [mailto:[EMAIL PROTECTED]] 
> Sent: Sunday, May 19, 2002 2:44 PM
> To: [EMAIL PROTECTED]
> Subject: 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: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to