Re: [xml] alternate DTD locations

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

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.


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:


Daniel Veillard      | Red Hat
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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