Re: [xml] xmlRegisterInputCallbacks() from Python? CRASH



On Sun, Feb 23, 2003 at 12:33:54PM -0500, Brad Clements wrote:
One thing I noticed is that if I pass libxml2.setEntityLoader a bound method object, I get 
a GPF under windows when trying to load a stylesheet.

  Calling a class method or a pure method from C to python obviously are
different.

It works if I use a top level function.

  yes because it's what the C code is prepared to accept.

Is there a way to set the entity resolver on just the base .xml document?

  No

And I'd want to pass a bound method object, not a global function.

  Fix the C wrapper to accept both objects and send me the patch after 
making sure the regression tests still pass.
The functions are libxml_xmlSetEntityLoader() can Co. in python/libxml.c

How do I "apply the default stylesheet" to an XML document? That is, I have an .xml 
document that specifies it's stylesheet. Instead of creating the top level stylesheet 
directly and processing the xml that way, 

  cur = libxslt.loadStylesheetPI(style)

see libxslt/python/tests/pyxsltproc.py

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]