You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Ernst de Haan <zn...@FreeBSD.org> on 2002/06/19 09:06:30 UTC

DocBook anyone?

Hi,

Does anyone have an example of a DocBook document and an Ant build file to 
convert that DocBook document to HTML or PDF or RTF or whatever ?

Ernst

-- 
Ernst de Haan
EuroNet Internet B.V.

    "Come to me all who are weary and burdened
        and I will give you rest" -- Jesus Christ

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: DocBook anyone?

Posted by Ernst de Haan <er...@nl.euro.net>.
I already have this working. I can now convert:

   DocBook --> HTML
   DocBook --> XHTML with inline CSS
   DocBook --> XSL:FO
   DocBook --> PDF

Working on conversion to RTF at the moment. I use xsltproc instead of the 
<style /> task because it's much more stable and a lot faster. Snippet from 
my build.xml:

   <target name="docbook-fo" depends="prepare">
      <exec executable="xsltproc">
         <arg value="-o" />
         <arg value="build/primer.fo"/>
         <arg value="${user.home}/docbook-xsl-1.51.1/fo/docbook.xsl" />
         <arg value="src/doc/primer.xml" />
      </exec>
   </target>

   <target name="docbook-pdf" depends="docbook-fo">
      <exec executable="${user.home}/fop-0.20.4rc/fop.sh">
         <arg value="build/primer.fo" />
         <arg value="build/primer.pdf" />
      </exec>
   </target>


Ernst


On Wednesday 19 June 2002 14:11, David Jencks wrote:
> The jboss free manual, in sourceforge cvs under "manual" is one, I think
> you may need to check out tools and thirdparty also.  html works, I think
> the pdf may have problems.
>
> The firebird "manual" (only one chapter :-((() is a clone of this, but may
> have a more self contained build system, on sourceforge also under manual.
> Both html and pdf work to some extent.
>
> david jencks
>
> On 2002.06.19 03:06:30 -0400 Ernst de Haan wrote:
> > Hi,
> >
> > Does anyone have an example of a DocBook document and an Ant build file
> > to
> > convert that DocBook document to HTML or PDF or RTF or whatever ?
> >
> > Ernst
> >
> > --
> > Ernst de Haan
> > EuroNet Internet B.V.
> >
> >     "Come to me all who are weary and burdened
> >         and I will give you rest" -- Jesus Christ
> >
> > --
> > To unsubscribe, e-mail:  
> > <ma...@jakarta.apache.org> For additional commands,
> > e-mail: <ma...@jakarta.apache.org>

-- 
Ernst de Haan
EuroNet Internet B.V.

    "Come to me all who are weary and burdened
        and I will give you rest" -- Jesus Christ

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: DocBook anyone?

Posted by David Jencks <da...@directvinternet.com>.
The jboss free manual, in sourceforge cvs under "manual" is one, I think
you may need to check out tools and thirdparty also.  html works, I think
the pdf may have problems.

The firebird "manual" (only one chapter :-((() is a clone of this, but may
have a more self contained build system, on sourceforge also under manual. 
Both html and pdf work to some extent.

david jencks

On 2002.06.19 03:06:30 -0400 Ernst de Haan wrote:
> Hi,
> 
> Does anyone have an example of a DocBook document and an Ant build file
> to 
> convert that DocBook document to HTML or PDF or RTF or whatever ?
> 
> Ernst
> 
> -- 
> Ernst de Haan
> EuroNet Internet B.V.
> 
>     "Come to me all who are weary and burdened
>         and I will give you rest" -- Jesus Christ
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> 
> 

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: DocBook anyone?

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Stefan Bodewig wrote:
>>A slightly hacked ant 1.4.1 works with Saxon instead of
>>Xalan+Xerces. It would be worth a try whether ant 1.5b
>>will work with Saxon out of the box.
> 
> 
> What kind of hack has been involved?

Replacing SAX1 by SAX2 interfaces. IIRC:
   Parser->XMLReader
   DocumentHandler -> ContentHandler
   update startElement and endElement methods
   AttributeList->Attributes
   perhaps using JAXP for obtaining the XMLReader
   object, don't remember.
It was rather mechanical S&R, roughly 20min of work.

> Ant 1.5 is supposed to work with AElfred (instead of Xerces), I'm not
> sure about Saxon.  Newer Saxon releases implement TraX, so <style>
> should work with them, but for older ones ...  Have you written a
> Liaison class of your own?

No. After I changed the interfaces above, any Saxon more recent
than some 5.x, available for one and a half year now, ran out of
the box. Current stable release is 6.5.2, using older releases
is discouraged anyway because of standards conformants problems
and/or severe bugs. It should run with Xerces too, but I didn't
try this in this context.

Does Ant1.5 use DOM? If so, remember that the DOM implementation
coming with Saxon is read-only.
Furthermore, the AElfred delivered with Saxon does not like changes
in the defaults, no possibility to disable namespace support, and
no possibility to turn on validation.

J.Pietschmann


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: DocBook anyone?

Posted by Stefan Bodewig <bo...@apache.org>.
On Wed, 19 Jun 2002, J. Pietschmann <j3...@yahoo.de> wrote:
> Stefan Bodewig wrote:
>> Be warned that it may be difficult to find a combination of Xerces
>> and Xalan that actually works ...
> 
> A slightly hacked ant 1.4.1 works with Saxon instead of
> Xalan+Xerces. It would be worth a try whether ant 1.5b
> will work with Saxon out of the box.

What kind of hack has been involved?

Ant 1.5 is supposed to work with AElfred (instead of Xerces), I'm not
sure about Saxon.  Newer Saxon releases implement TraX, so <style>
should work with them, but for older ones ...  Have you written a
Liaison class of your own?

Stefan

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: DocBook anyone?

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Stefan Bodewig wrote:
> Be warned that it may be difficult to find a combination of Xerces and
> Xalan that actually works ...

A slightly hacked ant 1.4.1 works with Saxon instead of
Xalan+Xerces. It would be worth a try whether ant 1.5b
will work with Saxon out of the box. Saxon is usually
very successful for transforming DocBook documents.

J.Pietschmann


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: DocBook anyone?

Posted by Stefan Bodewig <bo...@apache.org>.
On Wed, 19 Jun 2002, Ernst de Haan <zn...@FreeBSD.org> wrote:

> Does anyone have an example of a DocBook document and an Ant build
> file to convert that DocBook document to HTML or PDF or RTF or
> whatever ?

Be warned that it may be difficult to find a combination of Xerces and
Xalan that actually works ...

    <style basedir="${docbook.src}"
           destdir="${docs.html}"
           style="/usr/share/sgml/docbook/xsl-stylesheets-1.50/xhtml/docbook.xsl">
      <include name="*.dbx" />
    </style>

simple as that for XML -> HTML.  You'd specify extension as well if
the output is not .html.

Stefan

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: DocBook anyone?

Posted by Derek Dees <dj...@mm.com>.
E. -

Here's the build file I use. Right now, each document is separate to get 
around the Xalan bug. It's not pretty, but it works.





Derek
djdees@mm.com
http://www.mm.com/user/djdees

Sarchasm: The gulf between the author of sarcastic wit and the person who 
doesn't get it.