Hello,


I would like to know if anybody used cocoon for transforming big XML files and which were the tunings to be made in order to make performance acceptable.

My case: I do a little digital library projet; among the books in this online library, I have a Bible in TEI format which I present to the reader as a nicely formatted HTML with a tree-like table of contents on the left side, navigation buttons (previous/next) etc.

The Bible is no little book, that is true, but the performance is terrible. In order to "suck out" the static version I use "wget -m http://my.local.cocoon.instalation:8080/cocoon/..."; (I publish a static version online, not the Cocoon dynamic one as I don't have free Cocoon hosting) --- generating all the HTML little files for that Bible may take a day.

I does work ok for smaller works like novels, poetry books. The Bible includes all its chapters as entities. Please feel free to ask for more information, if you need it.

I'll paste at the end of this mail my transformation sitemap, in case anybody has any ideas.
Thanks in advance for your ideas.




Here is my sitemap.xmap:

<?xml version="1.0" encoding="UTF-8"?>
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0";>
<!--

   Fisier sitemap pentru scriptorium/carti
   Adrian Petru Dimulescu, 2001, 2002

-->
<map:components>
<map:serializers default="html">
<map:serializer logger="sitemap.serializer.xml" mime-type="text/xml" name="xml-utf-8" src="org.apache.cocoon.serialization.XMLSerializer">
<encoding>utf-8</encoding>
</map:serializer>
<map:serializer logger="sitemap.serializer.fo2pdf" mime-type="application/pdf" name="fo2pdf" src="org.apache.cocoon.serialization.FOPSerializer">
<user-config>../WEB-INF/conf/fop-config.xml</user-config>
</map:serializer>
</map:serializers>
<map:transformers default="xslt"/>
<map:readers default="resource"/>
<map:matchers default="wildcard"/>
<map:selectors default="browser"/>
</map:components>
<map:views/>
<map:resources/>
<map:action-sets/>


<map:pipelines>
<map:pipeline type="caching">



<!-- little HTML containing "previous chapter", "next chapter", "up" for a chapter --> <map:match pattern="**.cap*.navigation.xml"> <map:generate src="resources/{1}.xml"/> <map:transform src="stylesheets/util/navigation-links.xsl" > <map:parameter name="select" value="{2}" /> </map:transform> <map:serialize type="xml" /> </map:match>

<!-- little HTML containing "previous chapter", "next chapter", "up" -->
<map:match pattern="**/*.navigation.html">
<map:generate src="cocoon:/{1}/{2}.navigation.xml"/>
<map:transform src="stylesheets/teixsl-html/navigation-links-html.xsl" >
<map:parameter name="basename" value="{2}" />
</map:transform>
<map:serialize type="html" />
</map:match>


<!-- tree representation of the outline of the given subdiv.
Should be fed to an XLoadTree -->
<map:match pattern="**-tree.cap*.xml">
<map:generate src="cocoon:/{1}.cap{2}.xml"/>
<map:transform src="stylesheets/tei-tree.xsl">
<map:parameter name="target" value="{1}"/>
<map:parameter name="select" value="{2}"/>
</map:transform>
<map:serialize type="xml"/>
</map:match>


<!-- HTML rendering of the tree representation of the outline of the given subdiv
(usable as a fallback for browsers not supporting XLoadTree) -->
<map:match pattern="**-tree.cap*.html">
<map:generate src="cocoon:/{1}-tree.cap{2}.xml"/>
<map:transform src="stylesheets/teitree2html.xsl">
<map:parameter name="location" value="{1}"/>
<map:parameter name="select" value="{2}"/>
</map:transform>
<map:serialize type="html"/>
</map:match>


  <!-- the xml original of a chapter -->
  <map:match pattern="**.cap*.xml">
   <map:generate src="cocoon:/{1}.xml"/>
   <map:transform src="stylesheets/select-subchapter.xsl">
    <map:parameter name="select" value="{2}" />
   </map:transform>
   <map:serialize type="xml"/>
  </map:match>

<!-- HTML for print -->
<map:match pattern="**-text-print.html">
<map:generate src="cocoon:/{1}.xml"/>
<map:transform src="stylesheets/tei2html-print.xsl">
<map:parameter name="page-width" value="100%"/>
<map:parameter name="show-feedback" value="no"/>
</map:transform>
<map:serialize type="html"/>
</map:match>
<!-- all the text rendered. This should never happen,
it may be dangerous for big texts -->
<map:match pattern="**/*-text.html">
<map:redirect-to uri="{2}-text.cap.html" />
</map:match>


           <!-- decorates an HTML text  withe navigation bars etc. -->
  <map:match pattern="**-text.cap*.decorated.html">
    <map:aggregate element="root">
      <map:part element="top" src="cocoon:/{1}.cap{2}.navigation.html" />
      <map:part element="body" src="cocoon:/{1}-text.cap{2}.html" />
    </map:aggregate>
    <map:transform src="stylesheets/teixsl-html/decorate-html.xsl" />
    <map:serialize type="html"/>
  </map:match>

           <!-- render in HTML a div of the TEI document -->
  <map:match pattern="**/*-text.cap*.html">
   <map:generate src="cocoon:/{1}/{2}.cap{3}.xml"/>
   <map:transform src="stylesheets/tei2html.xsl">
    <map:parameter name="page-width" value="100%"/>
    <map:parameter name="select" value="{3}" />
    <map:parameter name="self-basename" value="{1}/{2}" />
   </map:transform>
   <map:serialize type="html"/>
  </map:match>

<!-- pdf version of a TEI XML book -->
<map:match pattern="**.pdf">
<map:generate src="cocoon:/{1}.xml"/>
<map:transform src="stylesheets/teixsl-fo/fo/tei.xsl"/>
<map:serialize type="fo2pdf"/>
</map:match>
<!-- fo (formatting objects) version of a TEI XML book -->
<map:match pattern="**.fo">
<map:generate src="cocoon:/{1}.xml"/>
<map:transform src="stylesheets/teixsl-fo/fo/tei.xsl"/>
<map:serialize type="xml"/>
</map:match>
<!-- generates a frame containing on the left the chapter toc tree and
on the right the actual text (explorer-like) -->
<map:match pattern="**-cadru.html">
<map:generate src="cocoon:/{1}.xml"/>
<map:transform src="stylesheets/util/cadru-html.xsl">
<map:parameter name="location" value="{1}"/>
<map:parameter name="split-level" value="1"/>
</map:transform>
<map:serialize/>
</map:match>
<!-- the TEI header as HTML -->
<map:match pattern="**-header.html">
<map:generate src="cocoon:/{1}.xml"/>
<map:transform src="stylesheets/tei-header-html.xsl">
<map:parameter name="location" value="{1}"/>
</map:transform>
<map:serialize/>
</map:match>
<!-- TEI text/front as html -->
<map:match pattern="**-front.html">
<map:generate src="cocoon:/{1}.xml"/>
<map:transform src="stylesheets/tei-front-html.xsl">
<map:parameter name="location" value="{1}"/>
</map:transform>
<map:serialize/>
</map:match>
<!-- the XLoadTree html/js version of the toc tree of a div -->
<map:match pattern="**-nav.html">
<map:generate src="cocoon:/{1}.xml"/>
<map:transform src="stylesheets/util/nav-html.xsl">
<map:parameter name="location" value="{1}"/>
<map:parameter name="split-level" value="1"/>
</map:transform>
<map:serialize/>
</map:match>


<!-- outline of the document in XML -->
<map:match pattern="**-tree.xml">
<map:generate src="cocoon:/{1}.cap.xml"/>
<map:transform src="stylesheets/tei-tree.xsl">
<map:parameter name="target" value="{1}"/>
<map:parameter name="split-level" value="1"/>
</map:transform>
<map:serialize type="xml">
<map:parameter name="encoding" value="UTF-8" />
</map:serialize>
</map:match>


<!-- the toc as HTML, no js, plain simple html -->
<map:match pattern="**-tree.html">
<map:generate src="cocoon://scriptorium/carti/{1}-tree.xml"/>
<map:transform src="stylesheets/teitree2html.xsl">
<map:parameter name="location" value="{1}"/>
<map:parameter name="split-level" value="1"/>
</map:transform>
<map:serialize type="html"/>
</map:match>
<!-- don't know what this is -->
<map:match pattern="**-tree-split*.xml">
<map:generate src="cocoon://scriptorium/carti/{1}.xml"/>
<map:transform src="stylesheets/tei-tree.xsl">
<map:parameter name="target" value="{1}-text.html"/>
<map:parameter name="split-level" value="{2}"/>
</map:transform>
<map:serialize type="xml"/>
</map:match>


<!-- fallback pattern for an HTML request which does not specify the format -->
<map:match pattern="**.html">
<map:read src="cocoon://scriptorium/carti/{1}-text.html"/>
</map:match>
<map:match pattern="**.shtml">
<map:read mime-type="text/html" src="resources/{1}.html"/>
</map:match>
<map:match pattern="**.xml">
<map:generate src="resources/{1}.xml"/>
<map:serialize type="xml"/>
</map:match>



<!-- Reguli pentru fisierele statice --> <map:match pattern="share/**.js"> <map:read mime-type="application/x-javascript" src="share/{1}.js"/> </map:match> <map:match pattern="share/**.css"> <map:read mime-type="text/css" src="share/{1}.css"/> </map:match> <map:match pattern="share/**.jpg"> <map:read mime-type="image/jpeg" src="share/{1}.jpg"/> </map:match> <map:match pattern="share/**.png"> <map:read mime-type="image/png" src="share/{1}.png"/> </map:match> <map:match pattern="share/**.gif"> <map:read mime-type="image/gif" src="share/{1}.gif"/> </map:match>

           <!-- Reguli pentru fisierele oferit la download -->
  <map:match pattern="download/**.chm">
   <map:read mime-type="application/mshelp" src="download/{1}.chm"/>
  </map:match>

<!-- redirectii -->
<map:match pattern="">
<map:redirect-to uri="../listacartilor.html"/>
</map:match>
</map:pipeline>
</map:pipelines>
</map:sitemap>



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to