[XML-SIG] Re: Narval 1.0 and Python 2.1

Alexandre Fayolle Alexandre.Fayolle@logilab.fr
Tue, 19 Jun 2001 18:45:55 +0200 (CEST)


Hey, Uche, do you remember the bug you ran into while trying out Narval
with a fresh-out-of cvs version of pyxml :

On Thu, 24 May 2001, Uche Ogbuji wrote:

> OK.  Now Engine works, but I get the following running Horn:
> 
> Traceback (most recent call last):
>   File "/home/uogbuji/lib/narval/narval/Horn.py", line 32, in ?
>     from gui.PreferencesManager import HORN_PREFERENCES_MANAGER
>   File "/home/uogbuji/lib/narval/narval/gui/PreferencesManager.py", line
> 356, in ?
>     'data/horn_preferences.xml')))
>   File "/home/uogbuji/lib/narval/narval/gui/PreferencesManager.py", line
> 45, in __init__
>    
> self.tree=read_domtree_from_file(filename,validate=1,catName=cat_path)
>   File "/home/uogbuji/lib/narval/narval/lib.py", line 221, in
> read_domtree_from_file
>     d = StripXml(fragment)
>   File
> "/usr/local/lib/python2.1/site-packages/_xmlplus/dom/ext/__init__.py",
> line 148, in StripXml
>     snit = startNode.ownerDocument.createNodeIterator(startNode,
> NodeFilter.SHOW_TEXT, None, 0)
> AttributeError: 'None' object has no attribute 'createNodeIterator'

I have someone here, running into exactly the same bug, and I really can't
figure out why, especially since he's using pyxml 0.6.5 (and not the cvs
version). I had thought at first that someone had changed a Document's
ownerDocument to be None to match the W3C spec, and you had agreed and
fixed StripXml to match this.

I have checked out the pyxml cvs and it looks like this is not true. in
Document.py, if find 

    def _get_ownerDocument(self):
        return self

I'm totally unable to reproduce this behaviour on any of our
machines (getting a 4DOM Document with None as the ownerDocument). Is
there anyone here with an idea on what's going on ?

TIA

Alexandre Fayolle
-- 
http://www.logilab.com 
Narval is the first software agent available as free software (GPL).
LOGILAB, Paris (France).