I am attempting to create some documentation using DocBook XML 4.2. I started to convert my documentation over to DocBook but as soon as I started trying to use standard entities (such as <) I had problems. In fact, jade complains about missing ent files whether entities are used or not. Reproducible: Always Steps to Reproduce: 1. run docbook2html on the attached simple example XML file. Actual Results: The attached output was produced. Expected Results: Produced no errors. The ent files it is complaining about are definitely not there. I am also confused as to why jade is trying to use the sgml rather than xml DTDs, although apart from the entities it does appear to be working as expected. Output from emerge info: Portage 2.0.49-r15 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r3, 2.6.0-test11) ================================================================= System uname: 2.6.0-test11 i686 AMD Athlon(tm) XP Gentoo Base System version 1.4.3.10p1 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/config" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="sandbox ccache autoaddcvs" GENTOO_MIRRORS="ftp://gazza.citylink.co.nz/gentoo http://public.www.planetmirror.com/pub/gentoo http://gentoo.oregonstate.edu/ http://www.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 oss apm avi crypt encode foomaticdb libg++ mad ncurses pdflib quicktime spell xmms xv zlib gdbm berkdb slang readline tetex svga tcltk java guile mysql gpm tcpd pam libwww ssl perl python imlib oggvorbis gtk motif opengl scanner X gtk2 -gnome alsa 3dnow mmx aalib acpi cdr cups kde qt arts sdl xml2 samba usb -mikmod -mpeg jpeg gif png -nls -esd dvd truetype"
Created attachment 22272 [details] Simple example DocBook xml file
Created attachment 22273 [details] Output from docbook2html helloworld.xml
Are you wanting to use the SGML or the XML DTD's ? Jade's looking up the SGML entities, not the XML ones. From the manpage: "For the moment, jw does not handle XML, but only SGML." Can you try with xsltproc, see if it handles the conversion okay ?
I want to use XML for my documents, and after some testing xsltproc does seem to work. Initially I couldn't figure out how to get it to process a document, but then I stumbled upon the "xmlto" package which uses xsltproc and works very well, although it insists on downloading the dtd and then eventually fails (not sure why, the URI is correct) every time. Also, the xmlto package seems to be masked in portage for some reason (?)
xmlto had some teething problems which is why it's had a longer-than-average period in ~arch, but it'll be moving to stable (on x86 at least) pretty soon. If you're having errors about downloading DTD's etc, it's most likely funny /etc/xml/catalog and /etc/xml/docbook files. I'm just about to commit new versions of docbook-xsl-stylesheets and docbook-xml-dtd's so if you can upgrade and try again, see if the problem persists. If not, please report back that all is well :)
Apologies, I'm going to hold off on the commit for tomorrow, there's one outstanding issue. Thanks.
If you want to fix your catalogs do rm /etc/xml/{catalog,docbook} emerge libxml2 emerge docbook-xsl-stylesheets =docbook-xml-dtd-4.1.2-r4 =docbook-xml-4.2 This bug was initially about using the wrong tool for the job, and then about broken local catalogs. Please try the fix I've mentioned here, and I do apologise for the state of the catalogs, I'm working on the fix now (but I always say that don't I?) .. I am.
Actually after fixing my document's header (downgrading it to docbook 4.1.2 and specifying the DTD with no path) it now processes fine with xmlto. I haven't needed to delete and reinstall the catalogs. Thanks for your help and hard work :)
Hey, that's what we're here for. No problem, good to hear it worked.