Re: [xml] Telling libxml how to find the DTD
- From: Daniel Veillard <veillard redhat com>
- To: murrayc usa net
- Cc: libxml-list <xml gnome org>
- Subject: Re: [xml] Telling libxml how to find the DTD
- Date: Sat, 16 Nov 2002 15:49:07 -0500
On Sat, Nov 16, 2002 at 07:08:15PM +0100, Murray Cumming wrote:
How can I tell the libxml parser where to find an installed DTD? In
Xerces-C++ I had to provide an entity resolver for this.
Hum, usually the XML catalog is the Right Way to do this,
rooted in /etc/xml/catalog it registers the resources locally
installed and is looked automatically by the library when a resource
need to be find.
Now at the API level it is also possible to install a resolver
the signature is
xmlParserInputPtr xmlNoNetExternalEntityLoader(const char *URL,
const char *ID,
xmlParserCtxtPtr ctxt);
taken from the exemple of the resolver installed by xsltproc(.c)
when the nonet option is requested.
Still the best is to make sure the document instances use the
canonical URLs and the public ID for the resources and have them
cleanly installed in the catalogs (like for DocBook on Linux distributions
nowadays).
Daniel
--
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]