This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 407 - L2 NamedNodeMap NS tests shouldn't use entities/notations
Summary: L2 NamedNodeMap NS tests shouldn't use entities/notations
Status: RESOLVED FIXED
Alias: None
Product: DOM TS
Classification: Unclassified
Component: DOM Level 2 (show other bugs)
Version: unspecified
Hardware: Other other
: P2 normal
Target Milestone: ---
Assignee: Curt Arnold
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-10 17:29 UTC by Andrew Clover
Modified: 2003-12-23 05:38 UTC (History)
0 users

See Also:


Attachments
Patches identified tests (7.89 KB, patch)
2003-12-23 00:36 UTC, Curt Arnold
Details

Description Andrew Clover 2003-12-10 17:29:48 UTC
The tests:

level2/core/namednodemapgetnameditemns01
level2/core/namednodemapsetnameditemns05
level2/core/namednodemapremovenameditemns05

are invalid. NamedItemNS methods cannot be used to access Notation or Entity
nodes, because they always have null namespaceURIs and localNames.

In the case of namednodemapgetnameditemns01 this results in entirely the wrong
result being checked for. In namednodemapsetnameditemns05, it results in an
unexpected null value being passed in to SetNamedItemNS (which may therefore
generate an implementation-specific exception as well as the expected
NO_MODIFICATION_ALLOWED_ERR). In namednodemapremovenameditemns05, it results
in an attempt to remove a non-existant node, in which case a NOT_FOUND_ERR is
allowable as well as NO_MODIFICATION.

(namednodemapsetnameditemns05 and namednodemapremovenameditemns05 also both
get entities and notations the wrong way round, trying to access an entity in
a notation map and vice versa. So even without the NS-methods problem, the
former could generate a HIERARCHY_REQUEST_ERR and the latter a NOT_FOUND.)

These tests should be either removed, changed to operate on read-only
NamedNodeMaps holding Attr nodes (ie. the attributes map of an Element inside
an entity reference), or turned into Level 1 Core tests using non-namespace
methods.
Comment 1 Curt Arnold 2003-12-23 00:36:16 UTC
Created attachment 143 [details]
Patches identified tests
Comment 2 Curt Arnold 2003-12-23 00:38:08 UTC
Adding entities to notations map and vice-versa appeared to be intentional, 
but is defined to raise a HIERARCHY_ERR in L3.  I've changed these tests to 
following the instructions in http://lists.w3.org/Archives/Member/w3c-dom-
ig/2003Nov/0016.html.