Re: [xml] Losing _private for external entities [Was: What is the _private field actually for?]



On Mon, Oct 09, 2006 at 12:00:06PM -0400, Daniel Veillard wrote:
On Tue, Oct 03, 2006 at 09:02:30PM +1000, Michael Day wrote:
Hi Daniel,

 You can't change xmlCreateEntityParserCtxt() it's a public API.
The simplest is probably to embbed some of the code of
xmlCreateEntityParserCtxt into xmlParseCtxtExternalEntity, making sure
that _private is copied between xmlNewParserCtxt() and the
xmlLoadExternalEntity() . We don't use a base, so some of the code may
be simplified. 
 If you don't feel okay hacking this I will, but you're in a better
position to test the change :-)

Here is a simple patch that works for me. Is the call to xmlBuildURI() 
still actually necessary?

  Hi Michael,

sorry for the delay, I was travelling again last week (should be back
to normal for the next months). Yes the patch looks fine but as pointed
out the xmlBuildURI() call is unecessary I guess, even if the passed
fle name can't be parsed as an URI the code should work the same if only
one branch of the if/then/else is kept.
  Would you mind doing a reduced patch ?

  I did it, applied and commited to CVS,

    thanks !

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
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]