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

Daniel Veillard <veillard redhat com> writes:

location of the local copy. I did put such guidelines at 

But there is also http://xmlsoft.org/catalog.html containing some
statements wich are not that clear.  It talks about mapping public
identifiers to local resources.

I have

publicId="-//W3C//DTD XHTML 1.0 Strict//EN"

According to catalog.html and to the XML Catalogs Working Draft by
Norman Walsh such an entry should be sufficient to map the FPI to the
local file - but libxml2 (xmllint) does not work this way.  It insists
either on a system entry with an systemId/uri mapping or on a
rewriteSystem entry.

xmlcatalog see this resource:

xmlcatalog  /etc/xml/catalog "-//W3C//DTD XHTML 1.0 Strict//EN"

but xmllint does not make use of the public identifier at all:

xmllint --nonet --valid --noout test.xml
I/O error : Attempt to load network entity http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd
test.xml:3: validity error : Validation failed: no DTD found !
cat test.xml
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   <title>ke test</title>

If you don't want to support public and publicId in a straight forward
manner I'd recommend to add such info to
http://xmlsoft.org/catalog.html .

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