W3C home > Mailing lists > Public > www-dom@w3.org > January to March 1999

Clarification needed in DOM Level 1 specification

From: Rajiv Mordani <mode@rocketmail.com>
Date: Thu, 7 Jan 1999 17:44:13 -0800 (PST)
Message-ID: <19990108014413.28043.rocketmail@attach1.rocketmail.com>
To: www-dom@w3.org
Subject: Clarification needed regarding the DOM Level
1 specification.

This is with regards to the DOM Level 1 specification
that has been published on October 1 1998. 

In the NamedNodeMap there is a method called
removeNamedItem which is described in the document as
follows:

removeNamedItem 
    Removes a node specified by name. If the removed
node is an Attr with a default value it is
immediately replaced. 
   
    Parameters 
       name
           The name of a node to remove.

    Return Value 
        The node removed from the map or null if no  
          node with such a name exists.
                
    Exceptions 
        DOMException

        NOT_FOUND_ERR: Raised if there is no node
        named name in the map.

In the method  above it is observed that the return
value is'null' if no node with such a name exists and
immediately after it is the exceptions raised which
has DOMException raised if there is no node named
'name' in the NamedNodeMap. It is unclear what should
be the right thing to do here, that is throw an
exception or return value null incase the node isn't
present in the NamedNodeMap.

In most of the cases in the DOM level 1 specification
in such situations the return value is null and the
exceptions that are raised is
NO_MODIFICATION_ALLOWED_ERR. 
Shouldn't the same apply to this method also?

Need clarification regarding this.

Regards
Rajiv







_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com
Received on Thursday, 7 January 1999 20:49:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:46 GMT