From: Daniel Veillard (Daniel.Veillard@w3.org)
Date: Fri Oct 15 1999 - 11:32:41 EDT
On Fri, Oct 15, 1999 at 04:53:40PM +0200, Stephane Conversy wrote:
>
> Hi all.
>
> I can validate my xml documents using libxml.
> The problem is that I need the dtd to be in the same directory than the
> executable, otherwise libxml can't find it:
>
> <?xml version="1.0"?>
> <!DOCTYPE quasi_module SYSTEM "qm.dtd">
>
> My application handles only 2 dtds, so I can get rid of the fact
> that the dtd must be there if I can build 2 'validater' in my
> application
> that don't need a dtd at run-time.
>
> Is it possible now with 1.7.3 ?
I don't really understand what you are suggesting.
The usual way to solve this in authoring systems is to allow a registry
of DtDs inside the application. It can be managed independantly of the
parser, it's just called when the parser needs a file and it uses
for that the PUBLIC and/or SYSTEM identifiers to do so.
This can be done in libwww by providing your own entity loader,
check the routines xmlDefaultExternalEntityLoader,
xmlSetExternalEntityLoader, xmlGetExternalEntityLoader
from xmlIO.c . However I'm not certain that those routines
are actually used now from the loading code. If this doesn't work
I will fix it.
Daniel
-- Daniel.Veillard@w3.org | W3C, INRIA Rhone-Alpes | Today's Bookmarks : Tel : +33 476 615 257 | 655, avenue de l'Europe | Linux, WWW, rpmfind, Fax : +33 476 615 207 | 38330 Montbonnot FRANCE | rpm2html, XML, http://www.w3.org/People/W3Cpeople.html#Veillard | badminton, and Kaffe. ---- Message from the list xml@rufus.w3.org Archived at : http://rufus.w3.org/veillard/XML/messages to unsubscribe: echo "unsubscribe xml" | mail majordomo@rufus.w3.org
This archive was generated by hypermail 2b29 : Wed Aug 02 2000 - 12:29:49 EDT