You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before daps does validation, it checks XML files for syntax errors. This is done by the xmllint command.
However, xmllint conforms also to the xml:id specification which forbids non-unique IDs in XML documents (see below). In this context, xmllint conforms to this spec (which is correct). Unfortunately, it does not contain an option to switch off this behaviour.
This behaviour is needed to create just a syntax check (well-formedness check) which ignores multiple IDs with the same value. However, multiple IDs should be allowed to create the same structure element, but with different content (let's say, a procedure for openSUSE and for SLES both with the same ID, but with different steps). The 2nd step of daps will profile these files to one or the other variant.
Expected behavior
Perform a well-formedness check without taking into account about double or non-unique IDs.
ghost
changed the title
Well-formedness check fails with double occurances of xml:ids
Well-formedness check fails with double occurences of xml:ids
Oct 24, 2017
I've tested it with the current SLE documentation (MAIN.SLEDS.xml).
Making a syntax error in the MAIN file, the script responds with:
$ daps-xmlwellformed --xinclude xml/MAIN.SLEDS.xml
ERROR: expected '>', line 72, column 5 (MAIN.SLEDS.xml, line 72)
xml/MAIN.SLEDS.xml:72:5:FATAL:PARSER:ERR_GT_REQUIRED: expected '>'
Makeing a syntax error in one of the xincluded files, the script responds with:
$ daps-xmlwellformed --xinclude xml/MAIN.SLEDS.xml
ERROR: error parsing attribute name, line 19, column 2
xml/book_sle_admin.xml:19:2:FATAL:PARSER:ERR_NAME_REQUIRED: error parsing attribute name
xml/book_sle_admin.xml:19:2:FATAL:PARSER:ERR_SPACE_REQUIRED: attributes construct error
xml/book_sle_admin.xml:19:2:FATAL:PARSER:ERR_GT_REQUIRED: Couldn't find end of Start Tag book line 15
xml/book_sle_admin.xml:19:2:FATAL:PARSER:ERR_DOCUMENT_END: Extra content at the end of the document
xml/MAIN.SLEDS.xml:79:0:ERROR:XINCLUDE:XINCLUDE_NO_FALLBACK: could not load xml/book_sle_admin.xml, and no fallback was found
Closes issue #425
Before DAPS starts any operation, it performs a check for well-formdness. This used to be done with xmllint, which did not allow e.g.
<section os="foo" xml:id="bar">
<section os="foo2" xml:id="bar">
and errored because of duplicated IDs. This commit introduces daps-xmlwellformed, which ignores duplicated IDs when checking for well-formdness.
ghost
changed the title
Well-formedness check fails with double occurences of xml:ids
Well-formedness check fails with double occurrences of xml:ids
Oct 23, 2018
Problem description
Before daps does validation, it checks XML files for syntax errors. This is done by the
xmllint
command.However,
xmllint
conforms also to the xml:id specification which forbids non-unique IDs in XML documents (see below). In this context, xmllint conforms to this spec (which is correct). Unfortunately, it does not contain an option to switch off this behaviour.This behaviour is needed to create just a syntax check (well-formedness check) which ignores multiple IDs with the same value. However, multiple IDs should be allowed to create the same structure element, but with different content (let's say, a procedure for openSUSE and for SLES both with the same ID, but with different steps). The 2nd step of daps will profile these files to one or the other variant.
Expected behavior
Perform a well-formedness check without taking into account about double or non-unique IDs.
Steps to reproduce the behavior
Create a XML document with the same ID twice.
References
The xml:id specification states:
The text was updated successfully, but these errors were encountered: