Re: [xml] arguments to an XSLT transformation in Python



Jacek Konieczny wrote:
On Wed, May 05, 2004 at 08:17:21PM +0200, Martijn Faassen wrote:

[...]

If not, is there a workaround?


Try something like this:

class Data:
        def __init__(self,data):
                self.data=data
        def f(self,ctx,data)
                print self.data
                return 'nothing'

[...]

data = Data({'data':"'test'"})
result = style.applyStylesheet(doc, data.f)

I get the following when I try your modification:

libxslt_xsltApplyStylesheet: parameters not a dict
Segmentation fault

I don't really understand how this approach would help anyway.. Or how it is supposed to work.

Thanks,

Martijn




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