openSUSE / daps

DocBook Authoring and Publishing Suite (DAPS)
https://openSUSE.github.io/daps
Other
62 stars 19 forks source link

Can't compile against latest libxslt 1.1.35+: missing href attribute in MAIN.DAPS.xml generated xi:includes #676

Closed kraptor closed 1 year ago

kraptor commented 2 years ago

Problem description

When compiling with libxslt 1.1.35 it fails while validating some XML (MAIN.DAPS.xml).

After some investigation and comparing to when that file is created using 1.1.34, the issue seems related to missing hrefs in xi:includes, but I didn't find/know how the mechanism to build these files work.

Here are the differences.

  1. xml file compiled against 1.1.35 (note missing hrefs in xi:includes):
    
    <?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE set PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">

DAPS Documentation DAPS DocBook Authoring and Publishing Suite DocBook XML Tool chain Command Line DAPS 3.3.1 ``` 2. And here is the same file, but compiled against 1.1.34: ``` DAPS Documentation DAPS DocBook Authoring and Publishing Suite DocBook XML Tool chain Command Line DAPS 3.3.1 ``` 3. Reported error during build (due to issue in point 1): ``` [ 126s] /home/abuild/rpmbuild/BUILD/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_quick/MAIN.DAPS.xml:19: element include: XInclude error : detected a local recursion with no xpointer in /home/abuild/rpmbuild/BUILD/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_quick/MAIN.DAPS.xml /home/abuild/rpmbuild/BUILD/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_quick/MAIN.DAPS.xml:21: element include: XInclude error : detected a local recursion with no xpointer in /home/abuild/rpmbuild/BUILD/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_quick/MAIN.DAPS.xml /home/abuild/rpmbuild/BUILD/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_quick/MAIN.DAPS.xml:5: element set: validity error : Element set content does not follow the DTD, expecting ((title , subtitle? , titleabbrev?)? , setinfo? , toc? , (set | book)+ , setindex?), got (title setinfo xi:include xi:include ) /home/abuild/rpmbuild/BUILD/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_quick/MAIN.DAPS.xml:19: element include: validity error : No declaration for element include /home/abuild/rpmbuild/BUILD/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_quick/MAIN.DAPS.xml:19: element include: validity error : No declaration for attribute xmlns:xi of element include /home/abuild/rpmbuild/BUILD/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_quick/MAIN.DAPS.xml:21: element include: validity error : No declaration for element include /home/abuild/rpmbuild/BUILD/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_quick/MAIN.DAPS.xml:21: element include: validity error : No declaration for attribute xmlns:xi of element include Document /home/abuild/rpmbuild/BUILD/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_quick/MAIN.DAPS.xml does not validate [ 126s] -------------------------------- [ 126s] Fatal error: The following tables contain errors: [ 126s] detected a local recursion with no xpointer in /home/abuild/rpmbuild/BUILD/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_quick/MAIN.DAPS.xml, line 19 [ 126s] Error checking file /home/abuild/rpmbuild/BUILD/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_quick/MAIN.DAPS.xml: [ 126s] Traceback (most recent call last): [ 126s] File /home/abuild/rpmbuild/BUILD/daps-3.3.1/libexec/validate-tables.py, line 445, in check_file [ 126s] xml.xinclude() [ 126s] File src/lxml/etree.pyx, line 2381, in lxml.etree._ElementTree.xinclude [ 126s] File src/lxml/xinclude.pxi, line 64, in lxml.etree.XInclude.__call__ [ 126s] lxml.etree.XIncludeError: detected a local recursion with no xpointer in /home/abuild/rpmbuild/BUILD/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_quick/MAIN.DAPS.xml, line 19 [ 126s] [ 126s] During handling of the above exception, another exception occurred: [ 126s] [ 126s] Traceback (most recent call last): [ 126s] File /home/abuild/rpmbuild/BUILD/daps-3.3.1/libexec/validate-tables.py, line 464, in [ 126s] ret |= check_file(filename) [ 126s] File /home/abuild/rpmbuild/BUILD/daps-3.3.1/libexec/validate-tables.py, line 448, in check_file [ 126s] sys.exit(10) [ 126s] SystemExit: 10 ``` ### Expected behavior The compilation works. ### Steps to reproduce problem Just build against the latest 1.1.35. You can see all logs in the following test repository: https://build.opensuse.org/package/live_build_log/home:david.anes:daps_test/daps/openSUSE_Factory/x86_64
kraptor commented 2 years ago

With the help of @tomschr, I tried to discard issues by running xmllint and xlstproc manually.

Here are the results for the following commands:

xsltproc --xinclude --output /tmp/xslt-resolved.xml ../daps-xslt/common/reduce-from-set.xsl xml/MAIN.DAPS.xml xslt-resolved.xml.txt

xmllint --noent --postvalid --xinclude --output /tmp/xinclude-resolved.xml xml/MAIN.DAPS.xml xinclude-resolved.xml.txt

Apparently, both utilities (compiled against 1.1.35 and latest libxml2) work correctly.

I'm not sure why, but the issue remains the same: the XML file within .profiled lacks href attribute in xi:includes

lopippo commented 2 years ago

Greetings,

I would like to comment about this issue, that I seem to encounter also while building DAPS for Debian GNU/Linux (I package DAPS for official Debian). Please, bear with me while I show everything I do:

First, software versions (Debian unstable, latest):

Output of ./configure ``` ./configure checking whether to enable maintainer-specific portions of Makefiles... no configure: Configuring DAPS 3.3.1, the DocBook Authoring and Publishing Suite... checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking whether ln -s works... yes checking for a sed that does not truncate output... /bin/sed checking for grep that handles long lines and -e... /bin/grep checking for bash version... 5.1.16(1)-release checking for make... /usr/bin/make checking for tar... /bin/tar checking for bzip2... /bin/bzip2 checking for asciidoctor... /usr/bin/asciidoctor checking for ditaa... /usr/bin/ditaa checking for epubcheck... /usr/bin/epubcheck checking for checkbot... 0 checking for remake... /usr/bin/remake checking for w3m... /usr/bin/w3m configure: ===== Checking for XML tools... checking for xmllint... /usr/bin/xmllint checking for xsltproc... /usr/bin/xsltproc checking for xmlcatalog... /usr/bin/xmlcatalog checking for fop... /usr/bin/fop checking for jing... /usr/bin/jing checking for trang... /usr/bin/trang checking for /etc/xml/catalog... yes configure: ===== Checking for Image conversion tools... checking for convert... /usr/bin/convert checking for dia... /usr/bin/dia checking for exiftool... /usr/bin/exiftool checking for inkscape... /usr/bin/inkscape checking for optipng... /usr/bin/optipng checking for lodraw... /usr/bin/lodraw checking for pdffonts... /usr/bin/pdffonts checking for -//W3C//DTD SVG 1.0//EN... yes checking for -//W3C//DTD SVG 1.1 Basic//EN... no configure: ===== Checking for Python modules... checking for a Python interpreter with version >= 3.4... python3 checking for python3... /usr/bin/python3 checking for python3 version... 3.10 checking for python3 platform... linux checking for GNU default python3 prefix... ${prefix} checking for GNU default python3 exec_prefix... ${exec_prefix} checking for python3 script directory (pythondir)... ${PYTHON_PREFIX}/local/lib/python3.10/dist-packages checking for python3 extension module directory (pyexecdir)... ${PYTHON_EXEC_PREFIX}/local/lib/python3.10/dist-packages checking python3 module: lxml... yes configure: ===== Checking for DocBook 4.x... checking for -//OASIS//DTD DocBook XML V4.1.2//EN... yes checking for -//OASIS//DTD DocBook XML V4.2//EN... yes checking for -//OASIS//DTD DocBook XML V4.3//EN... yes checking for -//OASIS//DTD DocBook XML V4.4//EN... yes checking for -//OASIS//DTD DocBook XML V4.5//EN... yes configure: ===== Checking for additional DocBook 4.5 identifiers (optional)... checking for -//OASIS//ELEMENTS DocBook Information Pool V4.5//EN... yes checking for -//OASIS//ENTITIES DocBook Character Entities V4.5//EN... yes checking for -//OASIS//ENTITIES DocBook Notations V4.5//EN... yes checking for -//OASIS//ENTITIES DocBook Additional General Entities V4.5//EN... yes checking for -//OASIS//ELEMENTS DocBook Document Hierarchy V4.5//EN... yes checking for -//OASIS//DTD DocBook CALS Table Model V4.5//EN... yes checking for -//OASIS//DTD XML Exchange Table Model 19990315//EN... yes configure: ===== Checking for ISO Entities identifiers... checking for ISO 8879:1986//ENTITIES Publishing//EN//XML... yes checking for ISO 8879:1986//ENTITIES Greek Letters//EN//XML... yes checking for ISO 8879:1986//ENTITIES Box and Line Drawing//EN//XML... yes checking for ISO 8879:1986//ENTITIES Greek Symbols//EN//XML... yes checking for ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN//XML... yes checking for ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN//XML... yes checking for ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN//XML... yes checking for ISO 8879:1986//ENTITIES Diacritical Marks//EN//XML... yes checking for ISO 8879:1986//ENTITIES Monotoniko Greek//EN//XML... yes checking for ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN//XML... yes checking for ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN//XML... yes checking for ISO 8879:1986//ENTITIES Russian Cyrillic//EN//XML... yes checking for ISO 8879:1986//ENTITIES General Technical//EN//XML... yes checking for ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN//XML... yes checking for ISO 8879:1986//ENTITIES Added Latin 1//EN//XML... yes checking for ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN//XML... yes checking for ISO 8879:1986//ENTITIES Added Latin 2//EN//XML... yes checking for ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN//XML... yes checking for ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN//XML... yes configure: ===== Checking for DocBook 5.0... checking for http://docbook.org/xml/5.0/rng/docbookxi.rng... yes checking for http://docbook.org/xml/5.0/rng/docbookxi.rnc... yes checking for http://docbook.org/xml/5.0/rng/docbook.rng... yes checking for http://docbook.org/xml/5.0/rng/docbook.rnc... yes configure: ===== Checking for DocBook 5.1... checking for http://docbook.org/xml/5.1/rng/docbookxi.rng... no checking for http://docbook.org/xml/5.1/rng/docbookxi.rnc... no checking for http://docbook.org/xml/5.1/rng/docbook.rng... no checking for http://docbook.org/xml/5.1/rng/docbook.rnc... no checking for http://docbook.org/xml/5.1/rng/assembly.rng... no checking for http://docbook.org/xml/5.1/rng/assembly.rnc... no checking for http://docbook.org/xml/5.1/rng/dbits.rng... no checking for http://docbook.org/xml/5.1/rng/dbits.rnc... no configure: WARNING: Seems you do not have DocBook 5.1 installed. configure: ===== Checking for DocBook XSL Stylesheets... checking for http://docbook.sourceforge.net/release/xsl/current/common/common.xsl... yes checking for http://docbook.sourceforge.net/release/xsl/current/epub/docbook.xsl... yes checking for http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl... yes checking for http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl... yes checking for http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl... yes checking for http://docbook.sourceforge.net/release/xsl/current/lib/lib.xsl... yes checking for http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl... yes checking for http://docbook.sourceforge.net/release/xsl/current/profiling/profile.xsl... yes checking for http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl... yes checking for http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl... yes checking for http://docbook.sourceforge.net/release/xsl-ns/current/common/common.xsl... yes checking for http://docbook.sourceforge.net/release/xsl-ns/current/epub/docbook.xsl... yes checking for http://docbook.sourceforge.net/release/xsl-ns/current/fo/docbook.xsl... yes checking for http://docbook.sourceforge.net/release/xsl-ns/current/html/chunk.xsl... yes checking for http://docbook.sourceforge.net/release/xsl-ns/current/html/docbook.xsl... yes checking for http://docbook.sourceforge.net/release/xsl-ns/current/lib/lib.xsl... yes checking for http://docbook.sourceforge.net/release/xsl-ns/current/manpages/docbook.xsl... yes checking for http://docbook.sourceforge.net/release/xsl-ns/current/profiling/profile.xsl... yes checking for http://docbook.sourceforge.net/release/xsl-ns/current/xhtml/chunk.xsl... yes checking for http://docbook.sourceforge.net/release/xsl-ns/current/xhtml/docbook.xsl... yes checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating doc/xml/entity-decl.ent DAPS 3.3.1 is configured as follows. Please verify that this configuration matches your expectations. Supported features ------------------ * DocBook 4/5 support * man pages output * HTML/single HTML output * webhelp output (experimental) * ePUB output * png and jpg images Optional features ----------------- Feature | Enabled | Action to enable .............................................................................. DocBook 5.0 support | yes | DocBook 5.1 support | no | install DocBook 5.1, the | | DocBook 5 XSL stylesheets, | | and jing Support AsciiDoc sources | yes | Create ASCII txt output | yes | Create PDF output | yes | Support for .dia images | yes | Support for .ditaa images | yes | Support for .odg images | yes | Support for .svg images | yes | Size optimization for .png | yes | Check links in XML sources | no | install checkbot Create distributable archives | yes | Validate generated ePUB files | yes | Show fonts not embedded in PDFs | yes | Enhanced debugging | yes | DAPS will be installed into the following paths: ------------------------------------------------ Executables : /usr/bin System wide config files: /usr/etc/daps Documentation : /usr/share/doc/daps Everything else : /usr/share/daps Everything seems to be fine. ```

