cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Crossley <>
Subject Re: conversion Docbook XML to HTML/PFD
Date Tue, 28 Sep 2004 01:31:16 GMT
Niaz Tadayyon wrote:
> 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.

You have not told us what version of Cocoon you use.
Looking at the following URL, i guess 2.0 ... is that correct?

> I've followed the Entity resolution for catalogs from
> we use
> this entity file known as
> dbmmlsvg.dtd and two public & system identifier 
> PUBLIC "-//POLYMTL//DTD DocBook MathML SVG Module V1.0//EN"
> "
> in our project. 
> so I created folder named "dspace-cocoon" in cocoon & I copy
> dbmmlsvg.dtd and in there that just contains PUBLIC
> "-//POLYMTL//DTD DocBook MathML SVG Module V1.0//EN"   " dbmmlsvg.dtd"
> . Then in COCOON_HOME/webapp/resources/entities/
>  I added these parameters :
> catalogs=/<PATH>/ 
> prefer=public 
> catalog-class-name=org.apache.xml.resolver.Resolver 
> verbosity=3 

You do not need to set the "catalog-class-name".

Are you seeing messages from the entity resolver when
Cocoon starts and for each file that it processes?
If not, then your configuration is not correct.

However, the entity resolver is only providing access
to local copies of the DTDs. As long as you have network
access, then Cocoon should just get the remote copy of
the DTD from the network URL. Slow of course.

Does your DTD refer to other DocBook DTDs?

> Also I create a sitemap.xmap that has two pipelines like that 
> <?xml version="1.0" encoding="iso-8859-1"?> 
> <map:sitemap xmlns:map=""> 
>    <!-- 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" "">
> <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.

What do you expect to see? The Sitemap that you have
provided does not handle that, but perhaps you just
provided us a tiny snippet of your sitemap.

> 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.

I suggest that you start with normal DocBook files
(without any SVG) to get that working first.

Sorry, i do not know anything about SVG embedded in DocBook.
I wonder if you need to get Cocoon to dissect the source file,
generate and serialise the SVG parts, then aggregate it again.


> 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:
For additional commands, e-mail:

View raw message