[lxml-dev] NotImplementedError for external functions with xsl:variable's
Stefan Behnel
stefan_ml at behnel.de
Wed Oct 29 13:05:24 CET 2008
Hi,
Dmitri Fedoruk wrote:
> <xsl:template match="/">
> <xsl:variable name="query1">asdfadsfadsf</xsl:variable>
> query=<xsl:value-of select="fe:quote($query1)"/>
> </xsl:tempalte>
>
> We have lxml 2.0.1 in production and 2.1 on the development machine. The
> problem occurs, but in slightly different manner, in both situations.
> 2.0.1 just performs nothing and returns an empty string; 2.1 raises
>
> lxml.etree._extension_function_call (src/lxml/lxml.etree.c:82995)
> File "extensions.pxi", line 513, in lxml.etree._unwrapXPathObject
> (src/lxml/lxml.etree.c:81828)
> NotImplementedError
This might or might not be related:
https://bugs.launchpad.net/lxml/+bug/208339
Since you are using 2.0.1, it *might* mean that the exception is raised
but not propagated.
> As far as I can understand, this situation is handled explicitly in 2.1
> and there are reasons for that.
A NotImplementedError means just that: it's not implemented (yet). I don't
know what libxml2 XPath object type is involved here - I should really put
the offending type into the exception message in _unwrapXPathObject() ...
I'll give it a try on my side as soon as I get to it.
Stefan
More information about the lxml-dev
mailing list