Now, build:

Output of make ``` $ make make[1]: Entering directory '/home/rusconi/devel/daps/build-area/daps-3.3.1' test -z "build" || /bin/mkdir -p build touch build/.firstbuild make[2]: Entering directory '/home/rusconi/devel/daps/build-area/daps-3.3.1' /bin/sh: 1: [: 1.5.7 2.0.16: unexpected operator make[2]: Leaving directory '/home/rusconi/devel/daps/build-area/daps-3.3.1' make[2]: Entering directory '/home/rusconi/devel/daps/build-area/daps-3.3.1' Single HTML book built with REMARKS=0, DRAFT=no and META=0: /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/daps-asciidoc/single-html/daps-asciidoc/ make[2]: Leaving directory '/home/rusconi/devel/daps/build-area/daps-3.3.1' Created doc/build/daps-asciidoc/single-html/daps-asciidoc/daps-asciidoc.html make[2]: Entering directory '/home/rusconi/devel/daps/build-area/daps-3.3.1' Fatal error: The document contains XML errors: /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:19: element include: XInclude error : detected a local recursion with no xpointer in /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:21: element include: XInclude error : detected a local recursion with no xpointer in /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:5: element set: validity error : Element set content does not follow the DTD, expecting ((title , subtitle? , titleabbrev?)? , setinfo? , toc? , (set | book)+ , setindex?), got (title setinfo xi:include xi:include ) /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:19: element include: validity error : No declaration for element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:19: element include: validity error : No declaration for attribute xmlns:xi of element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:21: element include: validity error : No declaration for element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:21: element include: validity error : No declaration for attribute xmlns:xi of element include Document /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml does not validate -------------------------------- Fatal error: The following tables contain errors: detected a local recursion with no xpointer in /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml, line 19 Error checking file /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml: Traceback (most recent call last): File /home/rusconi/devel/daps/build-area/daps-3.3.1/libexec/validate-tables.py, line 445, in check_file xml.xinclude() File src/lxml/etree.pyx, line 2383, in lxml.etree._ElementTree.xinclude File src/lxml/xinclude.pxi, line 64, in lxml.etree.XInclude.__call__ lxml.etree.XIncludeError: detected a local recursion with no xpointer in /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml, line 19 During handling of the above exception, another exception occurred: Traceback (most recent call last): File /home/rusconi/devel/daps/build-area/daps-3.3.1/libexec/validate-tables.py, line 464, in ret |= check_file(filename) File /home/rusconi/devel/daps/build-area/daps-3.3.1/libexec/validate-tables.py, line 448, in check_file sys.exit(10) SystemExit: 10 -------------------------------- Document does not validate! make[2]: *** [/home/rusconi/devel/daps/build-area/daps-3.3.1/make/validate.mk:71: /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/.validate] Error 1 make[2]: Leaving directory '/home/rusconi/devel/daps/build-area/daps-3.3.1' make[1]: *** [Makefile:1823: doc/build/daps-user/single-html/daps-user/daps-user.html] Error 1 make[1]: Leaving directory '/home/rusconi/devel/daps/build-area/daps-3.3.1' make: *** [Makefile:1229: all-recursive] Error 1 ```

