[Zope-CMF] NodeAdapterBase doesn't respect xml:whitespace="preserve"
George Lee
georgeleejr at gmail.com
Sat Oct 14 13:03:30 EDT 2006
In Products.GenericSetup.utils, class NodeAdapterBase:
Method _getNodeText does not respect xml:whitespace="preserve":
def _getNodeText(self, node):
text = ''
for child in node.childNodes:
if child.nodeName != '#text':
continue
lines = [ line.lstrip() for line in child.nodeValue.splitlines() ]
text += '\n'.join(lines)
return text
As a result, a node like this:
<property name="sep" type="string" xml:whitespace="preserve"> to </property>
doesn't work to make sure that " to " is stored, not "to ".
Does the xml python library support using xml:whitespace="preserve"? How can
this be fixed?
Peace,
George
More information about the Zope-CMF
mailing list