[xml] validating and xmlExternalEntityLoader's arguments

Date view Thread view Subject view Author view

From: Michael Mealling (michael@bailey.dscga.com)
Date: Sun Dec 03 2000 - 18:20:06 EST


Hi,
  I'm building a client application that will receive XML back from
several different servers which may decide to put different values in
thier SYSTEM identifier in their DOCTYPE. After poking around
trying to find an example of validatinog as you parsed (i.e.
xmlDoValidityCheckingDefaultValue = 1) it became obvious that
default behavior was to access whatever was in the SYSTEM ID regardless
of what the PUBLIC ID was. So I decided to write an ExternalEntityLoader.
Not finding an example of one I looked at the default one in xmlIO.c.
Its header looks like this:

 * xmlDefaultExternalEntityLoader:
 * @URL: the URL for the entity to load
 * @ID: the System ID for the entity to load
 * @ctxt: the context in which the entity is called or NULL

Is this correct? Does the external entity loader not get the PUBLIC
identifier? If so, how do I know what entity I'm being asked to resolve
if I don't trust the SYSTEM ID?

-MM

-- 
--------------------------------------------------------------------------------
Michael Mealling	|      Vote Libertarian!       | www.rwhois.net/michael
Sr. Research Engineer   |   www.ga.lp.org/gwinnett     | ICQ#:         14198821
Network Solutions	|          www.lp.org          |  michaelm@netsol.com
----
Message from the list xml@rpmfind.net
Archived at : http://xmlsoft.org/messages/
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@rpmfind.net


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Mon Dec 04 2000 - 09:44:03 EST