The MAIN.DAPS.xml file mentioned by @kraptor is effectively missing the href attribute:

/home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml ```xml DAPS Documentation DAPS DocBook Authoring and Publishing Suite DocBook XML Tool chain Command Line DAPS 3.3.1 ``` If I add the href attribute manually, like so for both lines above: ```xml ```

And then, I compile:

Compile ``` $ make make[1]: Entering directory '/home/rusconi/devel/daps/build-area/daps-3.3.1' touch build/.firstbuild make[2]: Entering directory '/home/rusconi/devel/daps/build-area/daps-3.3.1' Fatal error: The document contains XML errors: /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_user.xml:24: element include: XInclude error : detected a local recursion with no xpointer in /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_user.xml /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_user.xml:45: element include: XInclude error : detected a local recursion with no xpointer in /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_user.xml /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_user.xml:46: element include: XInclude error : detected a local recursion with no xpointer in /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_user.xml /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_user.xml:47: element include: XInclude error : detected a local recursion with no xpointer in /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_user.xml /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_user.xml:50: element include: XInclude error : detected a local recursion with no xpointer in /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_user.xml /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_user.xml:51: element include: XInclude error : detected a local recursion with no xpointer in /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_user.xml /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_user.xml:52: element include: XInclude error : detected a local recursion with no xpointer in /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_user.xml /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_user.xml:53: element include: XInclude error : detected a local recursion with no xpointer in /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_user.xml /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_user.xml:54: element include: XInclude error : detected a local recursion with no xpointer in /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_user.xml /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_user.xml:55: element include: XInclude error : detected a local recursion with no xpointer in /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_user.xml /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_user.xml:56: element include: XInclude error : detected a local recursion with no xpointer in /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_user.xml /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_user.xml:57: element include: XInclude error : detected a local recursion with no xpointer in /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_user.xml /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_user.xml:58: element include: XInclude error : detected a local recursion with no xpointer in /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_user.xml /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_user.xml:59: element include: XInclude error : detected a local recursion with no xpointer in /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_user.xml /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_user.xml:62: element include: XInclude error : detected a local recursion with no xpointer in /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_user.xml /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_user.xml:63: element include: XInclude error : detected a local recursion with no xpointer in /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_user.xml /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_user.xml:64: element include: XInclude error : detected a local recursion with no xpointer in /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_user.xml /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_user.xml:67: element include: XInclude error : detected a local recursion with no xpointer in /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_user.xml /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_quickstarts.xml:26: element include: XInclude error : detected a local recursion with no xpointer in /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_quickstarts.xml /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_quickstarts.xml:28: element include: XInclude error : detected a local recursion with no xpointer in /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_quickstarts.xml /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_quickstarts.xml:29: element include: XInclude error : detected a local recursion with no xpointer in /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_quickstarts.xml /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_quickstarts.xml:32: element include: XInclude error : detected a local recursion with no xpointer in /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/book_daps_quickstarts.xml /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:5: element book: validity error : Element book content does not follow the DTD, expecting ((title , subtitle? , titleabbrev?)? , bookinfo? , (dedication | toc | lot | glossary | bibliography | preface | chapter | reference | part | article | appendix | index | setindex | colophon)*), got (title bookinfo xi:include xi:include xi:include xi:include xi:include xi:include xi:include xi:include xi:include xi:include xi:include xi:include xi:include xi:include xi:include xi:include xi:include ) /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:7: element bookinfo: validity error : Element bookinfo content does not follow the DTD, expecting (graphic | mediaobject | legalnotice | modespec | subjectset | keywordset | itermset | abbrev | abstract | address | artpagenums | author | authorgroup | authorinitials | bibliomisc | biblioset | collab | confgroup | contractnum | contractsponsor | copyright | corpauthor | corpname | corpcredit | date | edition | editor | invpartnumber | isbn | issn | issuenum | orgname | biblioid | citebiblioid | bibliosource | bibliorelation | bibliocoverage | othercredit | pagenums | printhistory | productname | productnumber | pubdate | publisher | publishername | pubsnumber | releaseinfo | revhistory | seriesvolnums | subtitle | title | titleabbrev | volumenum | citetitle | personname | honorific | firstname | surname | lineage | othername | affiliation | authorblurb | contrib | indexterm)+, got (productname productnumber authorgroup othercredit othercredit releaseinfo date xi:include keywordset abstract ) /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:24: element include: validity error : No declaration for element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:24: element include: validity error : No declaration for attribute xmlns:xi of element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:45: element include: validity error : No declaration for element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:45: element include: validity error : No declaration for attribute xmlns:xi of element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:46: element include: validity error : No declaration for element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:46: element include: validity error : No declaration for attribute xmlns:xi of element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:47: element include: validity error : No declaration for element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:47: element include: validity error : No declaration for attribute xmlns:xi of element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:50: element include: validity error : No declaration for element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:50: element include: validity error : No declaration for attribute xmlns:xi of element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:51: element include: validity error : No declaration for element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:51: element include: validity error : No declaration for attribute xmlns:xi of element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:52: element include: validity error : No declaration for element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:52: element include: validity error : No declaration for attribute xmlns:xi of element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:53: element include: validity error : No declaration for element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:53: element include: validity error : No declaration for attribute xmlns:xi of element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:54: element include: validity error : No declaration for element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:54: element include: validity error : No declaration for attribute xmlns:xi of element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:55: element include: validity error : No declaration for element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:55: element include: validity error : No declaration for attribute xmlns:xi of element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:56: element include: validity error : No declaration for element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:56: element include: validity error : No declaration for attribute xmlns:xi of element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:57: element include: validity error : No declaration for element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:57: element include: validity error : No declaration for attribute xmlns:xi of element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:58: element include: validity error : No declaration for element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:58: element include: validity error : No declaration for attribute xmlns:xi of element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:59: element include: validity error : No declaration for element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:59: element include: validity error : No declaration for attribute xmlns:xi of element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:62: element include: validity error : No declaration for element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:62: element include: validity error : No declaration for attribute xmlns:xi of element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:63: element include: validity error : No declaration for element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:63: element include: validity error : No declaration for attribute xmlns:xi of element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:64: element include: validity error : No declaration for element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:64: element include: validity error : No declaration for attribute xmlns:xi of element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:67: element include: validity error : No declaration for element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:67: element include: validity error : No declaration for attribute xmlns:xi of element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:5: element book: validity error : Element book content does not follow the DTD, expecting ((title , subtitle? , titleabbrev?)? , bookinfo? , (dedication | toc | lot | glossary | bibliography | preface | chapter | reference | part | article | appendix | index | setindex | colophon)*), got (title bookinfo xi:include xi:include article ) /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:7: element bookinfo: validity error : Element bookinfo content does not follow the DTD, expecting (graphic | mediaobject | legalnotice | modespec | subjectset | keywordset | itermset | abbrev | abstract | address | artpagenums | author | authorgroup | authorinitials | bibliomisc | biblioset | collab | confgroup | contractnum | contractsponsor | copyright | corpauthor | corpname | corpcredit | date | edition | editor | invpartnumber | isbn | issn | issuenum | orgname | biblioid | citebiblioid | bibliosource | bibliorelation | bibliocoverage | othercredit | pagenums | printhistory | productname | productnumber | pubdate | publisher | publishername | pubsnumber | releaseinfo | revhistory | seriesvolnums | subtitle | title | titleabbrev | volumenum | citetitle | personname | honorific | firstname | surname | lineage | othername | affiliation | authorblurb | contrib | indexterm)+, got (productname productnumber date keywordset abstract xi:include ) /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:26: element include: validity error : No declaration for element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:26: element include: validity error : No declaration for attribute xmlns:xi of element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:28: element include: validity error : No declaration for element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:28: element include: validity error : No declaration for attribute xmlns:xi of element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:29: element include: validity error : No declaration for element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:29: element include: validity error : No declaration for attribute xmlns:xi of element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:30: element article: validity error : Element article content does not follow the DTD, expecting ((title , subtitle? , titleabbrev?)? , articleinfo? , tocchap? , lot* , (((calloutlist | glosslist | bibliolist | itemizedlist | orderedlist | segmentedlist | simplelist | variablelist | caution | important | note | tip | warning | literallayout | programlisting | programlistingco | screen | screenco | screenshot | synopsis | cmdsynopsis | funcsynopsis | classsynopsis | fieldsynopsis | constructorsynopsis | destructorsynopsis | methodsynopsis | formalpara | para | simpara | address | blockquote | graphic | graphicco | mediaobject | mediaobjectco | informalequation | informalexample | informalfigure | informaltable | equation | example | figure | table | msgset | procedure | sidebar | qandaset | task | anchor | bridgehead | remark | highlights | abstract | authorblurb | epigraph | indexterm | beginpage)+ , (sect1* | refentry* | simplesect* | section*)) | sect1+ | refentry+ | simplesect+ | section+) , (toc | lot | index | glossary | bibliography | appendix | colophon | ackno)*), got (title xi:include ) /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:32: element include: validity error : No declaration for element include /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml:32: element include: validity error : No declaration for attribute xmlns:xi of element include Document /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/MAIN.DAPS.xml does not validate -------------------------------- Document does not validate! make[2]: *** [/home/rusconi/devel/daps/build-area/daps-3.3.1/make/validate.mk:71: /home/rusconi/devel/daps/build-area/daps-3.3.1/doc/build/.profiled/x86_amd64_em64t_osuse_noquick/.validate] Error 1 make[2]: Leaving directory '/home/rusconi/devel/daps/build-area/daps-3.3.1' make[1]: *** [Makefile:1823: doc/build/daps-user/single-html/daps-user/daps-user.html] Error 1 make[1]: Leaving directory '/home/rusconi/devel/daps/build-area/daps-3.3.1' make: *** [Makefile:1229: all-recursive] Error 1 ```

