Paul Gier wrote :
> Hi Julien,
> Can you create a jira issue for the jboss maven-jdocbook-plugin with
> some sample input? Here is the jira URL
> (http://jira.jboss.com/jira/browse/MPJDOCBOOK). Then maybe we can get
> it fixed.
>
> Tahnks!
>
> Julien Graglia wrote:
>> What do you use to generate PDF books?
>> I also have found the JBoss Plugin : maven-jdocbook-plugin
>> (http://labs.jboss.com/maven-jdocbook-plugin/) but, here again, I didn't
>> get correct result : i try to inject the docbook xml generated by doxia,
>> but it is invalid for jdocbook plugin...I have made some hand made
>> corrections to the xml... but the result is awfull...
the result is awfull because the docboook xml file I use is invalid. the
maven-jdocbook-plugin itself works!
In fact, I have a pb with the doc-book xml generated by doxia-maven-plugin
Here is the content of the generated file :
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<chapter><bookinfo><title>Section Jetty</title>
<corpauthor>Trygve</corpauthor>
</bookinfo>
<section>Jetty<para>sdsdfsd.dfsdfsd.</para>
</section>
</chapter>
...
</book>
the <book> element is NOT opened, and I have en error in line 1 whith
the jboss plugin, or the docbkx-maven-plugin
[INFO] [docbkx:generate-pdf]
[INFO] Processing ref-guide.xml
Error on line 1 column 55 of
file:///opt/nc/iv4trunk_co/iv-books/target/generated-site/doc-book/ref-guide/ref-guide.xml:
Error reported by XML parser: White spaces are required between
publicId and systemId.
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Failed to transform ref-guide.xml.
Embedded error: org.xml.sax.SAXParseException: White spaces are
required between publicId and systemId.
If i remove the first line, and add a <book> elt, a pdf is generated...
but it looks ugly...
It seems to be that the doc-book format is not well implemented by the
doc-book format of doxia-maven-plugin. In fact it is named
"doxia-module-docbook-simple" (1)
I have looked at the tests resources (2) of doxia-book : the expected
result (3) is far away from what I have :
<?xml version="1.0" ?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
<book><bookinfo><title>Test Book</title>
</bookinfo>
<chapter><title>Chapter 1</title>
first 3 lines of xml are good here
only 1 bookinfo elt (i have one bookinfo at each chapter, and no
book elt!)
Lukas Theussl wrote :
>
> Unfortunately it only works with latest Maven-2.0.9-SNAPSHOT using
> doxia-1.0-beta-1-SNAPSHOT... so you'll have to build everything
> yourself if you want to try it. The FO module is also scheduled to
> replace the deprecated iText in doxia book, but that's still a way
> ahead...
Well, I think I have to wait...
thx!
1:
https://svn.apache.org/repos/asf/maven/doxia/doxia/trunk/doxia-modules/doxia-module-docbook-simple/
2:
https://svn.apache.org/repos/asf/maven/doxia/doxia/trunk/doxia-book/src/test/resources/
3 :
https://svn.apache.org/repos/asf/maven/doxia/doxia/trunk/doxia-book/src/test/resources/expected/doc-book/plexus-user-guide.xml
--
Julien Graglia