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 236 - Case expectations in HTML compatible L1 Core tests
Summary: Case expectations in HTML compatible L1 Core tests
Status: RESOLVED FIXED
Alias: None
Product: DOM TS
Classification: Unclassified
Component: DOM Level 1 (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-06-25 15:06 UTC by Curt Arnold
Modified: 2004-02-09 19:22 UTC (History)
0 users

See Also:


Attachments
Modications to 4 L1 Core tests and adding L2 Core analogs (27.50 KB, patch)
2003-06-27 02:03 UTC, Curt Arnold
Details
Changes for level1/core/hc_attrcreatedocumentfragment (964 bytes, patch)
2003-06-27 13:51 UTC, Curt Arnold
Details
Changes to hc_namednodemapattrnode et al (6.82 KB, patch)
2004-01-24 01:30 UTC, Curt Arnold
Details
Cut and paste error in hc_namednodemapreturnattrnode (670 bytes, patch)
2004-01-24 02:04 UTC, Curt Arnold
Details
Added context="element|attribute" for ignoreCase="auto" (101.50 KB, patch)
2004-02-09 14:22 UTC, Curt Arnold
Details

Description Curt Arnold 2003-06-25 15:06:44 UTC
http://lists.w3.org/Archives/Public/www-dom-ts/2003Jun/0011.html
(additional comments in 0013.html and 0014.html)

Date: Tue, 24 Jun 2003 17:44:55 -0400 (EDT)
From: David Faure <faure@kde.org>
To: www-dom-ts@w3.org
Cc: staikos@kde.org
Message-Id: <200306242344.50947.faure@kde.org>
Subject: Capitalization issues





Hello,

Many tests fail in Konqueror (and almost certainly Safari, maybe other 
browsers too) due to a capitalization issue.
For instance hc_attrname.html expects "class" but since the document
is HTML, we return "CLASS", as per the HTML specification.

According to Curt Arnold this would be (from memory) because the
spec says uppercase, but since Mozilla and IE return lowercase,
the tests were changed to expect lowercase.

But this completely screws up any browser that attempts to actually comply
to the DOM spec, which is what this is all about, isn't it?
If the tests accept that Mozilla and IE return lowercase, why not simply
accept both (the "Mozilla and IE" way, and the "compliant" way, i.e. uppercase)?


PS: congratulations for the improvements to the test suite. It looks much
more complete now, it catches many little unimplemented things - which
I'm fixing one by one :)

-- 
David FAURE, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
Qtella users - stability patches at http://blackie.dk/~dfaure/qtella.html
Comment 1 Curt Arnold 2003-06-27 02:03:28 UTC
Created attachment 21 [details]
Modications to 4 L1 Core tests and adding L2 Core analogs
Comment 2 Curt Arnold 2003-06-27 02:50:49 UTC
http://lists.w3.org/Archives/Public/www-dom-ts/2003Jun/0011.html started a
fairly lengthy thread, however some of my statements were based on an improper
understanding of the problem.

To summarize my current understanding of the issue:

At issue are the L1 Core tests hc_attrname, hc_documentcreatedattribute,
hc_elementgetattributenode and hc_namednodemapgetnameditem.  Unlike originally
supposed, none of the tests involved case expectations for tag names.  

Before the proposed modifications, these tests expected attribute names in all
documents to be returned in lower case which matched the behavior of Internet
Explorer, Mozilla and Safari.

Konqueror 3.1.1 and Opera 7 implemented the behavior specified in the L2 HTML
(http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-5353782642) and returned the
attribute names in upper case for HTML documents resulting in these
implementations failing these four tests.

The L1 Spec does make an explicit statement that in HTML documents tag names
should be returned as upper case, but does not appear to make a statement about
attribute names.

Therefore it seems on this issue that all five of the mentioned browsers
behavior are conformant with DOM L1, but only Konqueror and Opera are conformant
with DOM L2.

The attached patch modifies the existing L1 Core tests so that case-insensitive
comparisons are made on attribute names for HTML documents and lowercase is
expected for XML, XHTML and SVG documents.

In addition, versions of the tests that expect upper-case attribute names in
HTML documents were added to L2 Core along with the supporting test documents.

The WG may want to consider an L2 HTML errata that would make the existing
IE/Mozilla/Safari behavior of lower-casing attribute names normative.

I've committed the patch and have marked the defect as FIXED.  However as with
all changes, the defect is not closed until reviewed and should not be seen as a
definitive resolution.  If the proposed changes are not acceptible, reverting or
modifying the tests is not a problem.

Comment 3 Curt Arnold 2003-06-27 13:51:36 UTC
Created attachment 22 [details]
Changes for level1/core/hc_attrcreatedocumentfragment
Comment 4 Curt Arnold 2003-06-27 16:23:54 UTC
hc_namednodemapsetnameditem also had this problem, but was fixed as part of 
http://www.w3.org/Bugs/Public/show_bug.cgi?id=243.
Comment 5 David Faure 2004-01-23 08:55:11 UTC
hc_namednodemapreturnattrnode, hc_nodeattributenodename and 
hc_noderemovechildnode have the same problem, they expect that the nodeName of 
the attribute is lowercase ("class", "title" or "em", respectively), and the 
test for this says ignoreCase='false'. 
 
Please change to true, for case-insensitive comparison as decided in comment 
#2. 
Comment 6 Curt Arnold 2004-01-24 01:30:19 UTC
Created attachment 203 [details]
Changes to hc_namednodemapattrnode et al
Comment 7 Curt Arnold 2004-01-24 02:04:37 UTC
Created attachment 206 [details]
Cut and paste error in hc_namednodemapreturnattrnode
Comment 8 Curt Arnold 2004-02-09 14:22:12 UTC
Created attachment 220 [details]
Added context="element|attribute" for ignoreCase="auto"

Also removed L2 tests that asserted uppercase attribute names for HTML docs
since an errata should be forthcoming.