Re: [xml] validating and xmlExternalEntityLoader's arguments

Date view Thread view Subject view Author view

From: Daniel Veillard (Daniel.Veillard@w3.org)
Date: Mon Dec 04 2000 - 08:31:39 EST


On Sun, Dec 03, 2000 at 06:20:06PM -0500, Michael Mealling wrote:
>
> 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?

  I think so except that ID is actually the PUBLIC id.

> Does the external entity loader not get the PUBLIC
> identifier?

  URL -> SYSTEM ID
  ID -> PUBLIC ID

> If so, how do I know what entity I'm being asked to resolve
> if I don't trust the SYSTEM ID?

  Put a breakpoint at the function call, you will be 100% sure of what
is provided,

Daniel

-- 
Daniel.Veillard@w3.org | W3C, INRIA Rhone-Alpes  | libxml Gnome XML toolkit
Tel : +33 476 615 257  | 655, avenue de l'Europe | http://xmlsoft.org/
Fax : +33 476 615 207  | 38330 Montbonnot FRANCE | Rpmfind search site
 http://www.w3.org/People/all#veillard%40w3.org  | http://rpmfind.net/
----
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