Re: [xml] python wrapper for xslt document API: context problem; __cmp__ needed?
- From: Nic James Ferrier <nferrier tapsellferrier co uk>
- To: libxml <xml gnome org>
- Subject: Re: [xml] python wrapper for xslt document API: context problem; __cmp__ needed?
- Date: Wed, 06 Sep 2006 16:08:20 +0100
Nic James Ferrier <nferrier tapsellferrier co uk> writes:
So I think I probably need the stylesheet to implement the Python
comparator interface.
A naive implementation would be in C and would test that the libxslt
stylesheet struct was the same instance. That would do for me.
I've been looking at this more. Here's the steps (I think)
- add a libxslt_xsltCompare(PyObject *a, PyObject *b)
- add python API for the above (alter libxslt-python-api.xml)
- add a new class in libxsl.py: xsltCore with a __cmp__ or an __eq__
that calls libxslt_xsltCompare
- change generator.py's classes_ancestor map to include stylesheet and
transformCtxt as xsltCore objects
I'm still unclear as to how libxslt_xsltCompare might work generically
for stylesheet and transformCtxt objects. It might be that I need 2
different parent classes just to perform this trick.
Someone (Daniel?) verify this isn't mad?
--
Nic Ferrier
http://www.tapsellferrier.co.uk for all your tapsell ferrier needs
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]