[xml] Confused: Handling relative paths in catalogs


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"
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<system systemId="domino.dtd" uri="/long/path/domino.dtd"/>

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
  <!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?


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