What is interesting is that looking at the failing files:

Failing files ```xml User Guide DAPS 3.3.1 TanjaRothta-ro@opensuse.org StefanKnorrsknorr@suse.de ThomasSchraitle Technical review FrankSundermeyer Technical review 3.3.1 DAPS DocBook Authoring and Publishing Suite DocBook XML Toolchain User Guide (PDF) DAPS (DocBook Authoring and Publishing Suite) helps technical writers to author and publish documentation written in DocBook XML. DAPS is a command line based software for Linux* and released as open source. The DAPS User Guide is a comprehensive guide for technical writers using DAPS. It guides you through creating, editing, managing and publishing your documents—be it a short article by a single author or a large documentation project written by multiple authors. ```

There are many <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"/> identical instances.

What might be the cause for this weird behaviour ?

I am ready to provide more details on request, as I really would like this fine piece of software to be included in the next stable release of Debian.

Sincerely,

Filippo Rusconi

kraptor commented 2 years ago

@lopippo Do you mind to reformat your comment a little bit?

Besides that, I've been on/off trying to find the issue but I couldn't, so we need a DAPS developer to step in. :(

tomschr commented 2 years ago

Thanks @lopippo for your detailed report.

Do you mind to reformat your comment a little bit?

I've updated Filippo's comment. It should be now more readable. :slightly_smiling_face:

lopippo commented 2 years ago

Greetings @tomschr ! Long time no hear :-) Sorry, I was trying to fix the formatting also. Hope, the mixed results are readable :-) Cheers, Filippo

