Re: [xml] alternate DTD locations



On Tue, Nov 08, 2005 at 10:25:17AM +0000, Paul Emberson wrote:
Hi,

Is is possible to specify a search path for external entities when using 
the xmlreader interface?

Alternatively, is it possible to specify a DTD to fall back on if the 
one specified in the XML file isn't found (again with xmlreader).  E.g. 
it is possible to set a schema with xmlTextReaderSetSchema but I don't 
see a DTD equivalent.

Background:

I am working on a tool which takes its input from xml files which 
specify a dtd in the system identifier.  Currently I have to make 
several copies of the DTDs into whichever directory the input is being 
read from.  I want to be able to specify where the DTDs are stored as a 
configuration option, or possibly derive it from where the executable 
has been installed.  Ideally, I want to be able to specify something 
like an include directory which acts as a base for the URIs in the 
system identifier.
  Set up a catalog, it sounds exactly what you need:
    http://xmlsoft.org/catalog.html

Daniel

-- 
Daniel Veillard      | Red Hat http://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]