[XML-SIG] [ pyxml-Bugs-415640 ] pDomlette does not normalize
noreply@sourceforge.net
noreply@sourceforge.net
Thu, 12 Apr 2001 04:54:53 -0700
Bugs item #415640, was updated on 2001-04-12 04:54
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=106473&aid=415640&group_id=6473
Category: None
Group: None
Status: Open
Priority: 5
Submitted By: Alexandre Fayolle (afayolle)
Assigned to: Nobody/Anonymous (nobody)
Summary: pDomlette does not normalize
Initial Comment:
Affected version : 0.10.2
The header of the pDomlette.py file states that
"Domlette is also automatically normalized". (it also
incorrectly states that Domlette is read only).
Therefore, the implementation of normalize in pDomlette
is as follow:
def normalize(self):
pass
However, pDomlette does not automatically normalize.
Here's a demonstration:
>>> from Ft.Lib.pDomlette import PyExpatReader
>>> from xml.xpath import Evaluate
>>>
>>> d=PyExpatReader().fromString('<doc>glou</doc>')
>>> print d.documentElement.childNodes
[<Domlette Text Node at 81c4988: data='glou'>]
>>> t = d.createTextNode('blaaaaa')
>>> d.documentElement.appendChild(t)
<Domlette Text Node at 81d4438: data='blaaaaa'>
>>> print d.documentElement.childNodes
[<Domlette Text Node at 81c4988: data='glou'>,
<Domlette Text Node at 81d4438: data='blaaaaa'>]
>>>
>>> Evaluate('/doc/text()',d)
[<Domlette Text Node at 81c4988: data='glou'>,
<Domlette Text Node at 81d4438: data='blaaaaa'>]
I'll be working on a patch.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=106473&aid=415640&group_id=6473