Testing DocBook xslTNG 2.0.2 with a real world example

Thomas Schraitle <[email protected]> Thu, 19 Jan 2023 16:29:24 +0100
Newsgroups gmane.text.docbook.apps
Message-ID <[email protected]>
Hi,

thanks for releasing 2.0.2 of the DocBook xslTNG stylesheets! \o/

I was curious and wanted to play with it on a real-world example. :)

The example that I've chosen is our administration guides written in DocBo=
ok 5.
It has already been successfully published with the DocBook XSLT 1.0
stylesheets. The source code contains 50.000 lines of fine DocBook XML. So=
 it's
quite massive. ;)

For convenience reasons, I've added all in one directory. So I've download=
ed
the ZIP archive from GitHub, unpacked it, and created the admin book as a
single DocBook XML file. As the images are referenced without any paths, I=
've
linked all the PNG and SVG files to this (temporary) directory.

This is how the directory looks like:

   docbook-xslTNG-2.0.2/
   +-- {bin,docker,libs,resources,samples,xslt}/  # all dirs from the proj=
ect
   +-- tmp/
   |   +-- book-administration.xml  # my guide
   |   +-- *.png
   |   +-- *.svg
   +-- out/   # output should go here

I run it like this:

   $ cd docbook-xslTNG-2.0.2/
   $ python3 bin/docbook -xsl:xslt/docbook.xsl \
      -s:tmp/book-administration.xml \
      -o:out.html

This gave me some errors which I'm not able to interpret. For easier readi=
ng,
I've uploaded the messages and the XML source code here:

   https://gist.github.com/tomschr/01bd34acca30b789456ad5e4ee7b3dab

As a summary, I have these issues:

* Some templates seems not be available and I get this messages:

   No titlepage template for: quote
   No localization for keycap/keycap in en, using "MISSING"
   No localization for keycap/keycap in en, using "MISSING"

* I get errors from the TNG stylesheets itself. For example:
     XPTY0004  An empty sequence is not allowed as the first argument of
              array:size()
     invoked by xsl:iterate at docbook-xslTNG-2.0.2/xslt/modules/objects.x=
sl#62

   There are similar issues.

It seems, some of the issues are coming from the stylesheets, right? Or is=
 it a
problem in my source code? It's hard to believe as I've validated it again=
st
DocBook 5.2 and it's valid. :)

Maybe I did something wrong. How I can solve the issues above? Would it he=
lp to
open some GH issues?

Many thanks and keep up the great work!


=2D-
Gru=C3=9F/Regards
   Thomas Schraitle