[xml] Re: passing the FPI to the DTD validator
- From: Karl Eichwalder <ke suse de>
- To: veillard redhat com
- Cc: Tobias Reif <tobiasreif pinkjuice com>, xml gnome org
- Subject: [xml] Re: passing the FPI to the DTD validator
- Date: Tue, 27 Jan 2004 15:09:47 +0100
Sorry, I didn't meant to offend you. This in one of my nextCatalogs
does not work:
<public publicId="-//W3C//DTD XHTML 1.0 Strict//EN"
uri="file:///usr/share/sgml/xhtml/xhtml-1.0/DTD/xhtml1-strict.dtd"/>
Adding the following to the same catalog file works:
<system systemId="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
uri="file:///usr/share/sgml/xhtml/xhtml-1.0/DTD/xhtml1-strict.dtd"/>
Then I added the "public" element to the main catalog and, actually, it
works. There seems to be a problem with <nextCatalog
catalog="nextcatalog.xml"/> in /etc/xml/catalog and mapping from
nextcatalog.xml via
<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/xhtml.xml"/>
</group>
to /etc/xml/xhtml.xml where the parser will see the uri information.
And, as I said, it will see the same uri information when given as
"system".
Example shortened as much as possible:
Test document:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-stricxxt.dtd">
<html>
<head>
<title>ke test</title>
</head>
</html>
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>
-=-=-=-=-=-=-=-=-=-=-=-=-=- cut here -=-=-=-=-=-=-=-=-=-=-=-=-=-
Adding to nextcatalog.xml
<delegateSystem systemIdStartString="http://www.w3.org/TR/xhtml"
catalog="file:///etc/xml/testxhtml.xml"/>
and to /etc/xml/testxhtml.xml
<system systemId="http://www.w3.org/TR/xhtml1/DTD/xhtml1-stricxxt.dtd"
uri="file:///usr/share/sgml/xhtml/xhtml-1.0/DTD/xhtml1-strict.dtd"/>
will make xmllint find the file uri.
I hope this helps.
xmllint --version
xmllint: using libxml version 20605
compiled with: DTDValid FTP HTTP HTML C14N Catalog XPath XPointer XInclude Iconv Unicode Regexps Automata
Schemas
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]