docbook-apps

  • 1.  Generating PDF from docbook on Linux (OSS)

    Posted 01-22-2010 16:26
    hi there,

    I am looking for tool that would generate PDF file from a docbook
    file. I tried a couple without success:

    - forgedp, does not process MathML 2.0 equation at all (no output!),
    - publican simply aborts on my machine (*)
    - xmlto fails not process MathML 2.0 equation (**),

    Document is simply:

    "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
    [



    "(alt?, (inlinegraphic+|inlinemediaobject+|mml:math))">
    "http://www.w3.org/Math/DTD/mathml2/mathml2.dtd">
    %mathml;]>

    <sect1 id="section_Description">

    <para>
    <equation>

    <mml:math>
    <mml:mrow>
    <mml:mo>∑</mml:mo>
    <mml:mn>4</mml:mn>
    <mml:mo>+</mml:mo>
    <mml:mi>x</mml:mi>
    </mml:mrow>
    </mml:math>
    </equation>
    </para>
    </sect1>



    Could someone please let me know what are the command line tool that
    should be used for this particular example (debian system) ? I am
    thinking of a sequence xstlproc then fop, but I did not find any
    definitive guide.

    Thanks,
    --
    Mathieu

    (*)
    http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=566271
    (**)
    $ xmlto --with-fop pdf /tmp/math.xml
    I/O error : Attempt to load network entity
    http://www.w3.org/Math/DTD/mathml2/mathml2.dtd
    /tmp/math.xml:12: warning: failed to load external entity
    "http://www.w3.org/Math/DTD/mathml2/mathml2.dtd"
    %mathml;
    ^
    Entity: line 1:
    %mathml;
    ^
    /tmp/math.xml:23: namespace error : Namespace prefix mml on math is not defined
    <mml:math>
    ^
    /tmp/math.xml:24: namespace error : Namespace prefix mml on mrow is not defined
    <mml:mrow>
    ^
    /tmp/math.xml:25: namespace error : Namespace prefix mml on mo is not defined
    <mml:mo>∑</mml:mo>
    ^
    /tmp/math.xml:26: namespace error : Namespace prefix mml on mn is not defined
    <mml:mn>4</mml:mn>
    ^
    /tmp/math.xml:27: namespace error : Namespace prefix mml on mo is not defined
    <mml:mo>+</mml:mo>
    ^
    /tmp/math.xml:28: namespace error : Namespace prefix mml on mi is not defined
    <mml:mi>x</mml:mi>
    ^
    Making portrait pages on letter paper (215.9mmx279.4mm)
    math encountered in equation, but no template matches.
    mrow encountered in math, but no template matches.
    mo encountered in mrow, but no template matches.
    mn encountered in mrow, but no template matches.
    mo encountered in mrow, but no template matches.
    mi encountered in mrow, but no template matches.
    Jan 22, 2010 5:19:00 PM org.apache.fop.hyphenation.Hyphenator getHyphenationTree
    SEVERE: Couldn't find hyphenation pattern en



  • 2.  Re: [docbook-apps] Generating PDF from docbook on Linux (OSS)

    Posted 01-22-2010 16:53
    Am Freitag, den 22.01.2010, 17:26 +0100 schrieb Mathieu Malaterre:

    > I am looking for tool that would generate PDF file from a docbook
    > file. I tried a couple without success:

    You can try dblatex too or xmlroff.

    But please allow me some words:

    > - xmlto fails not process MathML 2.0 equation (**),

    Nope. a) You missed to define the mml namespace. b) Fop doesn't come
    with MathML support by default. Let me explain:

    > Document is simply:
    [..]
    > <mml:math>

    You did not define the mml namespace anywhere. Please add an xmlns:mml
    attribute accordingly (to
    or the root element with the mml
    prefix). So these:

    > /tmp/math.xml:23: namespace error : Namespace prefix mml on math is
    > not defined
    > <mml:math>
    > ^
    [..]
    > math encountered in equation, but no template matches.

    disappear. Then to process the .fo file with Fop you can install the
    JEuclid FOP plugin [1][2].

    Then the resulting pdf contains your equation.

    [1] http://jeuclid.sourceforge.net/jeuclid-fop/index.html
    [2] packages.debian.org/libjeuclid-fop-java

    Regards, Daniel




  • 3.  Re: [docbook-apps] Generating PDF from docbook on Linux (OSS)

    Posted 01-22-2010 17:19
    Hi Daniel,

    On Fri, Jan 22, 2010 at 5:52 PM, Daniel Leidert
    <daniel.leidert.spam@gmx.net> wrote:
    > Am Freitag, den 22.01.2010, 17:26 +0100 schrieb Mathieu Malaterre:
    >
    >>   I am looking for tool that would generate PDF file from a docbook
    >> file. I tried a couple without success:
    >
    > You can try dblatex too or xmlroff.

    Indeed dblatex works ok.

    > But please allow me some words:
    >
    >> - xmlto fails not process MathML 2.0 equation (**),
    >
    > Nope. a) You missed to define the mml namespace. b) Fop doesn't come
    > with MathML support by default. Let me explain:
    >
    >> Document is simply:
    > [..]
    >> <mml:math>
    >
    > You did not define the mml namespace anywhere. Please add an xmlns:mml
    > attribute accordingly (to
    or the root element with the mml
    > prefix). So these:
    >
    >> /tmp/math.xml:23: namespace error : Namespace prefix mml on math is
    >> not defined
    >> <mml:math>
    >>          ^
    > [..]
    >> math encountered in equation, but no template matches.
    >
    > disappear. Then to process the .fo file with Fop you can install the
    > JEuclid FOP plugin [1][2].
    >
    > Then the resulting pdf contains your equation.
    >
    > [1] http://jeuclid.sourceforge.net/jeuclid-fop/index.html
    > [2] packages.debian.org/libjeuclid-fop-java

    Ok. Let's try again:

    $ fop -xsl /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl
    -xml /tmp/math.xml -pdf foo.pdf
    Jan 22, 2010 6:10:32 PM org.apache.fop.cli.InputHandler warning
    WARNING: javax.xml.transform.TransformerException: Making portrait
    pages on USletter paper (8.5inx11in)
    Jan 22, 2010 6:10:32 PM org.apache.fop.cli.InputHandler warning
    WARNING: javax.xml.transform.TransformerException: Read
    /usr/share/doc/docbook-xsl/README.Debian.gz section 5(a).
    Jan 22, 2010 6:10:33 PM org.apache.fop.fo.ElementMappingRegistry findFOMaker
    WARNING: Unknown formatting object http://www.w3.org/1998/Math/MathML^math
    Jan 22, 2010 6:10:33 PM org.apache.fop.fo.ElementMappingRegistry findFOMaker
    WARNING: Unknown formatting object http://www.w3.org/1998/Math/MathML^mrow
    Jan 22, 2010 6:10:33 PM org.apache.fop.fo.ElementMappingRegistry findFOMaker
    WARNING: Unknown formatting object http://www.w3.org/1998/Math/MathML^mo
    Jan 22, 2010 6:10:33 PM org.apache.fop.fo.ElementMappingRegistry findFOMaker
    WARNING: Unknown formatting object http://www.w3.org/1998/Math/MathML^mn
    Jan 22, 2010 6:10:33 PM org.apache.fop.fo.ElementMappingRegistry findFOMaker
    WARNING: Unknown formatting object http://www.w3.org/1998/Math/MathML^mo
    Jan 22, 2010 6:10:33 PM org.apache.fop.fo.ElementMappingRegistry findFOMaker
    WARNING: Unknown formatting object http://www.w3.org/1998/Math/MathML^mi
    Jan 22, 2010 6:10:33 PM org.apache.fop.hyphenation.Hyphenator getHyphenationTree
    SEVERE: Couldn't find hyphenation pattern en
    Jan 22, 2010 6:10:33 PM org.apache.fop.fo.flow.InstreamForeignObject
    prepareIntrinsicSize
    SEVERE: Intrinsic dimensions of instream-foreign-object could not be determined
    Jan 22, 2010 6:10:33 PM org.apache.fop.fo.flow.InstreamForeignObject
    prepareIntrinsicSize
    SEVERE: Intrinsic dimensions of instream-foreign-object could not be determined
    Jan 22, 2010 6:10:33 PM org.apache.fop.fo.flow.InstreamForeignObject
    prepareIntrinsicSize
    SEVERE: Intrinsic dimensions of instream-foreign-object could not be determined


    Using:

    $ apt-cache policy docbook-xsl
    docbook-xsl:
    Installed: 1.73.2.dfsg.1-5
    Candidate: 1.73.2.dfsg.1-5
    Version table:
    1.75.2+dfsg-3 0
    200 http://ftp.fr.debian.org testing/main Packages
    100 http://ftp.fr.debian.org unstable/main Packages
    *** 1.73.2.dfsg.1-5 0
    500 http://ftp.fr.debian.org lenny/main Packages
    100 /var/lib/dpkg/status

    $ apt-cache policy fop
    fop:
    Installed: 1:0.94.dfsg-2
    Candidate: 1:0.94.dfsg-2
    Version table:
    1:0.95.dfsg-7 0
    200 http://ftp.fr.debian.org testing/main Packages
    100 http://ftp.fr.debian.org unstable/main Packages
    *** 1:0.94.dfsg-2 0
    500 http://ftp.fr.debian.org lenny/contrib Packages
    100 /var/lib/dpkg/status

    $ apt-cache policy libjeuclid-fop-java
    libjeuclid-fop-java:
    Installed: 3.1.8-1
    Candidate: 3.1.8-1
    Version table:
    *** 3.1.8-1 0
    200 http://ftp.fr.debian.org testing/main Packages
    100 http://ftp.fr.debian.org unstable/main Packages
    100 /var/lib/dpkg/status


    Should I stop using fop, and instead switch to dblatex ? Which one is
    the more mature ? There is another tool on my debian box called
    docbook2pdf, which work ok with the xml file with the fix you
    suggested (*), should I start using it ? Should I switch to the new
    debian package docbook-xsl-ns ?

    Thanks again for your help !
    --
    Mathieu

    (*)

    "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
    [



    "(alt?, (inlinegraphic+|inlinemediaobject+|mml:math))">
    "http://www.w3.org/Math/DTD/mathml2/mathml2.dtd">
    %mathml;
    ]
    >

    <sect1 id="section_Description">

    <para>
    <equation>

    <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML">
    <mml:mrow>
    <mml:mo>∑</mml:mo>
    <mml:mn>4</mml:mn>
    <mml:mo>+</mml:mo>
    <mml:mi>x</mml:mi>
    </mml:mrow>
    </mml:math>
    </equation>
    </para>
    </sect1>




  • 4.  Re: [docbook-apps] Generating PDF from docbook on Linux (OSS)

    Posted 01-22-2010 18:15
    Am Freitag, den 22.01.2010, 18:19 +0100 schrieb Mathieu Malaterre:

    [..]
    > $ fop -xsl /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl
    > -xml /tmp/math.xml -pdf foo.pdf
    [..]
    > Jan 22, 2010 6:10:33 PM org.apache.fop.fo.ElementMappingRegistry findFOMaker
    > WARNING: Unknown formatting object http://www.w3.org/1998/Math/MathML^math

    SAee the first URL I gave you. You must "add" the JEclid jars to the fop
    script. It probably also works be extending classpath and calling fop
    via java.

    Tested successfully locally on my Sid system.

    Regards, Daniel




  • 5.  Re: [docbook-apps] Generating PDF from docbook on Linux (OSS)

    Posted 01-23-2010 15:41
    Am Freitag, den 22.01.2010, 19:15 +0100 schrieb Daniel Leidert:
    > Am Freitag, den 22.01.2010, 18:19 +0100 schrieb Mathieu Malaterre:
    >
    > [..]
    > > $ fop -xsl /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl
    > > -xml /tmp/math.xml -pdf foo.pdf
    > [..]
    > > Jan 22, 2010 6:10:33 PM org.apache.fop.fo.ElementMappingRegistry findFOMaker
    > > WARNING: Unknown formatting object http://www.w3.org/1998/Math/MathML^math
    >
    > SAee the first URL I gave you.

    It works to put the find_jars line into ~/.foprc. Do it is not required
    to touch the fop script.

    Regards, Daniel




  • 6.  Re: [docbook-apps] Generating PDF from docbook on Linux (OSS)

    Posted 01-24-2010 10:05
    On Sat, Jan 23, 2010 at 4:41 PM, Daniel Leidert
    <daniel.leidert.spam@gmx.net> wrote:
    > Am Freitag, den 22.01.2010, 19:15 +0100 schrieb Daniel Leidert:
    >> Am Freitag, den 22.01.2010, 18:19 +0100 schrieb Mathieu Malaterre:
    >>
    >> [..]
    >> > $ fop -xsl /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl
    >> > -xml /tmp/math.xml -pdf foo.pdf
    >> [..]
    >> > Jan 22, 2010 6:10:33 PM org.apache.fop.fo.ElementMappingRegistry findFOMaker
    >> > WARNING: Unknown formatting object http://www.w3.org/1998/Math/MathML^math
    >>
    >> SAee the first URL I gave you.
    >
    > It works to put the find_jars line into ~/.foprc. Do it is not required
    > to touch the fop script.

    Here it goes again:

    $ fop -xsl /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl
    -xml /tmp/math.xml -pdf foo.pdf
    /home/mathieu/.foprc: line 1: find_jars: command not found

    Searching on the net it seems I simply need to append those jar file
    to CLASSPATH, so instead I tried:

    $ CLASSPATH=/usr/share/java/jeuclid-fop.jar:/usr/share/java/jeuclid-core.jar
    fop -xsl /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl -xml
    /tmp/math.xml -pdf foo.pdf
    /home/mathieu/.foprc: line 1: find_jars: command not found
    Jan 24, 2010 10:59:18 AM org.apache.fop.cli.InputHandler warning
    WARNING: javax.xml.transform.TransformerException: Making portrait
    pages on USletter paper (8.5inx11in)
    Jan 24, 2010 10:59:18 AM org.apache.fop.cli.InputHandler warning
    WARNING: javax.xml.transform.TransformerException: Read
    /usr/share/doc/docbook-xsl/README.Debian.gz section 5(a).
    Exception in thread "main" java.lang.NoSuchMethodError:
    org.apache.fop.fo.properties.CommonFont.getFontState(Lorg/apache/fop/fonts/FontInfo;)[Lorg/apache/fop/fonts/FontTriplet;
    at net.sourceforge.jeuclid.fop.JEuclidElement.createPropertyList(JEuclidElement.java:157)
    at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:318)
    at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:185)
    at org.apache.xml.serializer.ToXMLSAXHandler.closeStartTag(ToXMLSAXHandler.java:206)
    at org.apache.xml.serializer.ToXMLSAXHandler.characters(ToXMLSAXHandler.java:524)
    at org.apache.xml.utils.FastStringBuffer.sendSAXcharacters(FastStringBuffer.java:985)
    at org.apache.xml.dtm.ref.sax2dtm.SAX2DTM.dispatchCharactersEvents(SAX2DTM.java:520)
    at org.apache.xml.dtm.ref.DTMTreeWalker.dispatachChars(DTMTreeWalker.java:204)
    at org.apache.xml.dtm.ref.DTMTreeWalker.startNode(DTMTreeWalker.java:333)
    at org.apache.xml.dtm.ref.DTMTreeWalker.traverse(DTMTreeWalker.java:114)
    at org.apache.xml.dtm.ref.sax2dtm.SAX2DTM.dispatchToEvents(SAX2DTM.java:750)
    at org.apache.xalan.serialize.SerializerUtils.outputResultTreeFragment(SerializerUtils.java:141)
    at org.apache.xalan.templates.ElemCopyOf.execute(ElemCopyOf.java:192)
    at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
    at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:141)
    at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395)
    at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178)
    at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
    at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
    at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395)
    at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178)
    at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
    at org.apache.xalan.templates.ElemElement.constructNode(ElemElement.java:341)
    at org.apache.xalan.templates.ElemElement.execute(ElemElement.java:290)
    at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395)
    at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178)
    at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
    at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
    at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
    at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
    at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395)
    at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178)
    at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
    at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
    at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395)
    at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178)
    at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395)
    at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178)
    at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
    at org.apache.xalan.templates.ElemIf.execute(ElemIf.java:162)
    at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
    at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:141)
    at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
    at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:141)
    at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
    at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:141)
    at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
    at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2270)
    at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1356)
    at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:709)
    at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1273)
    at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1251)
    at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:165)
    at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
    at org.apache.fop.cli.Main.startFOP(Main.java:166)
    at org.apache.fop.cli.Main.main(Main.java:197)


    Am I doing something wrong ? Should I really be using fop on a
    stable/lenny system ?

    Thanks again
    --
    Mathieu



  • 7.  Re: [docbook-apps] Generating PDF from docbook on Linux (OSS)

    Posted 01-24-2010 10:10
    On Sun, Jan 24, 2010 at 11:04 AM, Mathieu Malaterre
    <mathieu.malaterre@gmail.com> wrote:
    > On Sat, Jan 23, 2010 at 4:41 PM, Daniel Leidert
    > <daniel.leidert.spam@gmx.net> wrote:
    >> Am Freitag, den 22.01.2010, 19:15 +0100 schrieb Daniel Leidert:
    >>> Am Freitag, den 22.01.2010, 18:19 +0100 schrieb Mathieu Malaterre:
    >>>
    >>> [..]
    >>> > $ fop -xsl /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl
    >>> > -xml /tmp/math.xml -pdf foo.pdf
    >>> [..]
    >>> > Jan 22, 2010 6:10:33 PM org.apache.fop.fo.ElementMappingRegistry findFOMaker
    >>> > WARNING: Unknown formatting object http://www.w3.org/1998/Math/MathML^math
    >>>
    >>> SAee the first URL I gave you.
    >>
    >> It works to put the find_jars line into ~/.foprc. Do it is not required
    >> to touch the fop script.
    >
    > Here it goes again:
    >
    > $ fop -xsl /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl
    > -xml /tmp/math.xml -pdf foo.pdf
    > /home/mathieu/.foprc: line 1: find_jars: command not found
    >
    > Searching on the net it seems I simply need to append those jar file
    > to CLASSPATH, so instead I tried:
    >
    > $ CLASSPATH=/usr/share/java/jeuclid-fop.jar:/usr/share/java/jeuclid-core.jar
    > fop -xsl /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl -xml
    > /tmp/math.xml -pdf foo.pdf
    > /home/mathieu/.foprc: line 1: find_jars: command not found
    > Jan 24, 2010 10:59:18 AM org.apache.fop.cli.InputHandler warning
    > WARNING: javax.xml.transform.TransformerException: Making portrait
    > pages on USletter paper (8.5inx11in)
    > Jan 24, 2010 10:59:18 AM org.apache.fop.cli.InputHandler warning
    > WARNING: javax.xml.transform.TransformerException: Read
    > /usr/share/doc/docbook-xsl/README.Debian.gz section 5(a).
    > Exception in thread "main" java.lang.NoSuchMethodError:
    > org.apache.fop.fo.properties.CommonFont.getFontState(Lorg/apache/fop/fonts/FontInfo;)[Lorg/apache/fop/fonts/FontTriplet;
    >        at net.sourceforge.jeuclid.fop.JEuclidElement.createPropertyList(JEuclidElement.java:157)
    >        at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:318)
    >        at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:185)
    >        at org.apache.xml.serializer.ToXMLSAXHandler.closeStartTag(ToXMLSAXHandler.java:206)
    >        at org.apache.xml.serializer.ToXMLSAXHandler.characters(ToXMLSAXHandler.java:524)
    >        at org.apache.xml.utils.FastStringBuffer.sendSAXcharacters(FastStringBuffer.java:985)
    >        at org.apache.xml.dtm.ref.sax2dtm.SAX2DTM.dispatchCharactersEvents(SAX2DTM.java:520)
    >        at org.apache.xml.dtm.ref.DTMTreeWalker.dispatachChars(DTMTreeWalker.java:204)
    >        at org.apache.xml.dtm.ref.DTMTreeWalker.startNode(DTMTreeWalker.java:333)
    >        at org.apache.xml.dtm.ref.DTMTreeWalker.traverse(DTMTreeWalker.java:114)
    >        at org.apache.xml.dtm.ref.sax2dtm.SAX2DTM.dispatchToEvents(SAX2DTM.java:750)
    >        at org.apache.xalan.serialize.SerializerUtils.outputResultTreeFragment(SerializerUtils.java:141)
    >        at org.apache.xalan.templates.ElemCopyOf.execute(ElemCopyOf.java:192)
    >        at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
    >        at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:141)
    >        at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395)
    >        at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178)
    >        at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
    >        at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
    >        at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395)
    >        at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178)
    >        at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
    >        at org.apache.xalan.templates.ElemElement.constructNode(ElemElement.java:341)
    >        at org.apache.xalan.templates.ElemElement.execute(ElemElement.java:290)
    >        at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395)
    >        at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178)
    >        at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
    >        at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
    >        at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
    >        at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
    >        at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395)
    >        at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178)
    >        at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
    >        at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
    >        at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395)
    >        at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178)
    >        at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395)
    >        at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178)
    >        at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
    >        at org.apache.xalan.templates.ElemIf.execute(ElemIf.java:162)
    >        at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
    >        at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:141)
    >        at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
    >        at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:141)
    >        at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
    >        at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:141)
    >        at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
    >        at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2270)
    >        at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1356)
    >        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:709)
    >        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1273)
    >        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1251)
    >        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:165)
    >        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
    >        at org.apache.fop.cli.Main.startFOP(Main.java:166)
    >        at org.apache.fop.cli.Main.main(Main.java:197)
    >
    >
    > Am I doing something wrong ? Should I really be using fop on a
    > stable/lenny system ?

    I am making progress:

    $ sudo apt-get install -t testing fop
    $ fop -xsl /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl
    -xml /tmp/math.xml -pdf foo.pdf
    Jan 24, 2010 11:07:37 AM org.apache.fop.cli.InputHandler warning
    WARNING: Making portrait pages on USletter paper (8.5inx11in)
    Jan 24, 2010 11:07:37 AM org.apache.fop.cli.InputHandler warning
    WARNING: Read /usr/share/doc/docbook-xsl/README.Debian.gz section 5(a).
    Jan 24, 2010 11:07:40 AM org.apache.fop.fonts.FontInfo notifyFontReplacement
    WARNING: Font 'Symbol,normal,700' not found. Substituting with
    'Symbol,normal,400'.
    Jan 24, 2010 11:07:40 AM org.apache.fop.fonts.FontInfo notifyFontReplacement
    WARNING: Font 'ZapfDingbats,normal,700' not found. Substituting with
    'ZapfDingbats,normal,400'.
    Jan 24, 2010 11:07:40 AM org.apache.fop.hyphenation.Hyphenator
    getHyphenationTree
    SEVERE: Couldn't find hyphenation pattern en


    The pdf looks bizarre but at least I am getting something out !

    Thanks,
    --
    Mathieu



  • 8.  Re: [docbook-apps] Generating PDF from docbook on Linux (OSS)

    Posted 01-24-2010 10:45
    On Sun, Jan 24, 2010 at 11:09 AM, Mathieu Malaterre
    <mathieu.malaterre@gmail.com> wrote:
    > The pdf looks bizarre but at least I am getting something out !

    For anyone intersted here is what the output looks like:

    http://malatsblog.blogspot.com/2010/01/generating-pdf-from-docbook-on-linux.html


    --
    Mathieu



  • 9.  Re: [docbook-apps] Generating PDF from docbook on Linux (OSS)

    Posted 01-24-2010 12:56
    Am Sonntag, den 24.01.2010, 11:04 +0100 schrieb Mathieu Malaterre:
    > On Sat, Jan 23, 2010 at 4:41 PM, Daniel Leidert
    > <daniel.leidert.spam@gmx.net> wrote:
    > > Am Freitag, den 22.01.2010, 19:15 +0100 schrieb Daniel Leidert:
    > >> Am Freitag, den 22.01.2010, 18:19 +0100 schrieb Mathieu Malaterre:
    > >>
    > >> [..]
    > >> > $ fop -xsl /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl
    > >> > -xml /tmp/math.xml -pdf foo.pdf
    > >> [..]
    > >> > Jan 22, 2010 6:10:33 PM org.apache.fop.fo.ElementMappingRegistry findFOMaker
    > >> > WARNING: Unknown formatting object http://www.w3.org/1998/Math/MathML^math
    > >>
    > >> SAee the first URL I gave you.
    > >
    > > It works to put the find_jars line into ~/.foprc. Do it is not required
    > > to touch the fop script.
    >
    > Here it goes again:
    >
    > $ fop -xsl /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl
    > -xml /tmp/math.xml -pdf foo.pdf
    > /home/mathieu/.foprc: line 1: find_jars: command not found

    I'm running Sid. It might be that in stable the /usr/bin/fop script does
    not make use of /usr/lib/java-wrappers/java-wrappers.sh, which provides
    the find_jars() function or that the function was renamed in
    Squeeze/Sid.

    In Sid it works via find_jars in .foprc.

    > Searching on the net it seems I simply need to append those jar file
    > to CLASSPATH, so instead I tried:
    >
    > $ CLASSPATH=/usr/share/java/jeuclid-fop.jar:/usr/share/java/jeuclid-core.jar
    > fop -xsl /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl -xml
    > /tmp/math.xml -pdf foo.pdf
    > /home/mathieu/.foprc: line 1: find_jars: command not found
    > Jan 24, 2010 10:59:18 AM org.apache.fop.cli.InputHandler warning
    > WARNING: javax.xml.transform.TransformerException: Making portrait
    > pages on USletter paper (8.5inx11in)
    > Jan 24, 2010 10:59:18 AM org.apache.fop.cli.InputHandler warning
    > WARNING: javax.xml.transform.TransformerException: Read
    > /usr/share/doc/docbook-xsl/README.Debian.gz section 5(a).
    > Exception in thread "main" java.lang.NoSuchMethodError:

    Well, this also doesn't work on Sid, where it dies with "network
    down"-like messages. However, the issue might simply be, that by using
    the docbook-xsl stylesheet directly with fop it misses to set
    fop1.extensions. One could write a minimal stylesheet, that imports
    docbook.xsl and sets fop1.extensions. But I don't know, if this will
    help you. Looks like the issue is somehow caused by libjeuclid-fop-java.

    Regards, Daniel




  • 10.  Re: [docbook-apps] Generating PDF from docbook on Linux (OSS)

    Posted 01-25-2010 11:12
    Hi Daniel,

    On Sun, Jan 24, 2010 at 1:55 PM, Daniel Leidert
    <daniel.leidert.spam@gmx.net> wrote:
    > Well, this also doesn't work on Sid, where it dies with "network
    > down"-like messages. However, the issue might simply be, that by using
    > the docbook-xsl stylesheet directly with fop it misses to set
    > fop1.extensions. One could write a minimal stylesheet, that imports
    > docbook.xsl and sets fop1.extensions. But I don't know, if this will
    > help you. Looks like the issue is somehow caused by libjeuclid-fop-java.

    Could you do me a favor ? Please run the following command line on
    your debian box.:

    $ jeuclid-cli example1.mml example1.png -backgroundColor white

    You may need:
    $ sudo apt-get install jeuclid-cli

    Please send me the generated pdf file (offlist).

    Thanks,
    --
    Mathieu



  • 11.  Re: [docbook-apps] Generating PDF from docbook on Linux (OSS)

    Posted 01-29-2010 00:26
    On 01/23/2010 02:26 AM, Mathieu Malaterre wrote:
    > hi there,
    >
    > I am looking for tool that would generate PDF file from a docbook
    > file. I tried a couple without success:
    >
    > - publican simply aborts on my machine (*)
    >

    Hi Mathieu --

    Publican is failing on your machine because of a dependency issue.
    You've got libfile-copy-recursive-perl 0.36, but Publican requires >=0.38

    I just verified the installation instructions for Publican on Debian[1]
    using a fresh installation of Debian 5.0.3 and confirm that the correct
    version of libfile-copy-recursive-perl gets pulled in (0.38-1). I was
    then able to build html and PDF documents, although FOP threw up errors
    during PDF generation and I suspect some further tweaking is needed.

    That said, we haven't tested Publican with mml yet, and preliminary,
    informal tests based on your test case have not been encouraging :(

    Please feel free to drop by the Publican mailing list[2] and let us know
    what we can do to help you further.

    Cheers

    Ruediger



    [1]
    http://rlandmann.fedorapeople.org/pug/chap-Users_Guide-Installing_Publican.html#sect-Users_Guide-Installing_Publican_on_Linux_operating_systems-Installing_Publican_on_Debian

    [2] https://www.redhat.com/mailman/listinfo/publican-list