Re: [xml] [patch] A python binding for xmlCatalogAddLocal



On Tue, Apr 22, 2003 at 12:27:05PM -0500, Brent M Hendricks wrote:
Daniel,

  Hi Brent,

The attached patch implements an addLocalCatalog() method for the python 
parserCtxt class.  It took me a while to actually get into the code 
enough to do this, but as you said[1], it wasn't especially long or 
difficult.  It's slightly less general than xmlCatalogAddLocal() since 
it only operates on a parserCtxt, but that let me avoid the issue with 
passing around unknown void* pointers.

  Okay, I applied the patch,

This is my first foray into the python bindings, so I'd appreciate any 
feedback.  It seems to work, but I might have missed something (eg. do I 
need to free the URL string?)

  Hum, no you should not need to free the string.
  The best is to provide a small self-contained test example like 
python/tests/resolver.py which uses and test the new API.

Would it be worth wrapping xmlCatalogLocalResolve() and 
xmlCatalogLocalResolveURI() as well?

  Hum, those are rather internal APIs, I don't see how they could
be useful to an user layer.

   thanks !

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
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]