Re: DocBook xslTNG prerelease 2.0.7

Thomas Schraitle <[email protected]> Mon, 6 Feb 2023 16:23:27 +0100
Newsgroups gmane.text.docbook.apps
Message-ID <[email protected]>
Hi

On 03.02.23 15:43, Norm Tovey-Walsh wrote:
>
> A few weeks ago, I posted a note about the DocBook xslTNG Stylesheets
> then current 2.0.2 prerelease. This morning I posted 2.0.7. The big
> change is in handling of media:
>
>    https://xsltng.docbook.org/guide/2.0.7/ch-customizing.html#media
>
> Feedback eagerly solicited.

Thanks for all your efforts and time! \o/ Much appreciated!

This time I've tried it with the sources from https://github.com/SUSE/doc-=
sle.
Before I called it, I had to prepare a directory of all image files under
build/.tmp/img. That directory contains all the links to images/src/ (we h=
ave
separate directories for PNG and SVG).

The main file is xml/MAIN.SLEDS.xml and contains all XIncludes for differe=
nt
chapters. I run the docbook script with the following arguments:

=2D--------------------
$ /tmp/docbook-xslTNG-2.0.7/bin/docbook -xi \
    -s:xml/MAIN.SLEDS.xml -o:build/.tmp/SLES-installation.html \
    -xsl:/usr/share/xml/docbook/stylesheet/xsltng/xslt/docbook.xsl \
    media-input-base-uri=3Dbuild/.tmp/img \
    mediaobject-output-base-uri=3Dmedia/
No localization exists for "" or "". Using default "en".
Error at xsl:text on line 169 column 19 of functions.xsl:
   XTMM9000  Processing terminated by xsl:message at line 169 in functions=
.xsl
at function f:l10n-language on line 139 column 65 of functions.xsl:
      invoked by function call at
file:/usr/share/xml/docbook/stylesheet/xsltng/xslt/modules/gentext.xsl#95
at function fp:localization-template on line 91 column 60 of gentext.xsl:
      invoked by unknown caller (class net.sf.saxon.value.MemoClosure)
at function fp:localization-template on line 91 column 60 of gentext.xsl:
      invoked by function call at
file:/usr/share/xml/docbook/stylesheet/xsltng/xslt/modules/gentext.xsl#433
   In template rule with match=3D"*" on line 428 of gentext.xsl
      invoked by xsl:apply-templates at
file:/usr/share/xml/docbook/stylesheet/xsltng/xslt/transforms/50-normalize=
.xsl#372
   In template rule with match=3D"*" on line 370 of 50-normalize.xsl
      invoked by xsl:apply-templates at
file:/usr/share/xml/docbook/stylesheet/xsltng/xslt/transforms/50-normalize=
.xsl#351
at template tp:normalize-generated-title on line 320 column 51 of 50-norma=
lize.xsl:
      invoked by xsl:call-template at
file:/usr/share/xml/docbook/stylesheet/xsltng/xslt/transforms/50-normalize=
.xsl#256
   In template rule with
match=3D"element(Q{http://docbook.org/ns/docbook}abstract)" on line 255 of
50-normalize.xsl
      invoked by xsl:apply-templates at
file:/usr/share/xml/docbook/stylesheet/xsltng/xslt/transforms/50-normalize=
.xsl#435
at template tp:normalize-dbinfo on line 424 column 42 of 50-normalize.xsl:
      invoked by xsl:call-template at
file:/usr/share/xml/docbook/stylesheet/xsltng/xslt/transforms/50-normalize=
.xsl#383
   In template rule with match=3D"element(Q{http://docbook.org/ns/docbook}=
info)"
on line 377 of 50-normalize.xsl
      invoked by xsl:apply-templates at
file:/usr/share/xml/docbook/stylesheet/xsltng/xslt/transforms/50-normalize=
.xsl#102
at template tp:normalize-movetitle on line 96 column 45 of 50-normalize.xs=
l:
      invoked by xsl:call-template at
file:/usr/share/xml/docbook/stylesheet/xsltng/xslt/transforms/50-normalize=
.xsl#491
   In template rule with match=3D"*" on line 477 of 50-normalize.xsl
      invoked by xsl:apply-templates at
file:/usr/share/xml/docbook/stylesheet/xsltng/xslt/transforms/50-normalize=
.xsl#111
at template tp:normalize-movetitle on line 96 column 45 of 50-normalize.xs=
l:
      invoked by xsl:call-template at
file:/usr/share/xml/docbook/stylesheet/xsltng/xslt/transforms/50-normalize=
.xsl#491
   In template rule with match=3D"*" on line 477 of 50-normalize.xsl
      invoked by xsl:apply-templates at
file:/usr/share/xml/docbook/stylesheet/xsltng/xslt/transforms/50-normalize=
.xsl#102
at template tp:normalize-movetitle on line 96 column 45 of 50-normalize.xs=
l:
      invoked by xsl:call-template at
file:/usr/share/xml/docbook/stylesheet/xsltng/xslt/transforms/50-normalize=
.xsl#491
   In template rule with match=3D"*" on line 477 of 50-normalize.xsl
      invoked by xsl:apply-templates at
file:/usr/share/xml/docbook/stylesheet/xsltng/xslt/transforms/50-normalize=
.xsl#102
at template tp:normalize-movetitle on line 96 column 45 of 50-normalize.xs=
l:
      invoked by xsl:call-template at
file:/usr/share/xml/docbook/stylesheet/xsltng/xslt/transforms/50-normalize=
.xsl#491
   In template rule with match=3D"*" on line 477 of 50-normalize.xsl
      invoked by xsl:next-match at
file:/usr/share/xml/docbook/stylesheet/xsltng/xslt/transforms/50-normalize=
.xsl#27
   In template rule with match=3D"/*" on line 25 of 50-normalize.xsl
      invoked by built-in template rule (text-only)
Processing terminated by xsl:message at line 169 in functions.xsl
=2D--------------------

I don't know where this 'No localization exists for ""' comes from. Had it=
 in
previous versions, too. ;) Of course, the result HTML is zero bytes. :)

To help debugging, would it make sense to have an option that the HTML cou=
ld be
still generated? Even if there are some errors?

Although the HTML might be broken, it could give some hints where the XML
source contains some strange structures.

Thanks!

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