Am Mittwoch, den 01.10.2014, 09:58 +0200 schrieb Raphael Hertzog: > Package: docbook-xml > Version: 4.5-7.2 > Severity: important > > Consider the test document attached, it's starting with this: > > <?xml version='1.0' encoding='utf-8' ?> > <!DOCTYPE section [ > <!ENTITY % BOOK_ENTITIES SYSTEM "Users_Guide.ent"> > %BOOK_ENTITIES; > <!ENTITY % sgml.features "IGNORE"> > <!ENTITY % xml.features "INCLUDE"> > <!ENTITY % DOCBOOK_ENTS PUBLIC "-//OASIS//ENTITIES DocBook Character Entities > V4.5//EN" "http://www.oasi > s-open.org/docbook/xml/4.5/dbcentx.mod"> > %DOCBOOK_ENTS; > ]> > > Now I want to parse it (with publican which uses libxml internally) but I > always ends > up loading http://www.oasis-open.org/docbook/xml/4.5/dbcentx.mod from the > network instead > of finding the local copy. I can reproduce the problem with xmllint: [..]
Indeed the above will fail. According to the XML catalog standard you cite in https://www.oasis-open.org/committees/download.php/14809/xml-catalogs.html#s.ext.ent (see the end of the section and section 4.1.1) it is specified, that if system identifiers are provided together with public identifiers the default is to only lookup the system identifier. This cbehaviour can be modified by the prefer attribute of the catalog entry. The DocBook XML catalogs use this attribute to prefer the public identifier whereas the Debian catalogs for DocBook XML do not do this. AFAIK we even don't have a switch for dh_installxmlcatalogs to set this attribute. So what happens, happens accordingly to the standard and you are to blame to use a system identifier together with the public one :) Seriously, atm I have no clue, how to easily fix this globally. The XML catalog system of Debian has some serious flaws and needs a complete rewrite. In the future I'd like to use the <nextCatalog> element instead of registering system and public identifiers on the system catalog itself or maybe use the <group> element around them. This could solve the problem. We cannot set the "prefer" attribute globally, because this would conflict with catalog files, where the prefer mode conflicts with the chosen global mode. I'd suggest to use /usr/share/xml/docbook/schema/dtd/4.5/catalog.xml as catalog for your DocBook files atm as a quick workaround. I'll check for possible solutions. Regards, Daniel -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org