What follows is either a bug or a user error (that would be mine), but I'd appreciate extra sets of eyes on the problem. I'm just trying to utilize URI rewriting with xml catalogs from the python bindings to libxml2. Check this out: [user host ~]$ xmlcatalog --noout --add rewriteURI http://some.web.site/ file:///some/directory/ catalog [user host ~]$ cat catalog <?xml version="1.0"?> <!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"> <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> <rewriteURI uriStartString="http://some.web.site/" rewritePrefix="file:///some/directory/"/> </catalog> [user host ~]$ python Python 2.3.2 (#1, Nov 21 2003, 14:36:46) [GCC 3.3.2] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import libxml2 cat = libxml2.catalog('catalog') result = cat.resolveURI('http://some.web.site/page')
Segmentation fault [user host ~]$ Instead of segfaulting, shouldn't str(result) be something like 'file:///some/directory/page'? I'm using libxml-2.5.11 and, obviously, Python 2.3.2. If this has already been fixed in the next couple of point releases, I apologize. If this is indeed a bug that still exists, I'll be happy to submit a bug report. If I'm doing something wrong, I'd appreciate any advice you might have to offer. Thanks, and take care, John L. Clark
Attachment:
pgpJGxAjdZRh6.pgp
Description: PGP signature