2009/9/29 Stefan Behnel
<stefan_ml@behnel.de>
... not as good as that. I just checked, and it actually decouples the
element from the rest of the document before running the XSLT. So that
won't help in the case that the XSLT needs to refer to the ancestors.
Darn!
I wonder if it would make sense to disable the decoupling for plain
Elements. The problem is that this might break code.
Still, in-context sub-tree transformations doesn't seem to be a conceptually far fetched idea. Is the XSLT standard somehow forbidding it? If not, I think it'd be worth discussing it with the libxml people.
OTOH, I expect little XSLT code to really depend on this,
You are probably right -now-, but if the functionality becomes available I suspect it'd be quickly adopted for all sorts of unforeseen purposes.
and it's easy to work around by wrapping the element in an ElementTree object.
I didn't get this. The negatively important thing is that the element is not "in-context" when it's transformed. How would wrapping it in an ElementTree object help?
Manu