Re: Capitalization issues

On Thursday 2003-06-26 02:01 -0500, Curt Arnold wrote:
> It appears in this case, the L2 HTML specification appears to be in 
> conflict with the dominant browsers and an implementor has to make a 
> decision to adhere to the spec or to maximize compatibility with 
> existing scripts.

As far as I can tell, the statement in the DOM Level 2 specification
that attribute names must be in uppercase:

  For instance, element and attribute names are exposed as all uppercase
  (for consistency) when used on an HTML document, regardless of the
  character case used in the markup.
  [ http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-5353782642 ]

has no analog in the DOM Level 1 specification (and is not listed in the
relevant changes document [1]), which, as far as I know,
only required that element names were uppercase (and said nothing
regarding the case of attribute names):

  The element type names exposed through a property are in uppercase.
  For example, the body element type name is exposed through the
  "tagName" property as "BODY".
  [ http://www.w3.org/TR/REC-DOM-Level-1/level-one-html.html#ID-822762427 ]

This might explain why WinIE and Mozilla use lowercase for attribute
names.  (Given the ambiguity, it might have been thought better to be
compatible with XHTML.  The only piece of history relevant to that
question that I can find is [2], which doesn't say that explicitly,
although I did file the bug regarding element names only.)

(Should this discussion move to www-dom?)

-David

[1] http://www.w3.org/TR/DOM-Level-2-HTML/changes.html
[2] http://bugzilla.mozilla.org/show_bug.cgi?id=6152

-- 
L. David Baron                                <URL: http://dbaron.org/ >

Received on Thursday, 26 June 2003 14:34:24 UTC