Re: [xml] Problems with catalogs using delegates

On Fri, Mar 23, 2007 at 02:38:27PM +0100, Peter Kullmann wrote:
I have two problems with catalogs that use delegateSystem, delegatePublic or
both. I'm not at all sure whether this is a problem of the libxml
implementation or in my understanding of catalogs.

  The semantic is defined there:

So here's the setup:

1. catalog.xml:

<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
       publicIdStartString="-//My Pub//Id"

  Don't expect both to be used, on delegates at most one is followed,
but if that fails the algorithm never backtracks

2. delegate-catalog.xml:

<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
    rewritePrefix="." />
    publicId="-//My Pub//Id//EN"
    uri="a.dtd" />

Here is the first problem: 

xmlcatalog catalog.xml "http://doesnt.exist/a.dtd";
  does not resolve! It tries the delegate, but fails to use the rewrite URI

  at one time either URI or Public resolution is used, but not both at the
time see the algorithm

xmlcatalog delegate-catalog.xml "http://doesnt.exist/a.dtd";
  resolves correctly (just to check)

The second problem is related to the first and occurs when validating a
document. The catalog system fails to resolve the dtd in a document that
contains a public id and a system id: 
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE root PUBLIC "-//My Pub//Id//EN"
<root />

On the other hand, the resolution of the public id seems to work:
xmlcatalog catalog.xml "-//My Pub//Id//EN"
  resolves correctly

I'm grateful for any hints and tips.

  export XML_DEBUG_CATALOG environment variable


Red Hat Virtualization group
Daniel Veillard      | virtualization library
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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