]> pere.pagekite.me Git - homepage.git/commitdiff
New post on docbook test framework.
authorPetter Reinholdtsen <pere@hungry.com>
Sun, 5 Nov 2023 11:45:21 +0000 (12:45 +0100)
committerPetter Reinholdtsen <pere@hungry.com>
Sun, 5 Nov 2023 11:45:21 +0000 (12:45 +0100)
blog/data/2023-11-05-docbook-tester.txt [new file with mode: 0644]

diff --git a/blog/data/2023-11-05-docbook-tester.txt b/blog/data/2023-11-05-docbook-tester.txt
new file mode 100644 (file)
index 0000000..0f0671b
--- /dev/null
@@ -0,0 +1,106 @@
+Title: Test framework for DocBook processors / formatters
+Tags: english, debian, docbook
+Date: 2023-11-05 13:00
+
+<p>All the books I have published so far has been using
+<a href="https://docbook.org/">DocBook</a> somewhere in the process.
+For the first book, the source format was DocBook, while for every
+later book it was an intermediate format used as the stepping stone to
+be able to present the same manuscript in several formats, on paper,
+as ebook in ePub format, as a HTML page and as a PDF file either for
+paper production or for Internet consumption.  This is made possible
+with a wide variety of free software tools with DocBook support in
+Debian.  The source format of later books have been docx via rst,
+Markdown, Filemaker and Asciidoc, and for all of these I was able to
+generate a suitable DocBook file for further processing using pandoc,
+a2x and asciidoctor, as well as rendering using
+<a href="https://tracker.debian.org/pkg/xmlto">xmlto</a>,
+<a href="https://tracker.debian.org/pkg/dbtoepub">dbtoepub</a>,
+<a href="https://tracker.debian.org/pkg/dblatex">dblatex</a>,
+<a href="https://tracker.debian.org/pkg/dblatex">docbook-xsl</a> and
+<a href="https://tracker.debian.org/pkg/fop">fop</a>.</p>
+
+<p>Most of the books I have published are translated books, with
+English as the source language.  The use of
+<a href="https://tracker.debian.org/pkg/po4a">po4a</a> to
+handle translations using the gettext PO format has been a blessing,
+but publishing translated books had triggered the need to ensure the
+DocBook tools handle relevant languages correctly.  For every new
+language I have published, I had to submit patches dblatex, dbtoepub
+and docbook-xsl fixing incorrect language and country specific issues
+in the framework themselves.  Typically this has been missing keywords
+like 'figure' or sort ordering of index entries.  After a while it
+became tiresome to only discover issues like this by accident, and I
+decided to write a DocBook "test framework" exercising various
+features of DocBook and allowing me to see all features exercised for
+a given language.  It consist of a set of DocBook files, a version 4
+book, a version 5 book, a v4 book set, a v4 selection of problematic
+tables, one v4 testing sidefloat and finally one v4 testing a book of
+articles.  The DocBook files are accompanied with a set of build rules
+for building PDF using dblatex and docbook-xsl/fop, HTML using xmlto
+or docbook-xsl and epub using dbtoepub.  The result is a set of files
+visualizing footnotes, indexes, table of content list, figures,
+formulas and other DocBook features, allowing for a quick review on
+the completeness of the given locale settings.  To build with a
+different language setting, all one need to do is edit the lang= value
+in the .xml file to pick a different ISO 639 code value and run
+'make'.</p>
+
+<p>The <a href="https://codeberg.org/pere/docbook-example/">test framework
+source code</a> is available from Codeberg, and a generated set of
+presentations of the various examples is available as Codeberg static
+web pages at
+<a href="https://pere.codeberg.page/docbook-example/">https://pere.codeberg.page/docbook-example/</a>.
+Using this test framework I have been able to discover and report
+several bugs and missing features in various tools, and got a lot of
+them fixed.  For example I got Northern Sami keywoards added to both
+docbook-xsl and dblatex, fixed several typos in Norwegian bokmål and
+Norwegian Nynorsk, support for non-ascii title IDs added to pandoc,
+Norwegian index sorting support fixed in xindy and initial Norwegian
+Bokmål support added to dblatex.  Some issues still remains, though.
+Default index sorting rules are still broken in several tools, so the
+Norwegian letters æ, ø and å are more often than not sorted properly
+in the book index.</p>
+
+<p>The test framework recently received some more polish, as part of
+publishing my latest book.  This book contained a lot of fairly
+complex tables, which exposed bugs in some of the tools.  This made me
+add a new test file with various tables, as well as spend some time to
+brush up the build rules.  My goal is for the test framework to
+exercise all DocBook features to make it easier to see which features
+work with different processors, and hopefully get them all to support
+the full set of DocBook features.  Feel free to send patches to extend
+the test set, and test it with your favorite DocBook processor.
+Please visit these two URLs to learn more:</p>
+
+<ul>
+<li><a href="https://codeberg.org/pere/docbook-example/">https://codeberg.org/pere/docbook-example/</a></li>
+<li><a href="https://pere.codeberg.page/docbook-example/">https://pere.codeberg.page/docbook-example/</a></li>
+</ul>
+
+<p>If you want to learn more on Docbook and translations, I recommend
+having a look at the <a href="https://docbook.org/">the DocBook
+web site</a>,
+<a href="https://doccookbook.sourceforge.net/html/en/">the DoCookBook
+site<a/> and my earlier blog post on
+<a href="https://people.skolelinux.org/pere/blog/From_English_wiki_to_translated_PDF_and_epub_via_Docbook.html">how
+the Skolelinux project process and translate documentation</a>.</p>
+
+<!--
+
+https://github.com/docbook/xslt10-stylesheets/issues/205 (docbook-xsl: sme support)
+https://bugs.debian.org/968437 (xindy: index sorting rules for nb/nn)
+https://bugs.debian.org/856123 (pandoc: markdown to docbook with non-english titles)
+https://bugs.debian.org/864813 (dblatex: missing nb words)
+https://bugs.debian.org/756386 (dblatex: index sorting rules for nb/nn)
+https://bugs.debian.org/796871 (dbtoepub: index sorting rules for nb/nn)
+https://bugs.debian.org/792616 (dblatex: PDF metadata)
+https://bugs.debian.org/686908 (docbook-xsl: index sorting rules for nb/nn)
+https://sourceforge.net/tracker/?func=detail&atid=373747&aid=3556630&group_id=21935 (docbook-xsl: nb/nn support)
+https://bugs.debian.org/684391 (dblatex: initial nb support)
+
+-->
+
+<p>As usual, if you use Bitcoin and want to show your support of my
+activities, please send Bitcoin donations to my address
+<b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>