[xml] XML_CATALOG_DEBUG enhancement suggestion and yet another question



while I've been blundering through bootstrapping /etc/xml/catalog, I've come across something that may be a useful enhancement. If one sets XML_CATALOG_DEBUG, the output looks rather like:

# xmllint --dtdattr --valid test_config.xml
Resolve: sysID http://www.netperf.org/netperf_docs.dtd/1.0
1 Parsing catalog file:///etc/xml/catalog
file:///etc/xml/catalog added to file hash
Found system match http://www.netperf.org/netperf_docs.dtd/1.0

It might be nice if the debug output stated what it was going to use based on that match.

Also, while I was trying to decipher the OASIS stuff on XML catalogs I came away with the impression that if a match target (?) failed to load it would keep trying to match until it found a target that would load or hit the end of the catalog. however, xmllint didn't seem to do that for this catalog:

# cat /etc/xml/catalog
<?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="http://www.netperf.org/netperf_docs.dtd/1.0"; uri="file:///usr/local/share/netperf/nonesuch.dtd"/> <system systemId="http://www.netperf.org/netperf_docs.dtd/1.0"; uri="file:///usr/local/share/netperf/netperf_docs.dtd"/>
</catalog>

# xmllint --dtdattr --valid test_config.xml
Resolve: sysID http://www.netperf.org/netperf_docs.dtd/1.0
1 Parsing catalog file:///etc/xml/catalog
file:///etc/xml/catalog added to file hash
Found system match http://www.netperf.org/netperf_docs.dtd/1.0
Resolve URI file:///usr/local/share/netperf/nonesuch.dtd
test_config.xml:2: I/O error : failed to load external entity "file:///usr/local/share/netperf/nonesuch.dtd"
<!DOCTYPE netperf SYSTEM "http://www.netperf.org/netperf_docs.dtd/1.0"; >
                                                                        ^
test_config.xml:2: warning: failed to load external entity "http://www.netperf.org/netperf_docs.dtd/1.0";
<!DOCTYPE netperf SYSTEM "http://www.netperf.org/netperf_docs.dtd/1.0"; >
                                                                        ^
test_config.xml:3: validity error : Validation failed: no DTD found !
<netperf xmlns="http://www.netperf.org/ns/netperf";>
                                                  ^
# xml2-config --version
2.6.18

Did I misinterpret the OASIS stuff, or is this a bug in catalog processing?

rick jones
rick jones



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]