cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niaz Tadayyon <niaz.taday...@gmail.com>
Subject DocBook XML conversion to HTML/PDF format in Cocoon
Date Mon, 27 Sep 2004 13:54:40 GMT
Hi

Please help me to find the correct path. I would like to convert
Docbook XML to PDF/HTML in cocoon & use these format later in Dspace.

I've followed the Entity resolution for catalogs from
http://cocoon.apache.org/2.0/userdocs/concepts/catalog.html. we use
this entity file known as
dbmmlsvg.dtd and two public & system identifier 
PUBLIC "-//POLYMTL//DTD DocBook MathML SVG Module V1.0//EN"
"http://www.info.polymtl.ca/~nipil/dbmmlsvg/dbmmlsvg.dtd
in our project. 

so I created folder named "dspace-cocoon" in cocoon & I copy
dbmmlsvg.dtd and dbmmlsvg.cat in there that just contains PUBLIC
"-//POLYMTL//DTD DocBook MathML SVG Module V1.0//EN"   " dbmmlsvg.dtd"
. Then in COCOON_HOME/webapp/resources/entities/CatalogManager.properties
 I added these parameters :
catalogs=/<PATH>/dbmmlsvg.cat 
prefer=public 
catalog-class-name=org.apache.xml.resolver.Resolver 
verbosity=3 

Also I create a sitemap.xmap that has two pipelines like that 
<?xml version="1.0" encoding="iso-8859-1"?> 
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0"> 

   <!-- define the Cocoon processing pipelines --> 
   <map:pipelines> 
       <map:pipeline> 
               <map:match pattern="*.html"> 
               <map:generate src="{1}.xml"/> 
               <map:transform
src="/docbook/docbook-xsl/docbook-xsl-1.65.1/html/docbookl.xsl"/>
               <map:serialize type="html"/> 
           </map:match> 

               <map:match pattern="*.pdf"> 
               <map:generate src="{1}.xml"/> 
               <map:transform
src="/docbook/docbook-xsl/docbook-xsl-1.65.1/fo/docbookl.xsl"/>
               <map:serialize type="fo2pdf"/> 
           </map:match> 
       </map:pipeline> 
   </map:pipelines> 
</map:sitemap> 

At the end I have xml file named dbsvgmml.xml 

<?xml version="1.0" encoding="ISO-8859-1" ?> 
<!DOCTYPE book PUBLIC "-//POLYMTL//DTD DocBook MathML SVG Module
V1.0//EN" "http://www.info.polymtl.ca/~nipil/dbmmlsvg/dbmmlsvg.dtd">
<book> 
    <bookinfo> 
        <title>Hello, world</title> 
    </bookinfo> 
    <chapter> 
        <title>Hello, world</title> 
        <para>Pouet</para> 
        <para> 
            <mediaobject> 
                <imageobject> 
                    <svg:svg width="450" height="450" viewBox="0 0 450 450"> 
                        <svg:g style="fill-opacity:0.7; stroke:black;
stroke-width:0.1cm;">
                            <svg:circle cx="6cm" cy="2cm" r="100"
style="fill:red;" transform="translate(0,50)" />
                            <svg:circle cx="6cm" cy="2cm" r="100"
style="fill:blue;" transform="translate(70,150)" />
                            <svg:circle cx="6cm" cy="2cm" r="100"
style="fill:green;" transform="translate(-70,150)"/>
                        </svg:g> 
                    </svg:svg> 
                 </imageobject> 
            </mediaobject> 
        </para> 
        <para>graphics and equations</para> 
        <para> 
            <equation> 
                <mml:math> 
                    <mml:mrow> 
                        <mml:mo>&sum;</mml:mo> 
                        <mml:mn>4</mml:mn> 
                        <mml:mo>+</mml:mo> 
                        <mml:mi>x</mml:mi> 
                    </mml:mrow> 
                </mml:math> 
            </equation> 
        </para> 
    </chapter> 
</book> 



Now, I'm not sure if I've done right. There are some problems. when I
open http://localhost:8888/dspace-cocoon, there is nothing to see.
Then when I go to
http://localhost:8888/dspace-cocoon/dbsvgmml.html after a long time(
It takes too much time!) I see the html result with mathematics
formula, but no svg circles.
In pdf version I got error about pipeline. 

could you help me If I'm in a right path and why I dont see svg? 
Also why in http://localhost:8888/dspace-cocoon there is nothing. At
the end, Do you now any references to help to hook these HTML/PDF file
from Dspace? if you are familiar with Dspace

thanks so much 
Niaz

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message