[xml] Re: passing the FPI to the DTD validator



On Tue, Jan 27, 2004 at 03:09:47PM +0100, Karl Eichwalder wrote:
Catalog snippets:

<?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">
<nextCatalog catalog="nextcatalog.xml"/>
</catalog>

<?xml version="1.0"?>
<!-- this is nextcatalog.xml -->
<!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">
  <group id="xhtml-dtd-2002.4.30-119">
    <delegateSystem systemIdStartString="http://www.w3.org/TR/xhtml"; catalog="file:///etc/xml/xhtml.xml"/>
    <delegatePublic publicIdStartString="-//W3C//DTD XHTML" catalog="file:///etc/xml/testxhtml.xml"/>
  </group>
</catalog>

<?xml version="1.0"?>
<!-- this is /etc/xml/testxhtml.xml -->
<!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="-//W3C//DTD XHTML 1.0 Strict//EN"
          uri="file:///usr/share/sgml/xhtml/xhtml-1.0/DTD/xhtml1-strict.dtd"/>
</catalog>

   I confirm that if I remove the delegateSystem from 
/etc/xml/nextcatalog.xml and fix /etc/xml/testxhtml.xml to have the uri
point to the /usr/share/sgml/xhtml1/xhtml1-20020801/DTD/xhtml1-strict.dtd
file found on my system the DTD is correctly found:

paphio:~/XML -> xmllint --valid --noout --nonet tst.xml
tst.xml:7: element html: validity error : Element html content does not follow the DTD, expecting (head , 
body), got (head )
</html>
       ^
paphio:~/XML ->

  It really seems to boil down to a misunderstanding in the way XML Catalog
resolution works.

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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