[XML-SIG] DOM test failures

Sylvain Thenault Sylvain.Thenault@logilab.fr
Fri, 14 Dec 2001 17:17:45 +0100 (CET)


On Fri, 14 Dec 2001, Martin v. Loewis wrote:

> With the changes to 4DOM a few weeks ago, a number of dom test cases
> stopped working now. I've corrected some occurrences of empty
> namespaces, but some of the remaining errors indicate genuine bugs in
> the implementation.
> 
> For example, in test_node, the following sequence is executed
> 
>     p = doc.createElement('PARENT')
>     if p.localName != None:
>         tester.error('Error getting localName')
> 
> This test now fails, as localName is "PARENT". That appears to be in
> clear violation of DOM level 2, which says
> 
> createElement
>   ...
> 
> Return Value 
> 
>   Element       A new Element object with the nodeName attribute 
>                 set to  tagName, and localName, prefix, and namespaceURI 
>                 set to null.
> 
> So it seems to me that the test is right and the code is wrong. 

You are right, in the sense that the code violate the DOM2 spec, but I
think the code have the _big_ advantage to allow dom tree manipulations
without knowing if the dom tree have been created using the NS interface 
or not.
 
(who said that DOM was wrong ? ;)

-- 
Sylvain Thenault

  LOGILAB           http://www.logilab.org