tomschr commented 2 years ago

Greetings @lopippo! :wave: Hehe, that's true.

I've used <details> tag to make the long listings foldable. To unfold it, use the arrow. All fine. :slightly_smiling_face:

lopippo commented 2 years ago

Greetings @lopippo! wave Hehe, that's true.

I've used <details> tag to make the long listings foldable. To unfold it, use the arrow. All fine. slightly_smiling_face

Thank you :-)

fsundermeyer commented 2 years ago

Sorry for not having looked into this issue before. ATM there is no libxslt1 1.1.35 package available for openSUSE. @tomschr and me will first try to update the existing 1.1.34 package for openSUSE to see whether the problem exists on openSUSE as well (I assumke it does).

@lopippo and @kraptor : In case you have DocBook5 sources with xi:includes available, would you mind checking if the problem occurs with DocBook5 as well? You can use the git checkout of DAPS as described at the bottom of https://github.com/openSUSE/daps/blob/main/INSTALL.adoc. (The DAPS doc sources are DocBook4. In case this is a libxslt upstream error and this does not occur with DocBook5, I would convert the sources to DocBook5 and stop supporting DocBoook4, I do not belive anyone still uses DocBook4 anyway).

kraptor commented 2 years ago

@fsundermeyer there is a package, but it was rejected when I sent to Factory as it was breaking DAPS:

