GNOME Bugzilla – Bug 636002
xmlcatalog --add discards id, prefer, xml:base attributes
Last modified: 2021-07-05 13:21:28 UTC
xmlcatalog --add discards several things from an existing catalog when adding stuff to it, thus potentially breaking it. Example reproducer: $ cat foo.xml <?xml version="1.0"?> <!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"> <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system" id="meh" xml:base="file:///tmp/"> <system id="idSystem" systemId="baz" uri="quux" xml:base="Ffffff" /> </catalog> $ xmlcatalog --add system foo bar foo.xml <?xml version="1.0"?> <!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"> <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> <system systemId="baz" uri="quux"/> <system systemId="foo" uri="bar"/> </catalog> Notice how the original catalog/@prefer, catalog/@id, catalog/@xml:base, system/@id, and system/@xml:base have disappeared; they should have been kept as is. (FWIW catalog/@id is not in the XML catalog 1.0 DTD, but is in the XML catalog 1.0 specification text.)
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.