[lxml-dev] NotImplementedError for external functions with xsl:variable's
Dmitri Fedoruk
dfedoruk at gmail.com
Tue Nov 11 12:59:53 CET 2008
Hello everybody,
> I assume that your real stylesheet creates a result tree
> fragment for the variable that you pass into your function.
To be frank - it's not like that. We used variables just as function
parameters (e.g. a float number). But using a tree is a very powerful
feature, too.
> Please give it a try (after installing
> Cython 0.10).
lxml.etree: (2, 2, -199, 59835)
libxml used: (2, 6, 30)
libxml compiled: (2, 6, 30)
libxslt used: (1, 1, 22)
libxslt compiled: (1, 1, 22)
I've attached the test source. In brief - it works :) I tried to test the
variable as a number literal, as a string and as a tree. I got expected
results in all cases.
> It would be nice if you could come up with a couple of additional test
> cases
> for test_xslt.py to make sure this works (and continues to work) as
> expected
> for different variable values or <xsl:copy-of> scenarios. Currently, there
> is
> only test_variable_result_tree_fragment(), which tests for result trees
> returned by <xsl:apply-templates/>.
I'll try to - sorry, nothing has came up to my mind yet. Maybe we'll
encounter some tricky cases in our templates, then I'll report them.
Cheers,
Dmitri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://codespeak.net/pipermail/lxml-dev/attachments/20081111/6a254932/attachment.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: extern.py
Type: application/octet-stream
Size: 2673 bytes
Desc: not available
Url : http://codespeak.net/pipermail/lxml-dev/attachments/20081111/6a254932/attachment.obj
More information about the lxml-dev
mailing list