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

On Tue, Jan 27, 2004 at 01:30:48PM +0100, Karl Eichwalder wrote:
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.

  yes XML Catalog allows both, and libxml2 catalog implementation allows

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>


paphio:~/XML -> xmlcatalog  /etc/xml/catalog "-//W3C//DTD XHTML 1.0 Strict//EN"
paphio:~/XML -> xmllint --nonet --valid --noout test.xml
paphio:~/XML -> xmllint --version
xmllint: using libxml version 20605
   compiled with: DTDValid FTP HTTP HTML C14N Catalog XPath XPointer XInclude Iconv MemDebug Unicode Regexps 
Automata Schemas
paphio:~/XML ->

  On Red Hat Linux 9 with the xhtml1-dtds package installed providing
the XHTML1 DTDs and proper setup within /etc/xml/catalog

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 .

  I don't understand, there must be something broken in your setup
because looking resources from catalog based on their PUBLIC identifier
do work. Maybe it's a side effect of --nonet , but suggesting that
I would on-purpose violate the XML-1.0 and XML Catalog specs is really
not friendly :-(
  The fact that xmlcatalog, which uses libxml2 catalog support proves
that libxml2 indeed processes lookups based on PUBLIC identifiers...
  Libxml2 doc are XHTML1, they are DTD validated with 
xmllint --nonet --valid --noout as part of the make rebuild test, 
apparently William running on Gentoo has no trouble either !

  Sorry you will have to provide a self contained example of the
problem, there is just too many things missing from your report
that I just can't "debug" it or even try to defend myself from what
seems a relatively unfriendly accusation. Could you at least in the
future give me the benefit of the doubt :-( ? I suggest to use
Canonical URI since from an XML viewpoint they are the mandatory
way to be able to lookup a resource, maybe you disagree with the
way XML was done, sorry I can't help. However I do implement both
PUBLIC and SYSTEM ID lookup from catalogs and revert to actually fetching
remote URLs only when both failed. Maybe there is a bug, that's possible
but your report don't even allow me to check with complete informations.
All I can see is that it seems to work for me and others. If you really
think PUBLIC ID lookup is broken, please come with a small but
complete example showing it, currently I don't have such an example.
If I can't gdb an instance and lookup then I can's fix what you seems
to be seeing. But PLEASE before complaining about a on-purpose spec 
violation, PLEASE at least do the job of providing a full example
allowing to debug the problem as asked on the page about reporting bugs !!!
Not doing so is really unfriendly, because you seems to imply it's
an on-purpose spec violation, and there is little more you can do to
try to offend me from a technical viewpoint !


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]