[XML-SIG] [Bug #124715] DbDom : DocFrag children are orphans

noreply@sourceforge.net noreply@sourceforge.net
Wed, 6 Dec 2000 06:10:31 -0800


Bug #124715, was updated on 2000-Dec-06 06:10
Here is a current snapshot of the bug.

Project: Python/XML
Category: 4Suite
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Submitted by: AFayolle
Assigned to : Nobody
Summary: DbDom : DocFrag children are orphans

Details: When using DocumentFragments in DbDom, a child node of the fragment has no
parentNode. This causes StripXml to crash, and possibly other things. 

Here's a sample demo code:


>>> from Ft.DbDom import Dom
>>> from Ft.Ods import Database
>>> from Ft.DbDom import Reader
>>> from xml.dom.ext import PrettyPrint,StripXml
>>> 
>>> DBNAME='ods:alf@orion:5432:dom_test'
>>> 
>>> db = Database.Database()
>>> db.open(DBNAME)
>>> tx = db.new()
>>> tx.begin()
>>> 
>>> doc = Dom.DocumentImp()
>>> 
>>> e = doc.createElementNS('','root')
>>> doc.appendChild(e)
<DbDom Element Node at 8261610: name='root' with 0 attributes and 0 children>
>>> 
>>> fragment='''<children><node1/><node2/></children>'''
>>> r = Reader.Reader()
>>> f = r.fromString(fragment,doc)
>>> print f.firstChild
<DbDom Element Node at 81d8fe0: name='children' with 0 attributes and 3 children>
>>> print f.firstChild.parentNode
None



For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=124715&group_id=6473