<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>5898</bug_id>
          
          <creation_ts>2008-07-25 11:56:17 +0000</creation_ts>
          <short_desc>Don&apos;t convert attributes to lowercase for localName/nodeName</short_desc>
          <delta_ts>2010-10-04 14:33:21 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>pre-LC1 HTML5 spec (editor: Ian Hickson)</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Pieters">zcorpan</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>geoffers+w3cbugs</cc>
    
    <cc>hsivonen</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>21331</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2008-07-25 11:56:17 +0000</bug_when>
    <thetext>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&apos;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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21333</commentid>
    <comment_count>1</comment_count>
    <who name="Geoffrey Sneddon">geoffers+w3cbugs</who>
    <bug_when>2008-07-25 12:13:04 +0000</bug_when>
    <thetext>However, the following gives it in lowercase in Firefox and Safari, and in the original case in Opera:

http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A%3Cscript%3Edocument.documentElement.setAttribute(&apos;Foo&apos;%2C%20&apos;bar&apos;)%3B%0Adocument.write(document.documentElement.attributes%5B0%5D.nodeName)%3C%2Fscript%3E</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21334</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2008-07-25 12:14:43 +0000</bug_when>
    <thetext>Yeah but that&apos;s because setAttribute() lowercases -- not .nodeName.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21335</commentid>
    <comment_count>3</comment_count>
    <who name="Henri Sivonen">hsivonen</who>
    <bug_when>2008-07-25 12:18:15 +0000</bug_when>
    <thetext>If at all possible considering existing content, I&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21343</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2008-07-25 21:08:04 +0000</bug_when>
    <thetext>ok. IE doesn&apos;t support it anyway.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>