Re: [xml] patch: xmlIO: refactor catalog handling in entity loaders

On Fri, Sep 15, 2006 at 03:49:13PM +1000, Michael Day wrote:

The attached patch factors out the catalog resolution from 
xmlDefaultExternalEntityLoader and xmlNoNetExternalEntityLoader and 
places it in a separate function: xmlResolveResourceFromCatalog.

This eliminates code duplication, as both entity loader functions had 
identical catalog resolution code. It also makes it easier for people 
who are writing their own entity loader to use the existing catalog 
mechanism by calling the function.

One issue with the patch: in the original xmlIO.c, the default entity 
loader will only call the no-net entity loader within an #ifdef 
LIBXML_CATALOG_ENABLED, which seems wrong to me, as I would have thought 
that the decision to use the no-net entity loader was independent of 
whether catalogs were enabled or not. In my patch I have taken this call 
outside of the #ifdef; is this correct?

  This all seems to make sense, yes. Applied and commited !

   thanks you!


Red Hat Virtualization group
Daniel Veillard      | virtualization library
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]