[lxml-dev] annotate, pyannotate, xsiannotate
Stefan Behnel
stefan_ml at behnel.de
Mon Sep 17 20:32:22 CEST 2007
Hi Holger,
jholg at gmx.de wrote:
> Things get difficult if you assign leaf elements and actually instantiate
> the python proxy objects. If no TREE attributes get used, these will end up
> being "default empty elements", usually string elements.
>
> Also, once having been serialized, there is no way that leaf elements can
> be recognized as ObjectifiedElements without the help of the TREE
> attribute. That's the main reason I propose the keep_tree functionality, to
> make ObjectifiedElement-leaves survive a creation-serialization-parse
> cycle.
I think we should do this:
if old_pytypename == TREE_PYTYPE:
if cetree.findChild(c_node, 0) is NULL:
pytype = TREE_PYTYPE
else:
# check old type
Do you still think we need the keep_tree then?
Stefan
More information about the lxml-dev
mailing list