kraptor commented 2 years ago

Download and test from here: https://build.opensuse.org/package/show/devel:libraries:c_c++/libxslt

fsundermeyer commented 2 years ago

Confirming the same problem for openSUSE.

@tomschr Seems it either is an upstream bug introduced in libxslt 1.1.35 or an unnoticed error in our profiling stylesheets that only surfaced with this libxslt version. See https://ftp.fau.de/gnome/sources/libxslt/1.1/libxslt-1.1.35.news for the upstream changelog

During profilng the href attribute of xi:includes gets lost, resulting in e.g.

<xi:include href="common_authors.xml"/> -> <xi:include/> <xi:include href="book_daps_user.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> -> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"/>

Could you investigate further?

lopippo commented 2 years ago

@fsundermeyer: thank you for your answer.

@lopippo and @kraptor : In case you have DocBook5 sources with xi:includes available, would you mind checking if the problem occurs with DocBook5 as well? You can use the git checkout of DAPS as described at the bottom of https://github.com/openSUSE/daps/blob/main/INSTALL.adoc. (The DAPS doc sources are DocBook4. In case this is a libxslt upstream error and this does not occur with DocBook5, I would convert the sources to DocBook5 and stop supporting DocBoook4, I do not belive anyone still uses DocBook4 anyway).

