[xml] Problem with public entity references



What is going wrong here?  (Example files minimized to show the problem.)

a.dtd:
<!ENTITY % a PUBLIC "-//a//b//c" "">
%a;

a.ent:
<!ELEMENT a EMPTY>

a.xml:
<a/>

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">
  <public
    publicId="-//a//b//c"
    uri="a.ent"/>
</catalog>

% XML_DEBUG_CATALOG=1 XML_CATALOG_FILES=catalog xmllint --noout
--dtdvalid a.dtd a.xml
I/O error : Too many open files
I/O error : Too many open files
a.dtd:2: warning: failed to load external entity "a.dtd"
%a;
   ^
Entity: line 1:
 %a;
    ^
No declaration for element a
Document a.xml does not validate against a.dtd
% xmllint --version
xmllint: using libxml version 20708
   compiled with: Threads Tree Output Push Reader Patterns Writer
SAXv1 FTP HTTP DTDValid HTML Legacy C14N Catalog XPath XPointer
XInclude Iconv ISO8859X Unicode Regexps Automata Expr Schemas
Schematron Modules Debug Zlib



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