[xml] Confused: Handling relative paths in catalogs



Hi.

I'm trying to work with files produced by the Domino XML toolkit,
which are of type: <!DOCTYPE document SYSTEM "domino.dtd">.  So I did
"xmlcatalog --create --add system domino.dtd /long/path/domino.dtd catalog"
and got:

<?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="domino.dtd" uri="/long/path/domino.dtd"/>
</catalog>

The problem is that matching in the catalog apparently looks up
/path/to/document/domino.dtd instead of just domino.dtd.  Since only
prefix substitution is allowed, there doesn't seem to be a way to
match <anything>/domino.dtd.

The result is that this works fine:
  [/tmp/xml]0$ xmllint --valid --noout note.xml 

But this doesn't:
  [/tmp/xml]0$ xmllint --valid --noout /tmp/xml/note.xml 
  /tmp/xml/note.xml:3: error: failed to load external entity
  "/tmp/xml/domino.dtd"
  <!DOCTYPE document SYSTEM 'domino.dtd'>
                                        ^
  /tmp/xml/note.xml:5: validity error: Validation failed: no DTD found !
  <document xmlns='http://www.lotus.com/dxl' version='1.01' form='Memo'>
                                                                     ^

Am I missing something? Is there a different way to handle the case
where the DTD is specified as a relative path?

Steve



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