GNOME Bugzilla – Bug 692811
problem with validating XML files with ":" in name
Last modified: 2021-07-05 13:21:48 UTC
Tested with libxml 2.9.0: $ cat myprefix\:mysuffix.xml <?xml version="1.0"?> <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1"> <service_bundle type='manifest' name='myprefix:mysuffix'> <service name='myprefix/mysuffix' type='service' version='1'> </service> </service_bundle> $ xmllint --valid myprefix\:mysuffix.xml myprefix:mysuffix.xml:2: warning: failed to load external entity "myprefix:///usr/share/lib/xml/dtd/service_bundle.dtd.1" <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1"> ^ myprefix:mysuffix.xml:4: validity error : Validation failed: no DTD found ! <service_bundle type='manifest' name='myprefix:mysuffix'> ^ <?xml version="1.0"?> <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1"> <service_bundle type="manifest" name="myprefix:mysuffix"> <service name="myprefix/mysuffix" type="service" version="1"> </service> </service_bundle> Where with absolute or relative path it will work: $ xmllint --valid ./myprefix\:mysuffix.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1"> <service_bundle type="manifest" name="myprefix:mysuffix"> <service name="myprefix/mysuffix" type="service" version="1"> </service> </service_bundle>
yeah, somehow it is taken as an URI-Reference and then reparsed and : looks like the protocol separator ... Annoying, this looks like a real bug, I will need to look at it ! Daniel
Also see the discussion in bug 668245.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/libxml2/-/issues/ Thank you for your understanding and your help.