Hello everybody,<br>
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">&nbsp;I assume that your real stylesheet creates a result tree<br>
fragment for the variable that you pass into your function.</blockquote><div>To be frank - it&#39;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.&nbsp;</div>
<div>&nbsp;</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Please give it a try (after installing<br>
Cython 0.10).</blockquote><div></div><div>lxml.etree:        (2, 2, -199, 59835)<br>libxml used:       (2, 6, 30)<br>libxml compiled:   (2, 6, 30)<br>libxslt used:      (1, 1, 22)<br>libxslt compiled:  (1, 1, 22)<br></div>
<div></div><div>I&#39;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.</div><div>&nbsp;</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
It would be nice if you could come up with a couple of additional test cases<br>
for test_xslt.py to make sure this works (and continues to work) as expected<br>
for different variable values or &lt;xsl:copy-of&gt; scenarios. Currently, there is<br>
only test_variable_result_tree_fragment(), which tests for result trees<br>
returned by &lt;xsl:apply-templates/&gt;.</blockquote><div>I&#39;ll try to - sorry, nothing has came up to my mind yet. Maybe we&#39;ll encounter some tricky cases in our templates, then I&#39;ll report them.</div><div></div>
<div>Cheers,</div><div>Dmitri</div></div>