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 5898 - Don't convert attributes to lowercase for localName/nodeName
Summary: Don't convert attributes to lowercase for localName/nodeName
Status: CLOSED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: pre-LC1 HTML5 spec (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-25 11:56 UTC by Simon Pieters
Modified: 2010-10-04 14:33 UTC (History)
5 users (show)

See Also:


Attachments

Description Simon Pieters 2008-07-25 11:56:17 UTC
The spec says:

   Element.tagName, Node.nodeName, and Node.localName 

      These attributes must return tag names converted to uppercase and
      attribute names converted to lowercase, regardless of the case with
      which they were created.

I can understand that elements need to be converted to uppercase, but can't attribute names be left alone? At least Firefox, Opera and Safari do so:

http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A%3Cscript%3Edocument.documentElement.setAttributeNS(null%2C%20%27Foo%27%2C%20%27bar%27)%3B%0Adocument.write(document.documentElement.attributes[0].nodeName)%3C%2Fscript%3E
Comment 2 Simon Pieters 2008-07-25 12:14:43 UTC
Yeah but that's because setAttribute() lowercases -- not .nodeName.
Comment 3 Henri Sivonen 2008-07-25 12:18:15 UTC
If at all possible considering existing content, I'd love to see Element.localName not upper casing, since not uppercasing would provide for performant code that runs on both HTML and XHTML DOMs.
Comment 4 Ian 'Hixie' Hickson 2008-07-25 21:08:04 UTC
ok. IE doesn't support it anyway.