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

Clarification needed in the DOM Level 1 specification

From: Rajiv Mordani <mode@rocketmail.com>
Date: Thu, 7 Jan 1999 14:43:54 -0500 (EST)
Message-ID: <19990107194058.22044.rocketmail@web4.rocketmail.com>
To: www-dom@w3.org
Cc: mode@rocketmail.com
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

    Removes a node specified by name. If the removed
node is an Attr with a default value it is
immediately replaced. 
           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.

        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
Shouldn't the same apply to this method also?

Need clarification regarding this.


Get your free @yahoo.com address at http://mail.yahoo.com
Received on Friday, 8 January 1999 03:38:59 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:05 UTC