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 584 - wellformed04 uses createAttribute without expecting normalization problems
Summary: wellformed04 uses createAttribute without expecting normalization problems
Status: RESOLVED FIXED
Alias: None
Product: DOM TS
Classification: Unclassified
Component: DOM Level 3 (show other bugs)
Version: unspecified
Hardware: Other other
: P2 normal
Target Milestone: ---
Assignee: Curt Arnold
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-05 10:51 UTC by Curt Arnold
Modified: 2004-03-05 16:28 UTC (History)
0 users

See Also:


Attachments
Reworked wellformed04 to use NS attr methods (7.80 KB, patch)
2004-03-05 11:26 UTC, Curt Arnold
Details

Description Curt Arnold 2004-03-05 10:51:08 UTC
Hi Curt,

I think that L3 Core test case wellformed04 is incorrect in assuming that
no errors will be reported after normalizing document with 'well-formed'
set to false..  This is because the createAttribute and setAttribute
methods are used rather than the createAttributeNS and setAttributeNS
methods (if you refer to the correctly written wellformed02, the equivalent
test case of wellformed04 is performed with an element node rather than an
attribute node, however the DOM Level 2 methods (createElementNS) are
used).

Since the attribute created in wellformed04 has its local name and prefix
null, this is a DOM Level 1 node, and an error should be reported, though I
may be incorrect.
Reference:
http://www.w3.org/2004/02/PR-DOM-Level-3-Core-20040227/namespaces-algorithms.html

Below are the minor modifications I suggest to this test case.

.
.
<assertDOMException id="xml10InvalidName">
      <INVALID_CHARACTER_ERR>
            <createAttributeNS var="attr" obj="doc"

namespaceURI='"http://www.example.org/domts/wellformed04"'
                        qualifiedName='"LegalName&#2190;"'/>
      </INVALID_CHARACTER_ERR>
</assertDOMException>
<try>
      <xmlVersion obj="doc" value='"1.1"' interface="Document"/>
      <catch>
            <DOMException code="NOT_SUPPORTED_ERR">
                  <return/>
            </DOMException>
      </catch>
</try>
<setAttributeNS obj="docElem"
namespaceURI='"http://www.example.org/domts/wellformed04"'
                        qualifiedName='"LegalName&#2190;"' value='"foo"'/>
<xmlVersion obj="doc" value='"1.0"' interface="Document"/>
.
.

Thanks in advance,
Naela
Comment 1 Curt Arnold 2004-03-05 11:26:00 UTC
Created attachment 276 [details]
Reworked wellformed04 to use NS attr methods

Also added documentnormalizedocument13 to preserve unintended test of L1
attribute in L2 document.