prepare for future change in XML API

git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@3391 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
helmutm 2009-05-22 09:33:42 +00:00
parent 67ad477021
commit 971cdfb80a

View file

@ -59,7 +59,7 @@ class Element(object):
for c in children:
if isinstance(c, Element):
base.append(c.baseElement)
elif not base: # no children yet, so it's the first text node
elif len(base) == 0: # no children yet, so it's the first text node
base.text = base.text and ' '.join((base.text, c)) or c
else: # if there are children, append text to the last child's tail
lastChild = base.getchildren()[-1]