I tried running the process you mention, but I still need to have DocBook4:

configure: error: No DocBook 4 DTD not found

When I install the docbook-xml package (DocBook4.5), and then run make, I get the same error as described in detail above. How do I prevent running the code that builds the documentation? That would allow me to go through the build process only with DocBook5 and then I could test my own software user manual code (see http://msxpertsuite.org/user-manuals/pdf/minexpert2-doc.pdf).

Ah, by the way, you mention:

Debian, Fedora, Ubuntu
    Not available, yet. Help is appreciated.

Once we have fixed the package build, reference the official daps package for Debian and Ubuntu: see here: https://qa.debian.org/developer.php?login=lopippo@debian.org

Thank you again for this wonderful package !

Sincerely, Filippo

fsundermeyer commented 2 years ago

With the libxslt 1.1.35 package being available for openSUSE I was able to test DocBook4 and DocBook5. the error occurs with both versions.

tomschr commented 2 years ago

I've tried to build it for openSUSE Leap 15.3, but it failed. :cry: At the moment, I can't reproduce it on my machine.

Seems it either is an upstream bug introduced in libxslt 1.1.35 or an unnoticed error in our profiling stylesheets that only surfaced with this libxslt version. See https://ftp.fau.de/gnome/sources/libxslt/1.1/libxslt-1.1.35.news for the upstream changelog

The profiling stylesheets (if you mean daps-xslt/profiling/*-profile.xsl) hasn't been changed for a while (last change was 2020 by Stefan, but that wasn't related to the mentioned files). The respective part which is important is this template:

# File daps-xslt/profiling/base-profile.xsl
<xsl:template match="xi:include/@href|
                     xi:include/@xpointer|
                     xi:include/@accept|
                     xi:include/@accept-language|
                     xi:include/@parse|
                     xi:include/@encoding" mode="profile">
   <xsl:attribute name="{local-name()}">
     <xsl:value-of select="."/>
   </xsl:attribute>
</xsl:template>

It creates the respective attribute node and fills it with the value. This is standard XSLT, nothing strange. It worked so far, so I suspect this could be an upstream bug.

With the libxslt 1.1.35 package being available for openSUSE I was able to test DocBook4 and DocBook5. the error occurs with both versions.

At least you could confirm it. Thanks Frank!

@lopippo Have you reported that upstream?

lopippo commented 2 years ago

@tomschr:

@lopippo Have you reported that upstream?

Well, no ; my first approach was to try and have a clearer view on that apparent bug... Which is starting to occur in this thread.

fsundermeyer commented 2 years ago

@tomschr Could you put together a simple test case/script for this and veryify that it behaves differently with 1.1.34 and 1.1.35? We could then use it to ask upstream and/or report a bug

tomschr commented 2 years ago

@tomschr Could you put together a simple test case/script for this and veryify that it behaves differently with 1.1.34 and 1.1.35? We could then use it to ask upstream and/or report a bug

I've tested it in one of my already installed virtual machines (openSUSE Leap 15.4). I've started with the following versions:

libxml2-tools-2.9.12-150400.3.4.x86_64
libxslt1-1.1.34-150400.1.7.x86_64
libxslt-tools-1.1.35-lp154.134.1.x86_64

With the above versions it worked. Actually it was a mistake as I only partially updated the packages. For example, I was not able to update libxml2 to 2.9.14 due to some repo glitch. So I've updated to libxslt1-1.1.35-lp154.134.1. Additionally, I got libexslt0-1.1.35-lp154.134.1.x86_64.rpm installed as an additional dependency. With this combination I got your error message from above.

However, although I made a mistake at first, it seems the above error is rooted in libxslt1, not libxml2. When I have finished my other tasks, I can create a small test example.

fsundermeyer commented 2 years ago

I am on an up-to-date Tumbleweed. When I install libxslt1-1.1.35 (which does not pull in any dependencies or updates) I get the error. As soon as I replace it with libxslt1-1.1.34 the error is gone.

kraptor commented 2 years ago

A new version of libxslt (1.1.36) was released. Tried to build DAPS against the new version, still broken.

Here you can see the build results and errors:

Here you can download 1.1.36 rpm to test/debug the issue:

Vogtinator commented 1 year ago

Any news here? If we can't update libxslt we'll be missing security fixes.

Vogtinator commented 1 year ago

I debugged this a bit. The XSL has:

<xsl:template match="xi:include/@href|
                       xi:include/@xpointer|
                       xi:include/@accept|
                       xi:include/@accept-language|
                       xi:include/@parse|
                       xi:include/@encoding" mode="profile">
   <xsl:attribute name="{local-name()}">
     <xsl:value-of select="."/>
   </xsl:attribute>
</xsl:template>

<!-- Remove any non-XInclude attributes -->
<xsl:template match="xi:include/@*" mode="profile" />

So the xi:include/@href attribute matches both of those rules. https://www.w3.org/TR/2001/WD-xslt11-20010824/#conflict states that the matching template with the highest priority is used. If there are multiple with the highest priority, the one defined last wins. With xsltproc's --verbose option it's visible that both templates get the same priority:

> /usr/bin/xsltproc  --verbose --stringparam filename "MAIN.DAPS.xml" --stringparam show.comments "0" --stringparam profile.os "osuse;noquick" --stringparam profile.arch "x86;amd64;em64t" /home/abuild/rpmbuild/BUILD/daps-3.3.1/daps-xslt/profiling/docbook45-profile.xsl /home/abuild/rpmbuild/BUILD/daps-3.3.1/doc/xml/MAIN.DAPS.xml
...
added pattern : 'xi:include/@href' mode 'profile' priority 0.500000
added pattern : '                        xi:include/@xpointer' mode 'profile' priority 0.500000
added pattern : '                        xi:include/@accept' mode 'profile' priority 0.500000
added pattern : '                        xi:include/@accept-language' mode 'profile' priority 0.500000
added pattern : '                        xi:include/@parse' mode 'profile' priority 0.500000
added pattern : '                        xi:include/@encoding' mode 'profile' priority 0.500000
xsltParseStylesheetTemplate: mode profile
xsltCompilePattern : parsing 'xi:include/@*'
xsltCompilePattern : parsed xi:include/@*, default priority 0.500000
added pattern : 'xi:include/@*' mode 'profile' priority 0.500000
...

Before libxslt 1.1.36 (https://github.com/GNOME/libxslt/commit/b0074eeca3c6b21b4da14fdf712b853900c51635), it took the template above instead.

I'm not sure whether it's correct to give all those patterns the same priority, but if that is the case the fix is to explicitly give the fallback rule a lower priority, i.e.

<!-- Remove any non-XInclude attributes -->
<xsl:template match="xi:include/@*" mode="profile" priority="0"/>

With that, daps builds successfully.

tomschr commented 1 year ago

Thanks Fabian for your help. Much appreciated.

So the xi:include/@href attribute matches both of those rules.

Yes, seems xi:include/@* and xi:include/@href has the same priority (0.5). I would have expected the more specific pattern ( xi:include/@href) has a higher precedence.

The XSLT spec in 5.5 Conflict Resolution for Template Rules says:

An XSLT processor may signal the error; if it does not signal the error, it must recover by choosing, from amongst the matching template rules that are left, the one that occurs last in the stylesheet.

For some reason, libxslt has chosen to signal an error. It could have chosen a different conflict resolution strategy.

https://www.w3.org/TR/2001/WD-xslt11-20010824/#conflict

Just a hint of caution: That is an old working draft and is for XSLT 1.1. If I'm not mistaken, the libxslt library still supports XSLT 1.0 only. We shouldn't refer to old working drafts, although for our specific case, it doesn't seem to matter.

I'm not sure whether it's correct to give all those patterns the same priority

Theoretically you could add priority attributes for every template rule. However, that's not a good idea. You would circumvent the default selection which should be better left to the XSLT processor. You use the priority attribute only if you have to overwrite the standard selection as an exception, not as a default.

For our specific use case, it's fine to add this single priority attribute for xi:include/@*, but not for every template rule. I will create a PR with your suggestion (see #685).

Thanks Fabian!

tomschr commented 1 year ago

@kraptor Would you like to test our fix in PR #685 ?

lopippo commented 1 year ago

Greetings,

thank you sooo much for the fix! I will thus patch the source code for version 3.3.1 and make a Debian package out of it. That is very cool because a number of packages had to be removed from Debian testing because of that issue.

daps rocks!

Filippo

kraptor commented 1 year ago

@kraptor Would you like to test our fix in PR #685 ?

I confirm it works for me and I already sent an updated package to openSUSE. Thanks!