[XML-SIG] [ Newbie ] Parsing XML with an external DTD

Alexandre Fayolle Alexandre.Fayolle@logilab.fr
Mon, 5 Nov 2001 16:42:19 +0100 (CET)


On Mon, 5 Nov 2001, Christophe Prévost wrote:

> Hi everybody !
> 
> I want to parse an xml document
> <?xml version='1.0' encoding='ISO-8859-1' standalone="yes"?>
> <MONDOC>
>     <MONDATA>Blah blah</MONDATA>
> </MONDOC>
> 
> With a dtd... How can i do that without writing the dtd link into the
> document ?

I guess you could wrap your document into another one using an entity
(untested) :
--------------8<--------------------------------
<?xml version='1.0' standalone='no'>
<!DOCTYPE MONDOC SYSTEM "dtd-uri" 
   [<!ENTITY core SYSTEM "mondoc.xml">]
>
&core;
--------------8<--------------------------------

Alexandre Fayolle
-- 
LOGILAB, Paris (France).
http://www.logilab.com   http://www.logilab.fr  http://www.logilab.org
Narval, the first software agent available as free software (GPL).