Sorry, I forgot to attach the referenced files. So here the attachments. 2015-07-23 13:24 GMT+02:00 Björn Kautler <Bjoern kautler net>:
Hi, because there were often stack overflow errors on Windows with xmllint (exit code 0xC00000FD), I updated our used version from 2.7.8 (with iconv 1.9.2 and zlib 1.2.5) to 2.9.2 (with iconv 1.14 and zlib 1.2.8). But by doing this, I found some different behaviour in the two versions about which I'd like to check back here whether this is expected behaviour or bugs. We use xmllint in our toolchain for building DocBook roughly in the following way: - Use xmllint to resolve XIncludes (xmllint is the only option, as we use the xpointer()-scheme) - Here it is expected that various IDs are used mutliple times and that various IDREF attributes reference unknown IDs - Do some profiling for various attributes, like customer, enabled features for the build etc. with XSLT - Now if the profiling attributes were set correctly by the docu team, the XML should be valid without double IDs and without dead links - Use xmllint with "--postvalid --noout" to make sure the profiling attributes were set correctly - Do the DocBook transformations Here the four things I recognized so far: 1. If I use "--postvalid", the error messages changed to be much less helpful. In the old version the correct location including originating file was shown. Now some messages are without location, some are with the correct line, but the wrong filename (root including file, not included file). The ones with the location (but wrong filename) are the ones described also in 2. Command: xmllint.exe --xinclude --postvalid --noout parent.xml 2.7.8 showed: - parent.xml:3: element customers: validity error : No declaration for attribute xmlns:xi of element customers - third-child.xml:3: element customer: validity error : ID the-other-id already defined - child.xml:4: element link: validity error : IDREF attribute linkend references an unknown ID "broken" 2.9.2 shows: - parent.xml:3: element customer: validity error : ID the-other-id already defined - No declaration for attribute xmlns:xi of element customers - ID the-other-id already defined - IDREF attribute linkend references an unknown ID "broken" 2. If I do not use "--postvalid", now double-ID errors are shown, that were previously only shown with "--postvalid". Additionally they are shown with the wrong location. The line is correct, but the filename is the root including one, not the included one. Those errors are also shown additionally when doing "--postvalid" as described in 1. Command: xmllint.exe --xinclude --noout parent.xml 2.7.8 showed nothing 2.9.2 shows: - parent.xml:3: element customer: validity error : ID the-other-id already defined 3. The double-ID errors that are shown with and without "--postvalid" are also incorrect in case of xi:fallback. Command: xmllint.exe --xinclude --noout parent.xml 2.7.8 showed nothing 2.9.2 shows: - parent.xml:3: element customer: validity error : ID the-id already defined Here again the file is wrong as child.xml would be correct, but the whole message is wrong, as xi:include is the alternative that should be used if the file where the ID is also defined cannot be found. This we use to have a file that each developer can create and manipulate individually without it being checked into VCS, but the xi:fallback has a minimal fallback that is used in case the developer does not have a local version of the file. 4. The URIs that are looked up for absolute files have changed. This means, that any catalogs used before do not work with the new version out-of-the-box. Command: xmllint.exe --xinclude --noout file:/D:/Sourcecode/.../parent.xml 2.7.8 showed: - warning: failed to load external entity "file:///D:/Sourcecode/.../mapped.xml" 2.9.2 shows: - warning: failed to load external entity "file:/D:/Sourcecode/.../mapped.xml" Command: xmllint.exe --xinclude --noout D:/Sourcecode/.../parent.xml 2.7.8 showed: - warning: failed to load external entity "D:///Sourcecode/.../mapped.xml" 2.9.2 shows: - warning: failed to load external entity "D:/Sourcecode/.../mapped.xml" Command: xmllint.exe --xinclude --noout 'D:\Sourcecode\...\parent.xml' 2.7.8 showed: - warning: failed to load external entity "file:///D:/Sourcecode/.../mapped.xml" 2.9.2 shows: - warning: failed to load external entity "file:/D:/Sourcecode/.../mapped.xml" Command: xmllint.exe --xinclude --noout 'D:\Sourcecode/...\parent.xml' 2.7.8 showed: - warning: failed to load external entity "file:///D:/Sourcecode/.../mapped.xml" 2.9.2 shows: - warning: failed to load external entity "file:/D:/Sourcecode/.../mapped.xml" Regards Björn
Attachment:
child.xml
Description: Text Data
Attachment:
parent.xml
Description: Text Data
Attachment:
schema.dtd
Description: Binary data
Attachment:
second-child.xml
Description: Text Data
Attachment:
third-child.xml
Description: Text Data