Re: [xml] Glitch with external entity files; patch enclosed

Date view Thread view Subject view Author view

From: Daniel Veillard (Daniel.Veillard@w3.org)
Date: Wed Nov 08 2000 - 17:35:14 EST


On Wed, Nov 08, 2000 at 04:11:29PM -0600, Kenneth Pronovici wrote:
> We have been seeing problems with external entity files included in DTDs,
> in our case when using an external entity loader. We're using 2.2.7.
>
> Since all of my DTDs are stored in "/dvl/fds/dtd", my external entity loader
> takes the URL it's passed and tacks "/dvl/fds/dtd" on the front, so libxml
> can find the DTD.

  I think this is completely bogus and the reason of your problem.
You just assume that in all and any URI-Reference computation leading
to an external fetching this sequence should be added. You don't have
the right to do this.

  If your DTD is in /dvl/fds/dtd the URI-Reference from the XML document
should point at it there.
  However I must admit (I discovered it today) that the entity loader
is called and the URI location of the resource effectively used has
been changed, then this must me made available back to the parser. I
think it is through the filename field of the returned
xmlParserInputPtr but I must double check that it's done the right way
(especially if it uses HTTP and a redirection).
 
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 : Wed Nov 08 2000 - 17:44:24 EST