[html5] r1936 - [] (0) Case Sensitivity Training

whatwg at whatwg.org whatwg at whatwg.org
Fri Jul 25 02:26:04 PDT 2008


Author: ianh
Date: 2008-07-25 02:26:03 -0700 (Fri, 25 Jul 2008)
New Revision: 1936

Modified:
   index
   source
Log:
[] (0) Case Sensitivity Training

Modified: index
===================================================================
--- index	2008-07-24 22:36:09 UTC (rev 1935)
+++ index	2008-07-25 09:26:03 UTC (rev 1936)
@@ -24,7 +24,7 @@
 
    <h1 id=html-5>HTML 5</h1>
 
-   <h2 class="no-num no-toc" id=draft>Draft Recommendation — 24 July
+   <h2 class="no-num no-toc" id=draft>Draft Recommendation — 25 July
     2008</h2>
 
    <p>You can take part in this work. <a
@@ -143,12 +143,11 @@
 
   <p class=big-issue>Some of the more major known issues are marked like
    this. There are many other issues that have been raised as well; the
-   issues given in this document are not the only known issues! There are
-   also some spec-wide issues that have not yet been addressed:
-   case-sensitivity is a very poorly handled topic right now, and the firing
+   issues given in this document are not the only known issues! Also, firing
    of events needs to be unified (right now some bubble, some don't, they all
-   use different text to fire events, etc). It would also be nice to unify
-   the rules on downloading content when attributes change (e.g. <code
+   use different text to fire events, we don't have an official queueing
+   mechanism, etc). It would also be nice to unify the rules on
+   fetching/downloading content when attributes change (e.g. <code
    title="">src</code> attributes) - should they initiate downloads when the
    element immediately, is inserted in the document, when active scripts end,
    etc. This matters e.g. if an attribute is set twice in a row (does it hit
@@ -225,126 +224,129 @@
         conformance requirements for APIs exposed to JavaScript</a>
       </ul>
 
-     <li><a href="#urls"><span class=secno>2.3 </span>URLs</a>
+     <li><a href="#case-sensitivity"><span class=secno>2.3
+      </span>Case-sensitivity</a>
+
+     <li><a href="#urls"><span class=secno>2.4 </span>URLs</a>
       <ul class=toc>
-       <li><a href="#terminology0"><span class=secno>2.3.1
+       <li><a href="#terminology0"><span class=secno>2.4.1
         </span>Terminology</a>
 
-       <li><a href="#parsing0"><span class=secno>2.3.2 </span>Parsing
+       <li><a href="#parsing0"><span class=secno>2.4.2 </span>Parsing
         URLs</a>
 
-       <li><a href="#resolving"><span class=secno>2.3.3 </span>Resolving
+       <li><a href="#resolving"><span class=secno>2.4.3 </span>Resolving
         URLs</a>
 
-       <li><a href="#dynamic"><span class=secno>2.3.4 </span>Dynamic changes
+       <li><a href="#dynamic"><span class=secno>2.4.4 </span>Dynamic changes
         to base URLs</a>
 
-       <li><a href="#interfaces"><span class=secno>2.3.5 </span>Interfaces
+       <li><a href="#interfaces"><span class=secno>2.4.5 </span>Interfaces
         for URL manipulation</a>
       </ul>
 
-     <li><a href="#common0"><span class=secno>2.4 </span>Common
+     <li><a href="#common0"><span class=secno>2.5 </span>Common
       microsyntaxes</a>
       <ul class=toc>
-       <li><a href="#common1"><span class=secno>2.4.1 </span>Common parser
+       <li><a href="#common1"><span class=secno>2.5.1 </span>Common parser
         idioms</a>
 
-       <li><a href="#boolean"><span class=secno>2.4.2 </span>Boolean
+       <li><a href="#boolean"><span class=secno>2.5.2 </span>Boolean
         attributes</a>
 
-       <li><a href="#numbers"><span class=secno>2.4.3 </span>Numbers</a>
+       <li><a href="#numbers"><span class=secno>2.5.3 </span>Numbers</a>
         <ul class=toc>
-         <li><a href="#unsigned"><span class=secno>2.4.3.1. </span>Unsigned
+         <li><a href="#unsigned"><span class=secno>2.5.3.1. </span>Unsigned
           integers</a>
 
-         <li><a href="#signed"><span class=secno>2.4.3.2. </span>Signed
+         <li><a href="#signed"><span class=secno>2.5.3.2. </span>Signed
           integers</a>
 
-         <li><a href="#real-numbers"><span class=secno>2.4.3.3. </span>Real
+         <li><a href="#real-numbers"><span class=secno>2.5.3.3. </span>Real
           numbers</a>
 
-         <li><a href="#ratios"><span class=secno>2.4.3.4. </span>Ratios</a>
+         <li><a href="#ratios"><span class=secno>2.5.3.4. </span>Ratios</a>
 
-         <li><a href="#percentages-and-dimensions"><span class=secno>2.4.3.5.
+         <li><a href="#percentages-and-dimensions"><span class=secno>2.5.3.5.
           </span>Percentages and dimensions</a>
 
-         <li><a href="#lists"><span class=secno>2.4.3.6. </span>Lists of
+         <li><a href="#lists"><span class=secno>2.5.3.6. </span>Lists of
           integers</a>
         </ul>
 
-       <li><a href="#dates"><span class=secno>2.4.4 </span>Dates and
+       <li><a href="#dates"><span class=secno>2.5.4 </span>Dates and
         times</a>
         <ul class=toc>
-         <li><a href="#specific"><span class=secno>2.4.4.1. </span>Specific
+         <li><a href="#specific"><span class=secno>2.5.4.1. </span>Specific
           moments in time</a>
 
-         <li><a href="#vaguer"><span class=secno>2.4.4.2. </span>Vaguer
+         <li><a href="#vaguer"><span class=secno>2.5.4.2. </span>Vaguer
           moments in time</a>
         </ul>
 
-       <li><a href="#time-offsets"><span class=secno>2.4.5 </span>Time
+       <li><a href="#time-offsets"><span class=secno>2.5.5 </span>Time
         offsets</a>
 
-       <li><a href="#tokens"><span class=secno>2.4.6 </span>Tokens</a>
+       <li><a href="#tokens"><span class=secno>2.5.6 </span>Tokens</a>
 
-       <li><a href="#keywords"><span class=secno>2.4.7 </span>Keywords and
+       <li><a href="#keywords"><span class=secno>2.5.7 </span>Keywords and
         enumerated attributes</a>
 
-       <li><a href="#syntax-references"><span class=secno>2.4.8
+       <li><a href="#syntax-references"><span class=secno>2.5.8
         </span>References</a>
       </ul>
 
-     <li><a href="#common2"><span class=secno>2.5 </span>Common DOM
+     <li><a href="#common2"><span class=secno>2.6 </span>Common DOM
       interfaces</a>
       <ul class=toc>
-       <li><a href="#reflecting"><span class=secno>2.5.1 </span>Reflecting
+       <li><a href="#reflecting"><span class=secno>2.6.1 </span>Reflecting
         content attributes in DOM attributes</a>
 
-       <li><a href="#collections"><span class=secno>2.5.2
+       <li><a href="#collections"><span class=secno>2.6.2
         </span>Collections</a>
         <ul class=toc>
-         <li><a href="#htmlcollection"><span class=secno>2.5.2.1.
+         <li><a href="#htmlcollection"><span class=secno>2.6.2.1.
           </span>HTMLCollection</a>
 
-         <li><a href="#htmlformcontrolscollection"><span class=secno>2.5.2.2.
+         <li><a href="#htmlformcontrolscollection"><span class=secno>2.6.2.2.
           </span>HTMLFormControlsCollection</a>
 
-         <li><a href="#htmloptionscollection"><span class=secno>2.5.2.3.
+         <li><a href="#htmloptionscollection"><span class=secno>2.6.2.3.
           </span>HTMLOptionsCollection</a>
         </ul>
 
-       <li><a href="#domtokenlist"><span class=secno>2.5.3
+       <li><a href="#domtokenlist"><span class=secno>2.6.3
         </span>DOMTokenList</a>
 
-       <li><a href="#domstringmap"><span class=secno>2.5.4
+       <li><a href="#domstringmap"><span class=secno>2.6.4
         </span>DOMStringMap</a>
 
-       <li><a href="#dom-feature"><span class=secno>2.5.5 </span>DOM feature
+       <li><a href="#dom-feature"><span class=secno>2.6.5 </span>DOM feature
         strings</a>
       </ul>
 
-     <li><a href="#fetching"><span class=secno>2.6 </span>Fetching
+     <li><a href="#fetching"><span class=secno>2.7 </span>Fetching
       resources</a>
 
-     <li><a href="#content-type-sniffing"><span class=secno>2.7
+     <li><a href="#content-type-sniffing"><span class=secno>2.8
       </span>Determining the type of a resource</a>
       <ul class=toc>
-       <li><a href="#content-type"><span class=secno>2.7.1
+       <li><a href="#content-type"><span class=secno>2.8.1
         </span>Content-Type metadata</a>
 
-       <li><a href="#content-type0"><span class=secno>2.7.2
+       <li><a href="#content-type0"><span class=secno>2.8.2
         </span>Content-Type sniffing: Web pages</a>
 
-       <li><a href="#content-type1"><span class=secno>2.7.3
+       <li><a href="#content-type1"><span class=secno>2.8.3
         </span>Content-Type sniffing: text or binary</a>
 
-       <li><a href="#content-type2"><span class=secno>2.7.4
+       <li><a href="#content-type2"><span class=secno>2.8.4
         </span>Content-Type sniffing: unknown type</a>
 
-       <li><a href="#content-type3"><span class=secno>2.7.5
+       <li><a href="#content-type3"><span class=secno>2.8.5
         </span>Content-Type sniffing: image</a>
 
-       <li><a href="#content-type4"><span class=secno>2.7.6
+       <li><a href="#content-type4"><span class=secno>2.8.6
         </span>Content-Type sniffing: feed or HTML</a>
       </ul>
     </ul>
@@ -2390,9 +2392,9 @@
    id=xml-compatible>XML-compatible</dfn> if they match the <a
    href="http://www.w3.org/TR/REC-xml/#NT-Name"><code
    title="">Name</code></a> production defined in XML, they contain no U+003A
-   COLON (:) characters, and they do not start with three characters "<code
-   title="">xml</code>". <a href="#refsXML">[XML]</a></p>
-  <!-- XXX case-insensitive ASCII -->
+   COLON (:) characters, and their first three characters are not an <a
+   href="#ascii">ASCII case-insensitive</a> match for the string "<code
+   title="">xml</code>". <a href="#refsXML">[XML]</a>
 
   <h4 id=dom-trees><span class=secno>2.1.2 </span>DOM trees</h4>
 
@@ -2874,15 +2876,48 @@
   requirement in the canvas section for toDataURL() and
   getContext(). -->
 
-  <h3 id=urls><span class=secno>2.3 </span>URLs</h3>
+  <h3 id=case-sensitivity><span class=secno>2.3 </span>Case-sensitivity</h3>
 
+  <p>This specification defines several comparison operators for strings.
+
+  <p>Comparing two strings in a <dfn id=case-sensitive>case-sensitive</dfn>
+   manner means comparing them exactly, codepoint for codepoint.
+
+  <p>Comparing two strings in a <dfn id=ascii>ASCII case-insensitive</dfn>
+   manner means comparing them exactly, codepoint for codepoint, except that
+   the characters in the range U+0041 .. U+005A (i.e. LATIN CAPITAL LETTER A
+   to LATIN CAPITAL LETTER Z) and the corresponding characters in the range
+   U+0061 .. U+007A (i.e. LATIN SMALL LETTER A to LATIN SMALL LETTER Z) are
+   considered to also match.
+
+  <p>Comparing two strings in a <dfn id=compatibility>compatibility
+   caseless</dfn> manner means using the Unicode <i>compatibility caseless
+   match</i> operation to compare the two strings. <a
+   href="#refsUNICODECASE">[UNICODECASE]</a></p>
+  <!-- XXX refs to
+  Unicode Standard Annex #21, Case Mappings -->
+
+  <p><dfn id=converting title="converted to uppercase">Converting a string to
+   uppercase</dfn> means replacing all characters in the range U+0061 ..
+   U+007A (i.e. LATIN SMALL LETTER A to LATIN SMALL LETTER Z) with the
+   corresponding characters in the range U+0041 .. U+005A (i.e. LATIN CAPITAL
+   LETTER A to LATIN CAPITAL LETTER Z).
+
+  <p><dfn id=converting0 title="converted to lowercase">Converting a string
+   to lowercase</dfn> means replacing all characters in the range U+0041 ..
+   U+005A (i.e. LATIN CAPITAL LETTER A to LATIN CAPITAL LETTER Z) with the
+   corresponding characters in the range U+0061 .. U+007A (i.e. LATIN SMALL
+   LETTER A to LATIN SMALL LETTER Z).
+
+  <h3 id=urls><span class=secno>2.4 </span>URLs</h3>
+
   <p>This specification defines the term <a href="#url">URL</a>, and defines
    various algorithms for dealing with URLs, because for historical reasons
    the rules defined by the URI and IRI specifications are not a complete
    description of what HTML user agents need to implement to be compatible
    with Web content.
 
-  <h4 id=terminology0><span class=secno>2.3.1 </span>Terminology</h4>
+  <h4 id=terminology0><span class=secno>2.4.1 </span>Terminology</h4>
 
   <p>A <dfn id=url>URL</dfn> is a string used to identify a resource. <span
    id=urldoc>A <a href="#url">URL</a> is always associated with a
@@ -2922,7 +2957,7 @@
    specification if they pretend the term "URL" as used herein is really
    called something else altogether.
 
-  <h4 id=parsing0><span class=secno>2.3.2 </span>Parsing URLs</h4>
+  <h4 id=parsing0><span class=secno>2.4.2 </span>Parsing URLs</h4>
 
   <p>To <dfn id=parse0>parse a URL</dfn> <var title="">url</var> into its
    component parts, the user agent must use the following steps:
@@ -3038,7 +3073,7 @@
   it's not clear RFC3986 does a good job of defining that anymore
   (earlier URI specs did) -->
 
-  <h4 id=resolving><span class=secno>2.3.3 </span>Resolving URLs</h4>
+  <h4 id=resolving><span class=secno>2.4.3 </span>Resolving URLs</h4>
 
   <p>Relative URLs are resolved relative to a base URL. The <dfn
    id=base->base URL</dfn> of a <a href="#url">URL</a> is the <a
@@ -3245,7 +3280,7 @@
    href="#resolve" title="resolve a URL">resolving</a> it results in the same
    URL without an error.
 
-  <h4 id=dynamic><span class=secno>2.3.4 </span>Dynamic changes to base URLs</h4>
+  <h4 id=dynamic><span class=secno>2.4.4 </span>Dynamic changes to base URLs</h4>
 
   <p>When an <code title=attr-xml-base><a href="#xmlbase">xml:base</a></code>
    attribute changes, the attribute's element, and all descendant elements,
@@ -3309,7 +3344,7 @@
      URL</a> that might no longer correspond to the image being shown.</p>
   </dl>
 
-  <h4 id=interfaces><span class=secno>2.3.5 </span>Interfaces for URL
+  <h4 id=interfaces><span class=secno>2.4.5 </span>Interfaces for URL
    manipulation</h4>
 
   <p>An interface that has a complement of <dfn id=url-decomposition>URL
@@ -3573,7 +3608,7 @@
    </table>
   </div>
 
-  <h3 id=common0><span class=secno>2.4 </span>Common microsyntaxes</h3>
+  <h3 id=common0><span class=secno>2.5 </span>Common microsyntaxes</h3>
 
   <p>There are various places in HTML that accept particular data types, such
    as dates or numbers. This section describes what the conformance criteria
@@ -3585,7 +3620,7 @@
    attribute values are clearly defined either in terms of microsyntaxes or
    in terms of other specs, or as "Text" or some such.
 
-  <h4 id=common1><span class=secno>2.4.1 </span>Common parser idioms</h4>
+  <h4 id=common1><span class=secno>2.5.1 </span>Common parser idioms</h4>
 
   <p>The <dfn id=space title="space character">space characters</dfn>, for
    the purposes of this specification, are U+0020 SPACE, U+0009 CHARACTER
@@ -3631,7 +3666,7 @@
    the Unicode character class Zs. In both cases, the collected characters
    are not used. <a href="#refsUNICODE">[UNICODE]</a>
 
-  <h4 id=boolean><span class=secno>2.4.2 </span>Boolean attributes</h4>
+  <h4 id=boolean><span class=secno>2.5.2 </span>Boolean attributes</h4>
 
   <p>A number of attributes in HTML5 are <dfn id=boolean0 title="boolean
    attribute">boolean attributes</dfn>. The presence of a boolean attribute
@@ -3639,12 +3674,13 @@
    represents the false value.
 
   <p>If the attribute is present, its value must either be the empty string
-   or a value that is a case-insensitive <!-- XXX ASCII --> match for the
-   attribute's canonical name, with no leading or trailing whitespace.
+   or a value that is a, <a href="#ascii">ASCII case-insensitive</a> match
+   for the attribute's canonical name, with no leading or trailing
+   whitespace.
 
-  <h4 id=numbers><span class=secno>2.4.3 </span>Numbers</h4>
+  <h4 id=numbers><span class=secno>2.5.3 </span>Numbers</h4>
 
-  <h5 id=unsigned><span class=secno>2.4.3.1. </span>Unsigned integers</h5>
+  <h5 id=unsigned><span class=secno>2.5.3.1. </span>Unsigned integers</h5>
 
   <p>A string is a <dfn id=valid0>valid non-negative integer</dfn> if it
    consists of one of more characters in the range U+0030 DIGIT ZERO (0) to
@@ -3705,7 +3741,7 @@
     <p>Return <var title="">value</var>.
   </ol>
 
-  <h5 id=signed><span class=secno>2.4.3.2. </span>Signed integers</h5>
+  <h5 id=signed><span class=secno>2.5.3.2. </span>Signed integers</h5>
 
   <p>A string is a <dfn id=valid1>valid integer</dfn> if it consists of one
    of more characters in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE
@@ -3783,7 +3819,7 @@
      title="">value</var>, otherwise return 0-<var title="">value</var>.
   </ol>
 
-  <h5 id=real-numbers><span class=secno>2.4.3.3. </span>Real numbers</h5>
+  <h5 id=real-numbers><span class=secno>2.5.3.3. </span>Real numbers</h5>
 
   <p>A string is a <dfn id=valid2>valid floating point number</dfn> if it
    consists of one of more characters in the range U+0030 DIGIT ZERO (0) to
@@ -3905,7 +3941,7 @@
      title="">value</var>, otherwise return 0-<var title="">value</var>.
   </ol>
 
-  <h5 id=ratios><span class=secno>2.4.3.4. </span>Ratios</h5>
+  <h5 id=ratios><span class=secno>2.5.3.4. </span>Ratios</h5>
 
   <p class=note>The algorithms described in this section are used by the
    <code><a href="#progress">progress</a></code> and <code><a
@@ -4053,7 +4089,7 @@
    <li>Return <var title="">number</var>.
   </ol>
 
-  <h5 id=percentages-and-dimensions><span class=secno>2.4.3.5.
+  <h5 id=percentages-and-dimensions><span class=secno>2.5.3.5.
    </span>Percentages and dimensions</h5>
 
   <p class=big-issue><dfn id=valid4>valid positive non-zero integers</dfn>
@@ -4061,7 +4097,7 @@
    height/width on img, embed, object — lengths in css pixels or
    percentages)
 
-  <h5 id=lists><span class=secno>2.4.3.6. </span>Lists of integers</h5>
+  <h5 id=lists><span class=secno>2.5.3.6. </span>Lists of integers</h5>
 
   <p>A <dfn id=valid5>valid list of integers</dfn> is a number of <a
    href="#valid1" title="valid integer">valid integers</a> separated by
@@ -4342,7 +4378,7 @@
     <p>Return the <var title="">numbers</var> list and abort.
   </ol>
 
-  <h4 id=dates><span class=secno>2.4.4 </span>Dates and times</h4>
+  <h4 id=dates><span class=secno>2.5.4 </span>Dates and times</h4>
 
   <p>In the algorithms below, the <dfn id=number>number of days in month <var
    title="">month</var> of year <var title="">year</var></dfn> is:
@@ -4353,7 +4389,7 @@
    4 but not by 100; and <em>28</em> otherwise. This takes into account leap
    years in the Gregorian calendar. <a href="#refsGREGORIAN">[GREGORIAN]</a>
 
-  <h5 id=specific><span class=secno>2.4.4.1. </span>Specific moments in time</h5>
+  <h5 id=specific><span class=secno>2.5.4.1. </span>Specific moments in time</h5>
 
   <p>A string is a <dfn id=valid6>valid datetime</dfn> if it has four digits
    (representing the year), a literal hyphen, two digits (representing the
@@ -4669,7 +4705,7 @@
     <p>Return <var title="">time</var> and <var title="">timezone</var>.
   </ol>
 
-  <h5 id=vaguer><span class=secno>2.4.4.2. </span>Vaguer moments in time</h5>
+  <h5 id=vaguer><span class=secno>2.5.4.2. </span>Vaguer moments in time</h5>
 
   <p>This section defines <dfn id=date-or title="date or time string">date or
    time strings</dfn>. There are two kinds, <dfn id=date-or0 title="date or
@@ -5051,14 +5087,14 @@
     <p>Abort these steps (the string is parsed).
   </ol>
 
-  <h4 id=time-offsets><span class=secno>2.4.5 </span>Time offsets</h4>
+  <h4 id=time-offsets><span class=secno>2.5.5 </span>Time offsets</h4>
 
   <p class=big-issue><dfn id=valid7>valid time offset</dfn>, <dfn
    id=rules4>rules for parsing time offsets</dfn>, <dfn id=time-offset>time
    offset serialization rules</dfn>; in the format "5d4h3m2s1ms" or "3m 9.2s"
    or "00:00:00.00" or similar.
 
-  <h4 id=tokens><span class=secno>2.4.6 </span>Tokens</h4>
+  <h4 id=tokens><span class=secno>2.5.6 </span>Tokens</h4>
 
   <p>A <dfn id=set-of>set of space-separated tokens</dfn> is a set of zero or
    more words separated by one or more <a href="#space" title="space
@@ -5202,7 +5238,7 @@
    to a single space, except at the start and end of the string, where such
    spaces are removed.
 
-  <h4 id=keywords><span class=secno>2.4.7 </span>Keywords and enumerated
+  <h4 id=keywords><span class=secno>2.5.7 </span>Keywords and enumerated
    attributes</h4>
 
   <p>Some attributes are defined as taking one of a finite set of keywords.
@@ -5216,21 +5252,19 @@
    default</em>, the second is the <em>missing value default</em>.
 
   <p>If an enumerated attribute is specified, the attribute's value must be
-   one of the given keywords that are not said to be non-conforming, with no
-   leading or trailing whitespace. The keyword may use any mix of uppercase
-   and lowercase letters.<!-- XXX should
-  say "uppercase and lowercase ASCII letters" or some such -->
+   an <a href="#ascii">ASCII case-insensitive</a> match for one of the given
+   keywords that are not said to be non-conforming, with no leading or
+   trailing whitespace.
 
-  <p>When the attribute is specified, if its value
-   <span>case-insensitively</span><!-- XXX ascii case folding --> matches one
-   of the given keywords then that keyword's state is the state that the
-   attribute represents. If the attribute value matches none of the given
-   keywords, but the attribute has an <em>invalid value default</em>, then
-   the attribute represents that state. Otherwise, if the attribute value
-   matches none of the keywords but there is a <em>missing value default</em>
-   state defined, then <em>that</em> is the state represented by the
-   attribute. Otherwise, there is no default, and invalid values must be
-   ignored.
+  <p>When the attribute is specified, if its value is an <span>ASCII
+   case-insensitively</span> match for one of the given keywords then that
+   keyword's state is the state that the attribute represents. If the
+   attribute value matches none of the given keywords, but the attribute has
+   an <em>invalid value default</em>, then the attribute represents that
+   state. Otherwise, if the attribute value matches none of the keywords but
+   there is a <em>missing value default</em> state defined, then
+   <em>that</em> is the state represented by the attribute. Otherwise, there
+   is no default, and invalid values must be ignored.
 
   <p>When the attribute is <em>not</em> specified, if there is a <em>missing
    value default</em> state defined, then that is the state represented by
@@ -5248,7 +5282,7 @@
    <em>missing value default</em>), but for various reasons that isn't the
    way this specification actually defines it.
 
-  <h4 id=syntax-references><span class=secno>2.4.8 </span>References</h4>
+  <h4 id=syntax-references><span class=secno>2.5.8 </span>References</h4>
 
   <p>A <dfn id=valid8>valid hash-name reference</dfn> to an element of type
    <var title="">type</var> is a string consisting of a U+0023 NUMBER SIGN
@@ -5273,16 +5307,22 @@
    <li>
     <p>Return the first element of type <var title="">type</var> that has an
      <code title=attr-id><a href="#id">id</a></code> or <code
-     title="">name</code> attribute whose value <!-- Unicode,
-   apparently: <annevk> seems IE might be Unicode case-insensitive for
-   ID [and name] values (related to <map> anyway, and at least for the
-   character ë -->
-     case-insensitively matches <var title="">s</var>.
+     title="">name</code> attribute whose value is a <a
+     href="#compatibility">compatibility caseless</a> match for <var
+     title="">s</var>.
+   </li>
+   <!--
+   That's what IE does:
+   http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A%3Cmap%20name%3D%22T%26eacute%3B%26%23x01F1%3B%26%23x2075%3B%22%3E%3Carea%20href%3D%22%2F%22%20shape%3Drect%20coords%3D0%2C0%2C200%2C200%3E%3C%2Fmap%3E%0A%3Cimg%20usemap%3D%22%23t%26Eacute%3BDZ5%22%20src%3Dimage%3E
+   ...except that doesn't explain why this fails:
+   http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A%3Cmap%20name%3D%22T%26eacute%3B%26%23x01F1%3B%26%23x2075%3B%26%23xFB01%3B%22%3E%3Carea%20href%3D%22%2F%22%20shape%3Drect%20coords%3D0%2C0%2C200%2C200%3E%3C%2Fmap%3E%0A%3Cimg%20usemap%3D%22%23t%26Eacute%3BDZ5F%26%23x0131%3B%26%23x0307%3B%22%20src%3Dimage%3E
+   maybe they just don't know about combining dot above?
+   -->
   </ol>
 
-  <h3 id=common2><span class=secno>2.5 </span>Common DOM interfaces</h3>
+  <h3 id=common2><span class=secno>2.6 </span>Common DOM interfaces</h3>
 
-  <h4 id=reflecting><span class=secno>2.5.1 </span>Reflecting content
+  <h4 id=reflecting><span class=secno>2.6.1 </span>Reflecting content
    attributes in DOM attributes</h4>
 
   <p>Some <span title="DOM attribute">DOM attributes</span> are defined to
@@ -5320,13 +5360,13 @@
    on getting, the DOM attribute must return the conforming value associated
    with the state the attribute is in (in its canonical case), or the empty
    string if the attribute is in a state that has no associated keyword
-   value; and on setting, if the new value case-insensitively <!-- XXX -->
-   matches one of the keywords given for that attribute, then the content
-   attribute must be set to the conforming value associated with the state
-   that the attribute would be in if set to the given new value, otherwise,
-   if the new value is the empty string, then the content attribute must be
-   removed, otherwise, the setter must raise a <code>SYNTAX_ERR</code>
-   exception.
+   value; and on setting, if the new value is an <a href="#ascii">ASCII
+   case-insensitive</a> match for one of the keywords given for that
+   attribute, then the content attribute must be set to the conforming value
+   associated with the state that the attribute would be in if set to the
+   given new value, otherwise, if the new value is the empty string, then the
+   content attribute must be removed, otherwise, the setter must raise a
+   <code>SYNTAX_ERR</code> exception.
 
   <p>If a reflecting DOM attribute is a <code>DOMString</code> but doesn't
    fall into any of the above categories, then the getting and setting must
@@ -5446,7 +5486,7 @@
    attribute. Otherwise, the DOM attribute must be set to the empty string.</p>
   <!-- XXX or raise an exception? -->
 
-  <h4 id=collections><span class=secno>2.5.2 </span>Collections</h4>
+  <h4 id=collections><span class=secno>2.6.2 </span>Collections</h4>
 
   <p>The <code><a href="#htmlcollection0">HTMLCollection</a></code>, <code><a
    href="#htmlformcontrolscollection0">HTMLFormControlsCollection</a></code>,
@@ -5478,7 +5518,7 @@
   <p>An attribute that returns a collection must return the same object every
    time it is retrieved.
 
-  <h5 id=htmlcollection><span class=secno>2.5.2.1. </span>HTMLCollection</h5>
+  <h5 id=htmlcollection><span class=secno>2.6.2.1. </span>HTMLCollection</h5>
 
   <p>The <code><a href="#htmlcollection0">HTMLCollection</a></code> interface
    represents a generic <a href="#collections0"
@@ -5524,7 +5564,7 @@
 
   <p>If no such elements are found, then the method must return null.
 
-  <h5 id=htmlformcontrolscollection><span class=secno>2.5.2.2.
+  <h5 id=htmlformcontrolscollection><span class=secno>2.6.2.2.
    </span>HTMLFormControlsCollection</h5>
 
   <p>The <code><a
@@ -5584,7 +5624,7 @@
 http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E...%0A%3Cform%20name%3D%22a%22%3E%3Cinput%20id%3D%22x%22%20name%3D%22y%22%3E%3Cinput%20name%3D%22x%22%20id%3D%22y%22%3E%3C/form%3E%0A%3Cscript%3E%0A%20%20var%20x%3B%0A%20%20w%28x%20%3D%20document.forms%5B%27a%27%5D%5B%27x%27%5D%29%3B%0A%20%20w%28x.length%29%3B%0A%20%20x%5B0%5D.parentNode.removeChild%28x%5B0%5D%29%3B%0A%20%20w%28x.length%29%3B%0A%20%20w%28x%20%3D%3D%20document.forms%5B%27a%27%5D%5B%27x%27%5D%29%3B%0A%3C/script%3E%0A
 -->
 
-  <h5 id=htmloptionscollection><span class=secno>2.5.2.3.
+  <h5 id=htmloptionscollection><span class=secno>2.6.2.3.
    </span>HTMLOptionsCollection</h5>
 
   <p>The <code><a
@@ -5665,7 +5705,7 @@
    HTMLSelectElement and HTMLOptionsCollection on the same object, and so
    people use them almost interchangeably in the wild.
 
-  <h4 id=domtokenlist><span class=secno>2.5.3 </span>DOMTokenList</h4>
+  <h4 id=domtokenlist><span class=secno>2.6.3 </span>DOMTokenList</h4>
 
   <p>The <code><a href="#domtokenlist0">DOMTokenList</a></code> interface
    represents an interface to an underlying string that consists of an <a
@@ -5807,7 +5847,7 @@
    id=stringify title=dom-tokenlist-toString>stringify</dfn> to the object's
    underlying string representation.
 
-  <h4 id=domstringmap><span class=secno>2.5.4 </span>DOMStringMap</h4>
+  <h4 id=domstringmap><span class=secno>2.6.4 </span>DOMStringMap</h4>
 
   <p>The <code><a href="#domstringmap0">DOMStringMap</a></code> interface
    represents a set of name-value pairs. When a <code><a
@@ -5842,7 +5882,7 @@
    deleting names, passing <var title="">name</var> as the name, and must
    return true.
 
-  <h4 id=dom-feature><span class=secno>2.5.5 </span>DOM feature strings</h4>
+  <h4 id=dom-feature><span class=secno>2.6.5 </span>DOM feature strings</h4>
 
   <p>DOM3 Core defines mechanisms for checking for interface support, and for
    obtaining implementations of interfaces, using <a
@@ -5878,7 +5918,7 @@
    "<code>5.0</code>" also supports "<code title="">HTML</code>"
    "<code>2.0</code>".
 
-  <h3 id=fetching><span class=secno>2.6 </span>Fetching resources</h3>
+  <h3 id=fetching><span class=secno>2.7 </span>Fetching resources</h3>
 
   <p class=big-issue>replace all instances of the word 'fetch' or 'download'
    with a reference to this section, and put something here that talks about
@@ -5895,7 +5935,7 @@
   (e.g. not loading video poster frames until the video is on the
   screen) -->
 
-  <h3 id=content-type-sniffing><span class=secno>2.7 </span>Determining the
+  <h3 id=content-type-sniffing><span class=secno>2.8 </span>Determining the
    type of a resource</h3>
 
   <p class=warning>It is imperative that the rules in this section be
@@ -5907,7 +5947,7 @@
    the end user can be exposed to malicious content, making the user
    vulnerable to cookie theft attacks and other cross-site scripting attacks.
 
-  <h4 id=content-type><span class=secno>2.7.1 </span>Content-Type metadata</h4>
+  <h4 id=content-type><span class=secno>2.8.1 </span>Content-Type metadata</h4>
 
   <p>What explicit <dfn id=content-type5 title=Content-Type>Content-Type
    metadata</dfn> is associated with the resource (the resource's type
@@ -5939,9 +5979,9 @@
 
   <ol>
    <li>
-    <p>Find the first seven characters in <var title="">s</var> that are a
-     case-insensitive<!-- XXX ASCII--> match for the word 'charset'. If no
-     such match is found, return nothing.</p>
+    <p>Find the first seven characters in <var title="">s</var> that are an
+     <a href="#ascii">ASCII case-insensitive</a> match for the word
+     "charset". If no such match is found, return nothing.</p>
 
    <li>
     <p>Skip any U+0009, U+000A, U+000C, U+000D, or U+0020 characters that
@@ -5990,7 +6030,7 @@
   <p class=note>The above algorithm is a willful violation of the HTTP
    specification. <a href="#refsRFC2616">[RFC2616]</a>
 
-  <h4 id=content-type0><span class=secno>2.7.2 </span>Content-Type sniffing:
+  <h4 id=content-type0><span class=secno>2.8.2 </span>Content-Type sniffing:
    Web pages</h4>
 
   <p>The <dfn id=sniffed title="Content-Type sniffing">sniffed type of a
@@ -5998,14 +6038,6 @@
 
   <ol>
    <li>
-    <p>Let <var title="">official type</var> be the type given by the <a
-     href="#content-type5" title=Content-Type>Content-Type metadata</a> for
-     the resource (in lowercase<!-- XXX ASCII case folding -->, ignoring any
-     parameters). If there is no such type, jump to the <i
-     title="content-type sniffing: unknown type"><a
-     href="#content-type7">unknown type</a></i> step below.
-
-   <li>
     <p>If the user agent is configured to strictly obey Content-Type headers
      for this resource, then jump to the last step in this set of steps.
 
@@ -6058,14 +6090,25 @@
     
 
    <li>
+    <p>Let <var title="">official type</var> be the type given by the <a
+     href="#content-type5" title=Content-Type>Content-Type metadata</a> for
+     the resource, ignoring parameters. If there is no such type, jump to the
+     <i title="content-type sniffing: unknown type"><a
+     href="#content-type7">unknown type</a></i> step below. Comparisons with
+     this type, as defined by MIME specifications, are done in an <a
+     href="#ascii">ASCII case-insensitive</a> manner. <a
+     href="#refsRFC2046">[RFC2046]</a>
+
+   <li>
     <p>If <var title="">official type</var> is "unknown/unknown" or
      "application/unknown", jump to the <i title="content-type sniffing:
      unknown type"><a href="#content-type7">unknown type</a></i> step below.</p>
-    <!-- In a study looking at many billions of pages whose first five
-   characters were "<HTML", "unknown/unknown" was used to label
-   documents about once for every 5000 pages labeled "text/html", and
-   "application/unknown" was used about once for every 35000 pages
-   labeled "text/html". -->
+    <!-- In a study
+   looking at many billions of pages whose first five characters were
+   "<HTML", "unknown/unknown" was used to label documents about once
+   for every 5000 pages labeled "text/html", and "application/unknown"
+   was used about once for every 35000 pages labeled
+   "text/html". -->
 
    <li>
     <p>If <var title="">official type</var> ends in "+xml", or if it is
@@ -6080,7 +6123,8 @@
     <p>If <var title="">official type</var> is an image type supported by the
      user agent (e.g. "image/png", "image/gif", "image/jpeg", etc), then jump
      to the <i title="content-type sniffing: image"><a
-     href="#content-type8">images</a></i> section below.
+     href="#content-type8">images</a></i> section below, passing it the <var
+     title="">official type</var>.
 
    <li>
     <p>If <var title="">official type</var> is "text/html", then jump to the
@@ -6091,7 +6135,7 @@
     <p>The sniffed type of the resource is <var title="">official type</var>.
   </ol>
 
-  <h4 id=content-type1><span class=secno>2.7.3 </span><dfn
+  <h4 id=content-type1><span class=secno>2.8.3 </span><dfn
    id=content-type6>Content-Type sniffing: text or binary</dfn></h4>
 
   <ol>
@@ -6195,7 +6239,7 @@
    <li> 0x1C - 0x1F
   </ul>
 
-  <h4 id=content-type2><span class=secno>2.7.4 </span><dfn
+  <h4 id=content-type2><span class=secno>2.8.4 </span><dfn
    id=content-type7>Content-Type sniffing: unknown type</dfn></h4>
 
   <ol>
@@ -6531,7 +6575,7 @@
    binary" section, to avoid sniffing <code title="">text/plain</code>
    content as a type that can be used for a privilege escalation attack.
 
-  <h4 id=content-type3><span class=secno>2.7.5 </span><dfn
+  <h4 id=content-type3><span class=secno>2.8.5 </span><dfn
    id=content-type8>Content-Type sniffing: image</dfn></h4>
 
   <p>If the first bytes of the resource match one of the byte sequences in
@@ -6603,7 +6647,7 @@
   <p>Otherwise, the sniffed type of the resource is the same as its <var
    title="">official type</var>.
 
-  <h4 id=content-type4><span class=secno>2.7.6 </span><dfn
+  <h4 id=content-type4><span class=secno>2.8.6 </span><dfn
    id=content-type9>Content-Type sniffing: feed or HTML</dfn></h4>
   <!-- mostly based on:
    http://blogs.msdn.com/rssteam/articles/PublishersGuide.aspx
@@ -7243,7 +7287,7 @@
 
   <p>The <dfn id=getelementsbyname
    title=dom-document-getElementsByName><code>getElementsByName(<var
-   title="">name</var>)</code></dfn> method a string <var
+   title="">name</var>)</code></dfn> method takes a string <var
    title="">name</var>, and must return a live <code>NodeList</code>
    containing all the <code><a href="#a">a</a></code>, <code><a
    href="#applet">applet</a></code>, <code>button</code>, <code>form</code>,
@@ -7254,10 +7298,11 @@
    <code><a href="#object">object</a></code>,<!-- param?
   XXX-->
    <code>select</code>, and <code>textarea</code> elements in that document
-   that have a <code title="">name</code> attribute whose value is
-   equal<!-- XXX case sensitivity --> to the <var title="">name</var>
-   argument.</p>
-  <!-- XXX what about XHTML? -->
+   that have a <code title="">name</code> attribute whose value is equal to
+   the <var title="">name</var> argument (in a <a
+   href="#case-sensitive">case-sensitive</a> manner).</p>
+  <!-- XXX what about XHTML?
+  -->
 
   <p>The <dfn id=getelementsbyclassname
    title=dom-document-getElementsByClassName><code>getElementsByClassName(<var
@@ -8371,7 +8416,6 @@
   </div>
 
   <h3 id=apis-in><span class=secno>3.6 </span>APIs in HTML documents</h3>
-  <!-- XXX case-sensitivity training required here. -->
 
   <p>For <a href="#html-">HTML documents</a>, and for <a
    href="#html-elements">HTML elements</a> in <a href="#html-">HTML
@@ -8388,18 +8432,17 @@
     title="">Node.nodeName</code>, and <code title="">Node.localName</code>
 
    <dd>
-    <p>These attributes return tag names in all uppercase<!-- XXX
-    xref-->
-     and attribute names in all lowercase<!-- XXX xref -->, regardless of the
-     case with which they were created.</p>
+    <p>These attributes must return tag names <a href="#converting">converted
+     to uppercase</a> and attribute names <a href="#converting0">converted to
+     lowercase</a>, regardless of the case with which they were created.</p>
 
    <dt><code title="">Document.createElement()</code>
 
    <dd>
     <p>The canonical form of HTML markup is all-lowercase; thus, this method
-     will lowercase<!-- XXX xref --> the argument before creating the
-     requisite element. Also, the element created must be in the <a
-     href="#html-namespace0">HTML namespace</a>.</p>
+     will <a href="#converting0" title="converted to lowercase">lowercase</a>
+     the argument before creating the requisite element. Also, the element
+     created must be in the <a href="#html-namespace0">HTML namespace</a>.</p>
 
     <p class=note>This doesn't apply to <code
      title="">Document.createElementNS()</code>. Thus, it is possible, by
@@ -8412,8 +8455,9 @@
 
    <dd>
     <p>When an <code>Attr</code> node is set on an <a href="#html-elements"
-     title="HTML elements">HTML element</a>, it must have its name
-     lowercased<!-- XXX xref --> before the element is affected.</p>
+     title="HTML elements">HTML element</a>, it must have its name <a
+     href="#converting0">converted to lowercase</a> before the element is
+     affected.</p>
 
     <p class=note>This doesn't apply to <code
      title="">Document.setAttributeNodeNS()</code>.</p>
@@ -8422,9 +8466,8 @@
 
    <dd>
     <p>When an attribute is set on an <a href="#html-elements" title="HTML
-     elements">HTML element</a>, the name argument must be
-     lowercased<!-- XXX xref
-    --> before the element is affected.</p>
+     elements">HTML element</a>, the name argument must be <span>converted to
+     lowercas</span> before the element is affected.</p>
 
     <p class=note>This doesn't apply to <code
      title="">Document.setAttributeNS()</code>.</p>
@@ -8434,9 +8477,10 @@
 
    <dd>
     <p>These methods (but not their namespaced counterparts) must compare the
-     given argument case-insensitively<!-- XXX xref --> when looking at <a
-     href="#html-elements" title="HTML elements">HTML elements</a>, and
-     case-sensitively otherwise.</p>
+     given argument in an <a href="#ascii">ASCII case-insensitive</a> manner
+     when looking at <a href="#html-elements" title="HTML elements">HTML
+     elements</a>, and in a <a href="#case-sensitive">case-sensitive</a>
+     manner otherwise.</p>
 
     <p class=note>Thus, in an <a href="#html-" title="HTML documents">HTML
      document</a> with nodes in multiple namespaces, these methods will be
@@ -8446,8 +8490,9 @@
 
    <dd>
     <p>If the new namespace is the <a href="#html-namespace0">HTML
-     namespace</a>, then the new qualified name must be lowercased before the
-     rename takes place.<!-- XXX xref --></p>
+     namespace</a>, then the new qualified name must be <a
+     href="#converting0">converted to lowercase</a> before the rename takes
+     place.</p>
   </dl>
 
   <h3 id=dynamic0><span class=secno>3.7 </span><dfn id=dynamic3>Dynamic
@@ -8521,9 +8566,8 @@
 
    <li>
     <p>Let <var title="">replace</var> be true if there is a second argument
-     and it has the value "replace"<!-- case-insensitive. XXX
-   -->, and
-     false otherwise.
+     and it is an <a href="#ascii">ASCII case-insensitive</a> match for the
+     value "replace", and false otherwise.
 
    <li>
     <p>If the document has an <span>active parser</span><!-- XXX xref
@@ -8876,9 +8920,9 @@
    <li>A <code>Comment</code> node whose data contains two adjacent U+002D
     HYPHEN-MINUS (-) characters or ends with such a character.
 
-   <li>A <code>ProcessingInstruction</code> node whose target name is the
-    string "<code title="">xml</code>" (case insensitively)<!--
-   ASCII -->.
+   <li>A <code>ProcessingInstruction</code> node whose target name is an <a
+    href="#ascii">ASCII case-insensitive</a> match for the string "<code
+    title="">xml</code>".
 
    <li>A <code>ProcessingInstruction</code> node whose target name contains a
     U+003A COLON (":").
@@ -9878,11 +9922,10 @@
      href="#encoding" title=attr-meta-http-equiv-content-type>Encoding
      declaration state</a>, the <code title=attr-meta-content><a
      href="#content1">content</a></code> attribute must have a value that is
-     a case-insensitive<!-- ASCII
-    XXX--> match of a string that consists
-     of the literal string "<code title="">text/html;</code>", optionally
-     followed by any number of <a href="#space" title="space character">space
-     characters</a>, followed by the literal string "<code
+     an <a href="#ascii">ASCII case-insensitive</a> match for a string that
+     consists of the literal string "<code title="">text/html;</code>",
+     optionally followed by any number of <a href="#space" title="space
+     character">space characters</a>, followed by the literal string "<code
      title="">charset=</code>", followed by the character encoding name of <a
      href="#charset">the character encoding declaration</a>.</p>
 
@@ -20202,7 +20245,7 @@
 
   <p>When the UA is passed an empty string or a string specifying a context
    that it does not support, then it must return null. String comparisons
-   must be literal and case-sensitive.
+   must be <a href="#case-sensitive">case-sensitive</a>.
 
   <p>Arguments other than the <var title="">contextId</var> must be ignored,
    and must not cause the user agent to raise an exception (as would normally
@@ -20726,8 +20769,9 @@
   </dl>
 
   <p>These values are all case-sensitive — they must be used exactly as
-   shown. User agents must not recognize values that do not exactly match the
-   values given above.
+   shown. User agents must not recognize values that are not a <a
+   href="#case-sensitive">case-sensitive</a> match for one of the values
+   given above.
 
   <p>The operators in the above list must be treated as described by the
    Porter-Duff operator given at the start of their description (e.g. <var
@@ -30882,8 +30926,8 @@
 
   <p>A <dfn id=valid10>valid browsing context name or keyword</dfn> is any
    string that is either a <a href="#valid9">valid browsing context name</a>
-   or that case-insensitively <!-- ASCII --> matches one of: <code
-   title="">_blank</code>, <code title="">_self</code>, <code
+   or that is an <a href="#ascii">ASCII case-insensitive</a> match for one
+   of: <code title="">_blank</code>, <code title="">_self</code>, <code
    title="">_parent</code>, or <code title="">_top</code>.
 
   <p><dfn id=the-rules>The rules for choosing a browsing context given a
@@ -31262,8 +31306,8 @@
 
      <li>
       <p>Let <var title="">scheme</var> be the <a href="#ltschemegt"
-       title=url-scheme><scheme></a> component of the URI, converted to
-       lowercase<!-- XXX -->.
+       title=url-scheme><scheme></a> component of the URI, <a
+       href="#converting0">converted to lowercase</a>.
 
      <li>
       <p>If the UA doesn't support the protocol given by <var
@@ -31289,7 +31333,8 @@
 
      <li>
       <p>Let <var title="">host</var> be the result of converting <var
-       title="">host</var> to lowercase<!-- XXX -->.
+       title="">host</var> <a href="#converting0" title="converted to
+       lowercase">to lowercase</a>.
 
      <li>
       <p>If there is no <a href="#ltportgt" title=url-port><port></a>
@@ -31506,7 +31551,7 @@
     <p>Return <var title="">result</var>.
   </ol>
 
-  <p>The <dfn id=ascii>ASCII serialization of an origin</dfn> is the string
+  <p>The <dfn id=ascii0>ASCII serialization of an origin</dfn> is the string
    obtained by applying the following algorithm to the given <a
    href="#origin0">origin</a>:
 
@@ -32876,9 +32921,9 @@
 
    <dd>
     <p>A scheme, such as <code>ftp</code> or <code>fax</code>. The scheme
-     must be treated case-insensitively by user agents for the purposes of
-     comparing with the scheme part of URLs that they consider against the
-     list of registered handlers.</p>
+     must be compared in an <a href="#ascii">ASCII case-insensitive</a>
+     manner by user agents for the purposes of comparing with the scheme part
+     of URLs that they consider against the list of registered handlers.</p>
 
     <p>The <var title="">protocol</var> value, if it contains a colon (as in
      "<code>ftp:</code>"), will never match anything, since schemes don't
@@ -32890,10 +32935,10 @@
 
    <dd>
     <p>A MIME type, such as <code>model/vrml</code> or
-     <code>text/richtext</code>. The MIME type must be treated
-     case-insensitively by user agents for the purposes of comparing with
-     MIME types of documents that they consider against the list of
-     registered handlers.</p>
+     <code>text/richtext</code>. The MIME type must be compared in an <a
+     href="#ascii">ASCII case-insensitive</a> manner by user agents for the
+     purposes of comparing with MIME types of documents that they consider
+     against the list of registered handlers.</p>
 
     <p>User agents must compare the given values only to the MIME
      type/subtype parts of content types, not to the complete type including
@@ -33538,10 +33583,9 @@
 
       <p>If the resulting <a href="#absolute">absolute URL</a> has a
        different <a href="#ltschemegt" title=url-scheme><scheme></a>
-       component than the manifest's URL (compared
-       case-insensitively<!-- XXX ASCII
-      -->), then jump back to the
-       step labeled "start of line".</p>
+       component than the manifest's URL (compared in an <a
+       href="#ascii">ASCII case-insensitive</a> manner), then jump back to
+       the step labeled "start of line".</p>
 
       <p>Drop the <a href="#ltfragmentgt"
        title=url-fragment><fragment></a> component of the resulting <a
@@ -33576,8 +33620,8 @@
       <p>If the resulting <a href="#absolute">absolute URL</a> for <var
        title="">part two</var> has a different <a href="#ltschemegt"
        title=url-scheme><scheme></a> component than the manifest's URL
-       (compared case-insensitively<!-- XXX ASCII -->), then jump back to the
-       step labeled "start of line".</p>
+       (compared in an <a href="#ascii">ASCII case-insensitive</a> manner),
+       then jump back to the step labeled "start of line".</p>
 
       <p>Drop any the <a href="#ltfragmentgt"
        title=url-fragment><fragment></a> components of the resulting <a
@@ -33607,10 +33651,9 @@
 
       <p>If the resulting <a href="#absolute">absolute URL</a> has a
        different <a href="#ltschemegt" title=url-scheme><scheme></a>
-       component than the manifest's URL (compared
-       case-insensitively<!-- XXX ASCII
-      -->), then jump back to the
-       step labeled "start of line".</p>
+       component than the manifest's URL (compared in an <a
+       href="#ascii">ASCII case-insensitive</a> manner), then jump back to
+       the step labeled "start of line".</p>
 
       <p>Drop the <a href="#ltfragmentgt"
        title=url-fragment><fragment></a> component of the resulting <a
@@ -36423,7 +36466,8 @@
    must be created first.
 
   <p>All strings including the empty string are valid database names.
-   Database names are case-sensitive.
+   Database names must be compared in a <a
+   href="#case-sensitive">case-sensitive</a> manner.
 
   <p class=note>Implementations can support this even in environments that
    only support a subset of all strings as database names by mapping database
@@ -39317,16 +39361,16 @@
    if the content attribute is set to the true state, <code
    title="">false</code>" if the content attribute is set to the false state,
    and "<code title="">inherit</code>" otherwise. On setting, if the new
-   value is case-insensitively<!--
-  XXX ascii --> equal to the string "<code
-   title="">inherit</code>" then the content attribute must be removed, if
-   the new value is case-insensitively<!-- XXX ascii --> equal to the string
-   "<code title="">true</code>" then the content attribute must be set to the
-   string "<code title="">true</code>", if the new value is
-   case-insensitively<!-- XXX ascii --> equal to the string "<code
-   title="">false</code>" then the content attribute must be set to the
-   string "<code title="">false</code>", and otherwise the attribute setter
-   must raise a <code>SYNTAX_ERR</code> exception.
+   value is an <a href="#ascii">ASCII case-insensitive</a> match for the
+   string "<code title="">inherit</code>" then the content attribute must be
+   removed, if the new value is an <a href="#ascii">ASCII
+   case-insensitive</a> match for the string "<code title="">true</code>"
+   then the content attribute must be set to the string "<code
+   title="">true</code>", if the new value is an <a href="#ascii">ASCII
+   case-insensitive</a> match for the string "<code title="">false</code>"
+   then the content attribute must be set to the string "<code
+   title="">false</code>", and otherwise the attribute setter must raise a
+   <code>SYNTAX_ERR</code> exception.
 
   <p>The <dfn id=iscontenteditable
    title=dom-isContentEditable><code>isContentEditable</code></dfn> DOM
@@ -39554,9 +39598,8 @@
    href="#designMode">designMode</a></code> DOM attribute on the
    <code>Document</code> object takes two values, "<code title="">on</code>"
    and "<code title="">off</code>". When it is set, the new value must be
-   case-insensitively <!-- XXX ASCII
-  case-folding --> compared to these two
-   values. If it matches the "<code title="">on</code>" value, then <code
+   compared in an <a href="#ascii">ASCII case-insensitive</a> manner to these
+   two values. If it matches the "<code title="">on</code>" value, then <code
    title=dom-document-designMode><a href="#designMode">designMode</a></code>
    must be enabled, and if it matches the "<code title="">off</code>" value,
    then <code title=dom-document-designMode><a
@@ -41028,9 +41071,8 @@
    title="">commandId</var>.
 
   <p>The possible values for <var title="">commandId</var>, and their
-   corresponding meanings, are as follows. These values are <!-- XXX
-  ASCII -->
-   case-insensitive.
+   corresponding meanings, are as follows. These values must be compared to
+   the argument in an <a href="#ascii">ASCII case-insensitive</a> manner.
 
   <dl>
    <dt><dfn id=bold title=command-bold><code>bold</code></dfn>
@@ -41112,13 +41154,12 @@
        <var title="">value</var>.
 
      <li>
-      <p>If <var title="">value</var> is (now) a case-insensitive<!--
-      XXX ASCII-->
-       match for the tag name of an element defined by this specification
-       that is defined to be a <span>prose element</span> but not a
-       <span>phrasing element</span>, then, for every position in the
-       selection, take the furthest <a href="#flow-content0">flow content</a>
-       ancestor element of that position that contains only <a
+      <p>If <var title="">value</var> is (now) an <a href="#ascii">ASCII
+       case-insensitive</a> match for the tag name of an element defined by
+       this specification that is defined to be a <span>prose element</span>
+       but not a <span>phrasing element</span>, then, for every position in
+       the selection, take the furthest <a href="#flow-content0">flow
+       content</a> ancestor element of that position that contains only <a
        href="#phrasing0">phrasing content</a>, and, if that element is <a
        href="#editable0">editable</a>, and has a content model that allows it
        to contain <span>prose content</span> other than <a
@@ -42102,8 +42143,8 @@
    argument and verify that the URL parses without failure and has a <a
    href="#ltschemegt" title=url-scheme><scheme></a> component whose
    value is either "<code title="">ws</code>" or "<code title="">wss</code>",
-   when compared case-insensitively<!-- XXX ASCII -->. If it does, it has,
-   and it is, then the user agent must asynchronously <a
+   when compared in an <a href="#ascii">ASCII case-insensitive</a> manner. If
+   it does, it has, and it is, then the user agent must asynchronously <a
    href="#establish">establish a Web Socket connection</a> to <var
    title="">url</var>. Otherwise, the constructor must raise a
    <code>SYNTAX_ERR</code> exception.
@@ -42348,7 +42389,7 @@
 
     <pre>4f 72 69 67 69 6e 3a 20</pre>
 
-    <p>Send the <a href="#ascii" title="ASCII serialization of an
+    <p>Send the <a href="#ascii0" title="ASCII serialization of an
      origin">ASCII serialization</a> of the <a href="#origin0">origin</a> of
      the script that invoked the <code title=dom-WebSocket><a
      href="#websocket1">WebSocket()</a></code> constructor.</p>
@@ -42545,7 +42586,7 @@
     <dl class=switch>
      <dt>If the entry's name is "<code title="">websocket-origin</code>"
 
-     <dd>If the value is not exactly equal to the <a href="#ascii"
+     <dd>If the value is not exactly equal to the <a href="#ascii0"
       title="ASCII serialization of an origin">ASCII serialization</a> of the
       <a href="#origin0">origin</a> of the script that invoked the <code
       title=dom-WebSocket><a href="#websocket1">WebSocket()</a></code>
@@ -42747,7 +42788,7 @@
 61 64 65 0d 0a</pre>
 
   <p>Send the string "<code title="">WebSocket-Origin</code>" followed by a
-   U+003A COLON (":") followed by the <a href="#ascii" title="ASCII
+   U+003A COLON (":") followed by the <a href="#ascii0" title="ASCII
    serialization of an origin">ASCII serialization</a> of the origin from
    which the server is willing to accept connections, followed by a CRLF pair
    (0x0d 0x0a).
@@ -43653,6 +43694,13 @@
     element but before the <code><a href="#head">head</a></code> element.</p>
   </div>
 
+  <p>Many strings in the HTML syntax (e.g. the names of elements and their
+   attributes) are case-insensitive, but only for characters in the ranges
+   U+0041 .. U+005A (LATIN CAPITAL LETTER A to LATIN CAPITAL LETTER Z) and
+   U+0061 .. U+007A (LATIN SMALL LETTER A to LATIN SMALL LETTER Z). For
+   convenience, in this section this is just referred to as
+   "case-insensitive".
+
   <h4 id=the-doctype><span class=secno>8.1.1 </span>The DOCTYPE</h4>
 
   <p>A <dfn id=doctype5 title=syntax-doctype>DOCTYPE</dfn> is a mostly
@@ -43901,9 +43949,8 @@
    U+002F SOLIDUS (/), and U+003D EQUALS SIGN (=) characters, the control
    characters, and any characters that are not defined by Unicode. In the
    HTML syntax, attribute names may be written with any mix of lower- and
-   uppercase letters that, when converted to
-   all-lowercase<!-- ASCII case-insensitive -->, matches the attribute's
-   name; attribute names are case-insensitive.
+   uppercase letters that, when converted to all-lowercase, matches the
+   attribute's name; attribute names are case-insensitive.
 
   <p><dfn id=attribute4 title=syntax-attribute-value>Attribute values</dfn>
    are a mixture of <a href="#text2" title=syntax-text>text</a> and <a
@@ -44255,11 +44302,11 @@
 
   <p>The text in CDATA and RCDATA elements must not contain any occurrences
    of the string "<code title=""></</code>" (U+003C LESS-THAN SIGN, U+002F
-   SOLIDUS) followed by characters that case-insensitively<!--ASCII--> match
-   the tag name of the element followed by one of U+0009 CHARACTER
-   TABULATION, U+000A LINE FEED (LF), U+000C FORM FEED (FF), U+0020 SPACE,
-   U+003E GREATER-THAN SIGN (>), or U+002F SOLIDUS (/), unless that string is
-   part of an <a href="#escaping" title=syntax-escape>escaping text span</a>.
+   SOLIDUS) followed by characters that case-insensitively match the tag name
+   of the element followed by one of U+0009 CHARACTER TABULATION, U+000A LINE
+   FEED (LF), U+000C FORM FEED (FF), U+0020 SPACE, U+003E GREATER-THAN SIGN
+   (>), or U+002F SOLIDUS (/), unless that string is part of an <a
+   href="#escaping" title=syntax-escape>escaping text span</a>.
 
   <p>An <dfn id=escaping title=syntax-escape>escaping text span</dfn> is a
    span of <a href="#text2" title=syntax-text>text</a> that starts with an <a
@@ -44944,10 +44991,11 @@
 
   <p>When comparing a string specifying a character encoding with the name or
    alias of a character encoding to determine if they are equal, user agents
-   must ignore the all characters in the ranges U+0009 to U+000D, U+0020 to
+   must ignore all characters in the ranges U+0009 to U+000D, U+0020 to
    U+002F, U+003A to U+0040, U+005B to U+0060, and U+007B to U+007E (all
    whitespace and punctuation characters in ASCII) in both names, and then
-   perform the comparison case-insensitively<!-- XXX ASCII -->.
+   perform the comparison in an <a href="#ascii">ASCII case-insensitive</a>
+   manner.
 
   <p class=example>For instance, "GB_2312-80" and "g.b.2312(80)" are
    considered equivalent names.
@@ -45920,8 +45968,9 @@
    instance of the tokeniser (<a href="#fragment">fragment case</a>), or, if
    the <a href="#content3">content model flag</a> is set to the RCDATA or
    CDATA states and the next few characters do not match the tag name of the
-   last start tag token emitted (case insensitively), or if they do but they
-   are not immediately followed by one of the following characters:
+   last start tag token emitted (compared in an <span>ASCII case
+   insensitive</span> manner), or if they do but they are not immediately
+   followed by one of the following characters:
 
   <ul class=brief>
    <li>U+0009 CHARACTER TABULATION
@@ -46453,22 +46502,19 @@
    empty string, and switch to the <a href="#comment5">comment start
    state</a>.
 
-  <p>Otherwise, if the next seven characters are a
-   <span>case-insensitive</span><!-- XXX xref, ascii only --> match for the
-   word "DOCTYPE", then consume those characters and switch to the <a
-   href="#doctype6">DOCTYPE state</a>.
+  <p>Otherwise, if the next seven characters are an <a href="#ascii">ASCII
+   case-insensitive</a> match for the word "DOCTYPE", then consume those
+   characters and switch to the <a href="#doctype6">DOCTYPE state</a>.
 
   <p>Otherwise, if the <span>insertion mode</span> is "<a href="#in-foreign"
    title="insertion mode: in foreign content">in foreign content</a>" and the
    <a href="#current5">current node</a> is not an element in the <a
    href="#html-namespace0">HTML namespace</a> and the next seven characters
-   are a <span>case-sensitive</span><!-- XXX xref, ascii
-  only --> match for
-   the string "[CDATA[" (the five uppercase letters "CDATA" with a U+005B
-   LEFT SQUARE BRACKET character before and after), then consume those
-   characters and switch to the <a href="#cdata2">CDATA section state</a>
-   (which is unrelated to the <a href="#content3">content model flag</a>'s
-   CDATA state).
+   are an <span>ASCII case-sensitive</span> match for the string "[CDATA["
+   (the five uppercase letters "CDATA" with a U+005B LEFT SQUARE BRACKET
+   character before and after), then consume those characters and switch to
+   the <a href="#cdata2">CDATA section state</a> (which is unrelated to the
+   <a href="#content3">content model flag</a>'s CDATA state).
 
   <p>Otherwise, this is a <a href="#parse2">parse error</a>. Switch to the <a
    href="#bogus1">bogus comment state</a>. The next character that is
@@ -46737,15 +46783,15 @@
    <dt>Anything else
 
    <dd>
-    <p>If the next six characters are a
-     <span>case-insensitive</span><!-- XXX xref, ascii only --> match for the
-     word "PUBLIC", then consume those characters and switch to the <a
-     href="#before7">before DOCTYPE public identifier state</a>.</p>
+    <p>If the next six characters are an <a href="#ascii">ASCII
+     case-insensitive</a> match for the word "PUBLIC", then consume those
+     characters and switch to the <a href="#before7">before DOCTYPE public
+     identifier state</a>.</p>
 
-    <p>Otherwise, if the next six characters are a
-     <span>case-insensitive</span><!-- XXX xref, ascii only --> match for the
-     word "SYSTEM", then consume those characters and switch to the <a
-     href="#before8">before DOCTYPE system identifier state</a>.</p>
+    <p>Otherwise, if the next six characters are an <a href="#ascii">ASCII
+     case-insensitive</a> match for the word "SYSTEM", then consume those
+     characters and switch to the <a href="#before8">before DOCTYPE system
+     identifier state</a>.</p>
 
     <p>Otherwise, this is the <a href="#parse2">parse error</a>. Set the
      DOCTYPE token's <i>force-quirks flag</i> to <i>on</i>. Switch to the <a
@@ -47445,8 +47491,9 @@
 
    <dd>
     <p>Consume the maximum number of characters possible, with the consumed
-     characters case-sensitively matching one of the identifiers in the first
-     column of the <a href="#named0">named character references</a> table.</p>
+     characters matching one of the identifiers in the first column of the <a
+     href="#named0">named character references</a> table (in a <a
+     href="#case-sensitive">case-sensitive</a> manner).</p>
 
     <p>If no match can be made, then this is a <a href="#parse2">parse
      error</a>. No characters are consumed, and nothing is returned.</p>
@@ -47903,15 +47950,15 @@
    <dt>A DOCTYPE token
 
    <dd>
-    <p>If the DOCTYPE token's <code title="">name</code> does not
-     case-insensitively match the string "<code title="">HTML</code>", or if
-     the token's public identifier is not missing, or if the token's system
-     identifier is not missing, then there is a <a href="#parse2">parse
-     error</a>. Conformance checkers may, instead of reporting this error,
-     switch to a conformance checking mode for another language (e.g. based
-     on the DOCTYPE token a conformance checker could recognize that the
-     document is an HTML4-era document, and defer to an HTML4 conformance
-     checker.)</p>
+    <p>If the DOCTYPE token's <code title="">name</code> is not an <a
+     href="#ascii">ASCII case-insensitive</a> match for the string "<code
+     title="">HTML</code>", or if the token's public identifier is not
+     missing, or if the token's system identifier is not missing, then there
+     is a <a href="#parse2">parse error</a>. Conformance checkers may,
+     instead of reporting this error, switch to a conformance checking mode
+     for another language (e.g. based on the DOCTYPE token a conformance
+     checker could recognize that the document is an HTML4-era document, and
+     defer to an HTML4 conformance checker.)</p>
 
     <p>Append a <code>DocumentType</code> node to the <code>Document</code>
      node, with the <code title="">name</code> attribute set to the name
@@ -48164,10 +48211,10 @@
     </ul>
 
     <p>The name, system identifier, and public identifier strings must be
-     compared to the values given in the lists above in a
-     case-insensitive<!-- ASCII --> manner. A system identifier whose value
-     is the empty string is not considered missing for the purposes of the
-     conditions above.</p>
+     compared to the values given in the lists above in an <a
+     href="#ascii">ASCII case-insensitive</a> manner. A system identifier
+     whose value is the empty string is not considered missing for the
+     purposes of the conditions above.</p>
 
     <p>Then, switch the <span>insertion mode</span> to "<a href="#before9"
      title="insertion mode: before html">before html</a>".</p>
@@ -50006,8 +50053,8 @@
 
    <dd>
     <p>If the token does not have an attribute with the name "type", or if it
-     does, but that attribute's value is not a case-insensitive
-     <!-- XXX ASCII --> match for the string "hidden", or, if the <a
+     does, but that attribute's value is not an <a href="#ascii">ASCII
+     case-insensitive</a> match for the string "hidden", or, if the <a
      href="#current6">current table</a> is <a href="#tainted">tainted</a>,
      then: act as described in the "anything else" entry below.</p>
 
@@ -51281,9 +51328,9 @@
    local names of elements and attributes, then the tool may map all element
    and attribute local names that the API wouldn't support to a set of names
    that <em>are</em> allowed, by replacing any character that isn't supported
-   with the upper case letter U and the five digits of the character's
-   Unicode codepoint when expressed in hexadecimal, using digits 0-9 and
-   capital letters A-F as the symbols, in increasing numeric order.
+   with the uppercase letter U and the five digits of the character's Unicode
+   codepoint when expressed in hexadecimal, using digits 0-9 and capital
+   letters A-F as the symbols, in increasing numeric order.
 
   <p class=example>For example, the element name <code
    title="">foo<bar</code>, which can be output by the <a
@@ -53917,8 +53964,10 @@
    document (printing) and what this means for the UA, in particular creating
    a new view for the print media.
 
-  <p class=big-issue>Must define that in CSS, tag names in HTML documents,
-   and class names in quirks mode documents, are case-insensitive.
+  <p class=big-issue>Must define that in CSS, tag and attribute names in HTML
+   documents, and class names in quirks mode documents, are case-insensitive,
+   as well as saying which attribute values must be compared
+   case-insensitively.
 
   <h3 id=rendering0><span class=secno>9.1 </span>Rendering and the DOM</h3>
 
@@ -54880,16 +54929,12 @@
 <pav> the html spec should say what to do with it
 
 
-should we say that elements in HTML must be lowercase? (but with error
-handling for uppercase tags, obviously)? If so, update examples.
-
 <title> is for out of context headers
 <h1> is for in-context headers
 
 The parsing rules of HTML
 
 media="" is case-insensitive
-case-sensitivity of other attributes, and what it means
 
 empty title attribute is equivalent to missing attribute for purposes
 of alternate style sheet processing

Modified: source
===================================================================
--- source	2008-07-24 22:36:09 UTC (rev 1935)
+++ source	2008-07-25 09:26:03 UTC (rev 1936)
@@ -9,16 +9,15 @@
   <p class="big-issue">Some of the more major known issues are marked
   like this. There are many other issues that have been raised as
   well; the issues given in this document are not the only known
-  issues! There are also some spec-wide issues that have not yet been
-  addressed: case-sensitivity is a very poorly handled topic right
-  now, and the firing of events needs to be unified (right now some
-  bubble, some don't, they all use different text to fire events,
-  etc). It would also be nice to unify the rules on downloading
-  content when attributes change (e.g. <code title="">src</code>
-  attributes) - should they initiate downloads when the element
-  immediately, is inserted in the document, when active scripts end,
-  etc. This matters e.g. if an attribute is set twice in a row (does
-  it hit the network twice).</p>
+  issues! Also, firing of events needs to be unified (right now some
+  bubble, some don't, they all use different text to fire events, we
+  don't have an official queueing mechanism, etc). It would also be
+  nice to unify the rules on fetching/downloading content when
+  attributes change (e.g. <code title="">src</code> attributes) -
+  should they initiate downloads when the element immediately, is
+  inserted in the document, when active scripts end, etc. This matters
+  e.g. if an attribute is set twice in a row (does it hit the network
+  twice).</p>
 
 
   <h2 class="no-num no-toc" id="contents">Table of contents</h2>
@@ -415,9 +414,9 @@
   <p>Attribute names are said to be <dfn>XML-compatible</dfn> if they
   match the <a href="http://www.w3.org/TR/REC-xml/#NT-Name"><code
   title="">Name</code></a> production defined in XML, they contain no
-  U+003A COLON (:) characters, and they do not start with three
-  characters "<code title="">xml</code>". <a
-  href="#refsXML">[XML]</a></p> <!-- XXX case-insensitive ASCII -->
+  U+003A COLON (:) characters, and their first three characters are
+  not an <span>ASCII case-insensitive</span> match for the string
+  "<code title="">xml</code>". <a href="#refsXML">[XML]</a></p>
 
 
   <h4>DOM trees</h4>
@@ -965,10 +964,41 @@
 
 
 
+  <h3>Case-sensitivity</h3>
 
+  <p>This specification defines several comparison operators for
+  strings.</p>
 
+  <p>Comparing two strings in a <dfn>case-sensitive</dfn> manner means
+  comparing them exactly, codepoint for codepoint.</p>
 
+  <p>Comparing two strings in a <dfn>ASCII case-insensitive</dfn>
+  manner means comparing them exactly, codepoint for codepoint, except
+  that the characters in the range U+0041 .. U+005A (i.e. LATIN
+  CAPITAL LETTER A to LATIN CAPITAL LETTER Z) and the corresponding
+  characters in the range U+0061 .. U+007A (i.e. LATIN SMALL LETTER A
+  to LATIN SMALL LETTER Z) are considered to also match.</p>
 
+  <p>Comparing two strings in a <dfn>compatibility caseless</dfn>
+  manner means using the Unicode <i>compatibility caseless match</i>
+  operation to compare the two strings. <a
+  href="#refsUNICODECASE">[UNICODECASE]</a></p> <!-- XXX refs to
+  Unicode Standard Annex #21, Case Mappings -->
+
+  <p><dfn title="converted to uppercase">Converting a string to
+  uppercase</dfn> means replacing all characters in the range U+0061
+  .. U+007A (i.e. LATIN SMALL LETTER A to LATIN SMALL LETTER Z) with
+  the corresponding characters in the range U+0041 .. U+005A
+  (i.e. LATIN CAPITAL LETTER A to LATIN CAPITAL LETTER Z).</p>
+
+  <p><dfn title="converted to lowercase">Converting a string to
+  lowercase</dfn> means replacing all characters in the range U+0041
+  .. U+005A (i.e. LATIN CAPITAL LETTER A to LATIN CAPITAL LETTER Z)
+  with the corresponding characters in the range U+0061 .. U+007A
+  (i.e. LATIN SMALL LETTER A to LATIN SMALL LETTER Z).</p>
+
+
+
   <h3>URLs</h3>
 
   <p>This specification defines the term <span>URL</span>, and defines
@@ -1709,7 +1739,7 @@
   of the attribute represents the false value.</p>
 
   <p>If the attribute is present, its value must either be the empty
-  string or a value that is a case-insensitive <!-- XXX ASCII -->
+  string or a value that is a, <span>ASCII case-insensitive</span>
   match for the attribute's canonical name, with no leading or
   trailing whitespace.</p>
 
@@ -3332,20 +3362,18 @@
   is the <em>missing value default</em>.</p>
 
   <p>If an enumerated attribute is specified, the attribute's value
-  must be one of the given keywords that are not said to be
-  non-conforming, with no leading or trailing whitespace. The keyword
-  may use any mix of uppercase and lowercase letters.<!-- XXX should
-  say "uppercase and lowercase ASCII letters" or some such --></p>
+  must be an <span>ASCII case-insensitive</span> match for one of the
+  given keywords that are not said to be non-conforming, with no
+  leading or trailing whitespace.</p>
 
-  <p>When the attribute is specified, if its value
-  <span>case-insensitively</span><!-- XXX ascii case folding -->
-  matches one of the given keywords then that keyword's state is the
-  state that the attribute represents. If the attribute value matches
-  none of the given keywords, but the attribute has an <em>invalid
-  value default</em>, then the attribute represents that
-  state. Otherwise, if the attribute value matches none of the
-  keywords but there is a <em>missing value default</em> state
-  defined, then <em>that</em> is the state represented by the
+  <p>When the attribute is specified, if its value is an <span>ASCII
+  case-insensitively</span> match for one of the given keywords then
+  that keyword's state is the state that the attribute represents. If
+  the attribute value matches none of the given keywords, but the
+  attribute has an <em>invalid value default</em>, then the attribute
+  represents that state. Otherwise, if the attribute value matches
+  none of the keywords but there is a <em>missing value default</em>
+  state defined, then <em>that</em> is the state represented by the
   attribute. Otherwise, there is no default, and invalid values must
   be ignored.</p>
 
@@ -3392,12 +3420,15 @@
 
    <li><p>Return the first element of type <var title="">type</var>
    that has an <code title="attr-id">id</code> or <code
-   title="">name</code> attribute whose value <!-- Unicode,
-   apparently: <annevk> seems IE might be Unicode case-insensitive for
-   ID [and name] values (related to <map> anyway, and at least for the
-   character ë --> case-insensitively matches <var
-   title="">s</var>.</p></li>
-
+   title="">name</code> attribute whose value is a <span>compatibility
+   caseless</span> match for <var title="">s</var>.</p></li>
+   <!--
+   That's what IE does:
+   http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A%3Cmap%20name%3D%22T%26eacute%3B%26%23x01F1%3B%26%23x2075%3B%22%3E%3Carea%20href%3D%22%2F%22%20shape%3Drect%20coords%3D0%2C0%2C200%2C200%3E%3C%2Fmap%3E%0A%3Cimg%20usemap%3D%22%23t%26Eacute%3BDZ5%22%20src%3Dimage%3E
+   ...except that doesn't explain why this fails:
+   http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A%3Cmap%20name%3D%22T%26eacute%3B%26%23x01F1%3B%26%23x2075%3B%26%23xFB01%3B%22%3E%3Carea%20href%3D%22%2F%22%20shape%3Drect%20coords%3D0%2C0%2C200%2C200%3E%3C%2Fmap%3E%0A%3Cimg%20usemap%3D%22%23t%26Eacute%3BDZ5F%26%23x0131%3B%26%23x0307%3B%22%20src%3Dimage%3E
+   maybe they just don't know about combining dot above?
+   -->
   </ol>
 
 
@@ -3442,13 +3473,13 @@
   getting, the DOM attribute must return the conforming value
   associated with the state the attribute is in (in its canonical
   case), or the empty string if the attribute is in a state that has
-  no associated keyword value; and on setting, if the new value
-  case-insensitively <!-- XXX --> matches one of the keywords given
-  for that attribute, then the content attribute must be set to the
-  conforming value associated with the state that the attribute would
-  be in if set to the given new value, otherwise, if the new value is
-  the empty string, then the content attribute must be removed,
-  otherwise, the setter must raise a <code>SYNTAX_ERR</code>
+  no associated keyword value; and on setting, if the new value is an
+  <span>ASCII case-insensitive</span> match for one of the keywords
+  given for that attribute, then the content attribute must be set to
+  the conforming value associated with the state that the attribute
+  would be in if set to the given new value, otherwise, if the new
+  value is the empty string, then the content attribute must be
+  removed, otherwise, the setter must raise a <code>SYNTAX_ERR</code>
   exception.</p>
 
   <p>If a reflecting DOM attribute is a <code>DOMString</code> but
@@ -4089,8 +4120,8 @@
   <ol>
 
    <li><p>Find the first seven characters in <var title="">s</var>
-   that are a case-insensitive<!-- XXX ASCII--> match for the word
-   'charset'. If no such match is found, return nothing.</p>
+   that are an <span>ASCII case-insensitive</span> match for the word
+   "charset". If no such match is found, return nothing.</p>
 
    <li><p>Skip any U+0009, U+000A, U+000C, U+000D, or U+0020
    characters that immediately follow the word 'charset' (there might
@@ -4147,13 +4178,6 @@
 
   <ol>
 
-   <li><p>Let <var title="">official type</var> be the type given by
-   the <span title="Content-Type">Content-Type metadata</span> for the
-   resource (in lowercase<!-- XXX ASCII case folding -->, ignoring any
-   parameters). If there is no such type, jump to the <i
-   title="content-type sniffing: unknown type">unknown type</i> step
-   below.</p></li>
-
    <li><p>If the user agent is configured to strictly obey
    Content-Type headers for this resource, then jump to the last step
    in this set of steps.</p></li>
@@ -4191,14 +4215,22 @@
 
    </li>
 
+   <li><p>Let <var title="">official type</var> be the type given by
+   the <span title="Content-Type">Content-Type metadata</span> for the
+   resource, ignoring parameters. If there is no such type, jump to
+   the <i title="content-type sniffing: unknown type">unknown type</i>
+   step below. Comparisons with this type, as defined by MIME
+   specifications, are done in an <span>ASCII case-insensitive</span>
+   manner. <a href="#refsRFC2046">[RFC2046]</a></p></li>
+
    <li><p>If <var title="">official type</var> is "unknown/unknown" or
-   "application/unknown", jump to the <i title="content-type
-   sniffing: unknown type">unknown type</i> step below.</p>
-   <!-- In a study looking at many billions of pages whose first five
-   characters were "<HTML", "unknown/unknown" was used to label
-   documents about once for every 5000 pages labeled "text/html", and
-   "application/unknown" was used about once for every 35000 pages
-   labeled "text/html". --></li>
+   "application/unknown", jump to the <i title="content-type sniffing:
+   unknown type">unknown type</i> step below.</p> <!-- In a study
+   looking at many billions of pages whose first five characters were
+   "<HTML", "unknown/unknown" was used to label documents about once
+   for every 5000 pages labeled "text/html", and "application/unknown"
+   was used about once for every 35000 pages labeled
+   "text/html". --></li>
 
    <li><p>If <var title="">official type</var> ends in "+xml", or if
    it is either "text/xml" or "application/xml", then the sniffed
@@ -4209,7 +4241,8 @@
    <li><p>If <var title="">official type</var> is an image type
    supported by the user agent (e.g. "image/png", "image/gif",
    "image/jpeg", etc), then jump to the <i title="content-type
-   sniffing: image">images</i> section below.</p></li>
+   sniffing: image">images</i> section below, passing it the <var
+   title="">official type</var>.</p></li>
 
    <li><p>If <var title="">official type</var> is "text/html", then
    jump to the <i title="content-type sniffing: feed or html">feed or
@@ -5296,7 +5329,7 @@
 
   <p>The <dfn
   title="dom-document-getElementsByName"><code>getElementsByName(<var
-  title="">name</var>)</code></dfn> method a string <var
+  title="">name</var>)</code></dfn> method takes a string <var
   title="">name</var>, and must return a live <code>NodeList</code>
   containing all the <code>a</code>, <code>applet</code>,
   <code>button</code>, <code>form</code>, <!-- frame? frameset?
@@ -5304,8 +5337,9 @@
   <code>map</code>, <code>meta</code>, <code>object</code>,<!-- param?
   XXX--> <code>select</code>, and <code>textarea</code> elements in
   that document that have a <code title="">name</code> attribute whose
-  value is equal<!-- XXX case sensitivity --> to the <var
-  title="">name</var> argument.</p> <!-- XXX what about XHTML? -->
+  value is equal to the <var title="">name</var> argument (in a
+  <span>case-sensitive</span> manner).</p> <!-- XXX what about XHTML?
+  -->
 
   <p>The <dfn
   title="dom-document-getElementsByClassName"><code>getElementsByClassName(<var
@@ -6397,7 +6431,6 @@
 
 
   <h3>APIs in HTML documents</h3>
-  <!-- XXX case-sensitivity training required here. -->
 
   <p>For <span>HTML documents</span>, and for <span>HTML
   elements</span> in <span>HTML documents</span>, certain APIs defined
@@ -6417,9 +6450,10 @@
 
    <dd>
 
-    <p>These attributes return tag names in all uppercase<!-- XXX
-    xref--> and attribute names in all lowercase<!-- XXX xref -->,
-    regardless of the case with which they were created.</p>
+    <p>These attributes must return tag names <span>converted to
+    uppercase</span> and attribute names <span>converted to
+    lowercase</span>, regardless of the case with which they were
+    created.</p>
 
    </dd>
 
@@ -6429,9 +6463,9 @@
    <dd>
 
     <p>The canonical form of HTML markup is all-lowercase; thus, this
-    method will lowercase<!-- XXX xref --> the argument before
-    creating the requisite element. Also, the element created must be
-    in the <span>HTML namespace</span>.</p>
+    method will <span title="converted to lowercase">lowercase</span>
+    the argument before creating the requisite element. Also, the
+    element created must be in the <span>HTML namespace</span>.</p>
 
     <p class="note">This doesn't apply to <code
     title="">Document.createElementNS()</code>. Thus, it is possible,
@@ -6450,7 +6484,8 @@
 
     <p>When an <code>Attr</code> node is set on an <span title="HTML
     elements">HTML element</span>, it must have its name
-    lowercased<!-- XXX xref --> before the element is affected.</p>
+    <span>converted to lowercase</span> before the element is
+    affected.</p>
 
     <p class="note">This doesn't apply to <code
     title="">Document.setAttributeNodeNS()</code>.</p>
@@ -6463,8 +6498,8 @@
    <dd>
 
     <p>When an attribute is set on an <span title="HTML elements">HTML
-    element</span>, the name argument must be lowercased<!-- XXX xref
-    --> before the element is affected.</p>
+    element</span>, the name argument must be <span>converted to
+    lowercas</span> before the element is affected.</p>
 
     <p class="note">This doesn't apply to <code
     title="">Document.setAttributeNS()</code>.</p>
@@ -6478,9 +6513,10 @@
    <dd>
 
     <p>These methods (but not their namespaced counterparts) must
-    compare the given argument case-insensitively<!-- XXX xref -->
-    when looking at <span title="HTML elements">HTML elements</span>,
-    and case-sensitively otherwise.</p>
+    compare the given argument in an <span>ASCII
+    case-insensitive</span> manner when looking at <span title="HTML
+    elements">HTML elements</span>, and in a
+    <span>case-sensitive</span> manner otherwise.</p>
 
     <p class="note">Thus, in an <span title="HTML documents">HTML
     document</span> with nodes in multiple namespaces, these methods
@@ -6495,8 +6531,8 @@
    <dd>
 
     <p>If the new namespace is the <span>HTML namespace</span>, then
-    the new qualified name must be lowercased before the rename takes
-    place.<!-- XXX xref --></p>
+    the new qualified name must be <span>converted to lowercase</span>
+    before the rename takes place.</p>
 
    </dd>
    
@@ -6571,8 +6607,8 @@
    otherwise.</p></li>
 
    <li><p>Let <var title="">replace</var> be true if there is a second
-   argument and it has the value "replace"<!-- case-insensitive. XXX
-   -->, and false otherwise.</p></li>
+   argument and it is an <span>ASCII case-insensitive</span> match for
+   the value "replace", and false otherwise.</p></li>
 
    <li>
 
@@ -6973,8 +7009,8 @@
    character.</li>
 
    <li>A <code>ProcessingInstruction</code> node whose target name is
-   the string "<code title="">xml</code>" (case insensitively)<!--
-   ASCII -->.</li>
+   an <span>ASCII case-insensitive</span> match for the string "<code
+   title="">xml</code>".</li>
 
    <li>A <code>ProcessingInstruction</code> node whose target name
    contains a U+003A COLON (":").</li>
@@ -7916,13 +7952,13 @@
     <p>For <code>meta</code> elements in the <span
     title="attr-meta-http-equiv-content-type">Encoding declaration
     state</span>, the <code title="attr-meta-content">content</code>
-    attribute must have a value that is a case-insensitive<!-- ASCII
-    XXX--> match of a string that consists of the literal string
-    "<code title="">text/html;</code>", optionally followed by any
-    number of <span title="space character">space characters</span>,
-    followed by the literal string "<code title="">charset=</code>",
-    followed by the character encoding name of <a href="#charset">the
-    character encoding declaration</a>.</p>
+    attribute must have a value that is an <span>ASCII
+    case-insensitive</span> match for a string that consists of the
+    literal string "<code title="">text/html;</code>", optionally
+    followed by any number of <span title="space character">space
+    characters</span>, followed by the literal string "<code
+    title="">charset=</code>", followed by the character encoding name
+    of <a href="#charset">the character encoding declaration</a>.</p>
 
     <p>If the document contains a <code>meta</code> element in the
     <span title="attr-meta-http-equiv-content-type">Encoding
@@ -17483,7 +17519,7 @@
 
   <p>When the UA is passed an empty string or a string specifying a
   context that it does not support, then it must return null. String
-  comparisons must be literal and case-sensitive.</p>
+  comparisons must be <span>case-sensitive</span>.</p>
 
   <p>Arguments other than the <var title="">contextId</var> must be
   ignored, and must not cause the user agent to raise an exception (as
@@ -17996,8 +18032,9 @@
   </dl>
 
   <p>These values are all case-sensitive — they must be used
-  exactly as shown. User agents must not recognize values that do not
-  exactly match the values given above.</p>
+  exactly as shown. User agents must not recognize values that are not
+  a <span>case-sensitive</span> match for one of the values given
+  above.</p>
 
   <p>The operators in the above list must be treated as described by
   the Porter-Duff operator given at the start of their description
@@ -28175,8 +28212,8 @@
   special keywords.)</p>
 
   <p>A <dfn>valid browsing context name or keyword</dfn> is any string
-  that is either a <span>valid browsing context name</span> or that
-  case-insensitively <!-- ASCII --> matches one of: <code
+  that is either a <span>valid browsing context name</span> or that is
+  an <span>ASCII case-insensitive</span> match for one of: <code
   title="">_blank</code>, <code title="">_self</code>, <code
   title="">_parent</code>, or <code title="">_top</code>.</p>
 
@@ -28569,7 +28606,7 @@
 
      <li><p>Let <var title="">scheme</var> be the <span
      title="url-scheme"><scheme></span> component of the URI,
-     converted to lowercase<!-- XXX -->.</p></li>
+     <span>converted to lowercase</span>.</p></li>
 
      <li><p>If the UA doesn't support the protocol given by <var
      title="">scheme</var>, then return a new globally unique
@@ -28598,7 +28635,8 @@
      </li>
 
      <li><p>Let <var title="">host</var> be the result of converting
-     <var title="">host</var> to lowercase<!-- XXX -->.</p></li>
+     <var title="">host</var> <span title="converted to lowercase">to
+     lowercase</span>.</p></li>
 
      <li><p>If there is no <span title="url-port"><port></span>
      component, then let <var title="">port</var> be the default port
@@ -30267,9 +30305,10 @@
    <dd>
 
     <p>A scheme, such as <code>ftp</code> or <code>fax</code>. The
-    scheme must be treated case-insensitively by user agents for the
-    purposes of comparing with the scheme part of URLs that they
-    consider against the list of registered handlers.</p>
+    scheme must be compared in an <span>ASCII case-insensitive</span>
+    manner by user agents for the purposes of comparing with the
+    scheme part of URLs that they consider against the list of
+    registered handlers.</p>
 
     <p>The <var title="">protocol</var> value, if it contains a colon
     (as in "<code>ftp:</code>"), will never match anything, since
@@ -30282,10 +30321,10 @@
    <dd>
 
     <p>A MIME type, such as <code>model/vrml</code> or
-    <code>text/richtext</code>. The MIME type must be treated
-    case-insensitively by user agents for the purposes of comparing
-    with MIME types of documents that they consider against the list
-    of registered handlers.</p>
+    <code>text/richtext</code>. The MIME type must be compared in an
+    <span>ASCII case-insensitive</span> manner by user agents for the
+    purposes of comparing with MIME types of documents that they
+    consider against the list of registered handlers.</p>
 
     <p>User agents must compare the given values only to the MIME
     type/subtype parts of content types, not to the complete type
@@ -30968,8 +31007,9 @@
 
       <p>If the resulting <span>absolute URL</span> has a different
       <span title="url-scheme"><scheme></span> component than
-      the manifest's URL (compared case-insensitively<!-- XXX ASCII
-      -->), then jump back to the step labeled "start of line".</p>
+      the manifest's URL (compared in an <span>ASCII
+      case-insensitive</span> manner), then jump back to the step
+      labeled "start of line".</p>
 
       <p>Drop the <span title="url-fragment"><fragment></span>
       component of the resulting <span>absolute URL</span>, if it has
@@ -31009,8 +31049,9 @@
       <p>If the resulting <span>absolute URL</span> for <var
       title="">part two</var> has a different <span
       title="url-scheme"><scheme></span> component than the
-      manifest's URL (compared case-insensitively<!-- XXX ASCII -->),
-      then jump back to the step labeled "start of line".</p>
+      manifest's URL (compared in an <span>ASCII
+      case-insensitive</span> manner), then jump back to the step
+      labeled "start of line".</p>
 
       <p>Drop any the <span
       title="url-fragment"><fragment></span> components of the
@@ -31045,8 +31086,9 @@
 
       <p>If the resulting <span>absolute URL</span> has a different
       <span title="url-scheme"><scheme></span> component than
-      the manifest's URL (compared case-insensitively<!-- XXX ASCII
-      -->), then jump back to the step labeled "start of line".</p>
+      the manifest's URL (compared in an <span>ASCII
+      case-insensitive</span> manner), then jump back to the step
+      labeled "start of line".</p>
 
       <p>Drop the <span title="url-fragment"><fragment></span>
       component of the resulting <span>absolute URL</span>, if it has
@@ -33888,7 +33930,8 @@
   must be created first.</p>
 
   <p>All strings including the empty string are valid database
-  names. Database names are case-sensitive.</p>
+  names. Database names must be compared in a
+  <span>case-sensitive</span> manner.</p>
 
   <p class="note">Implementations can support this even in
   environments that only support a subset of all strings as database
@@ -36788,16 +36831,16 @@
   title="">true</code>" if the content attribute is set to the true
   state, <code title="">false</code>" if the content attribute is set
   to the false state, and "<code title="">inherit</code>"
-  otherwise. On setting, if the new value is case-insensitively<!--
-  XXX ascii --> equal to the string "<code title="">inherit</code>"
-  then the content attribute must be removed, if the new value is
-  case-insensitively<!-- XXX ascii --> equal to the string "<code
-  title="">true</code>" then the content attribute must be set to the
-  string "<code title="">true</code>", if the new value is
-  case-insensitively<!-- XXX ascii --> equal to the string "<code
-  title="">false</code>" then the content attribute must be set to the
-  string "<code title="">false</code>", and otherwise the attribute
-  setter must raise a <code>SYNTAX_ERR</code> exception.</p>
+  otherwise. On setting, if the new value is an <span>ASCII
+  case-insensitive</span> match for the string "<code
+  title="">inherit</code>" then the content attribute must be removed,
+  if the new value is an <span>ASCII case-insensitive</span> match for
+  the string "<code title="">true</code>" then the content attribute
+  must be set to the string "<code title="">true</code>", if the new
+  value is an <span>ASCII case-insensitive</span> match for the string
+  "<code title="">false</code>" then the content attribute must be set
+  to the string "<code title="">false</code>", and otherwise the
+  attribute setter must raise a <code>SYNTAX_ERR</code> exception.</p>
 
   <p>The <dfn
   title="dom-isContentEditable"><code>isContentEditable</code></dfn>
@@ -37034,9 +37077,9 @@
   <p>The <code title="dom-document-designMode">designMode</code> DOM
   attribute on the <code>Document</code> object takes two values,
   "<code title="">on</code>" and "<code title="">off</code>". When it
-  is set, the new value must be case-insensitively <!-- XXX ASCII
-  case-folding --> compared to these two values. If it matches the
-  "<code title="">on</code>" value, then <code
+  is set, the new value must be compared in an <span>ASCII
+  case-insensitive</span> manner to these two values. If it matches
+  the "<code title="">on</code>" value, then <code
   title="dom-document-designMode">designMode</code> must be enabled,
   and if it matches the "<code title="">off</code>" value, then <code
   title="dom-document-designMode">designMode</code> must be
@@ -38484,8 +38527,9 @@
   title="">commandId</var>.</p>
 
   <p>The possible values for <var title="">commandId</var>, and their
-  corresponding meanings, are as follows. These values are <!-- XXX
-  ASCII --> case-insensitive.</p>
+  corresponding meanings, are as follows. These values must be
+  compared to the argument in an <span>ASCII case-insensitive</span>
+  manner.</p>
 
   <dl>
 
@@ -38546,22 +38590,22 @@
      GREATER-THAN SIGN character ('>'), then remove the first and last
      characters from <var title="">value</var>.</p></li>
      <li>
-      <p>If <var title="">value</var> is (now) a case-insensitive<!--
-      XXX ASCII--> match for the tag name of an element defined by
-      this specification that is defined to be a <span>prose
-      element</span> but not a <span>phrasing element</span>, then,
-      for every position in the selection, take the furthest
-      <span>flow content</span> ancestor element of that position that
-      contains only <span>phrasing content</span>, and, if that
-      element is <span>editable</span>, and has a content model that
-      allows it to contain <span>prose content</span> other than
-      <span>phrasing content</span>, and has a parent element whose
-      content model allows that parent to contain any <span>prose
-      content</span>, rename the element (as if the <code
+      <p>If <var title="">value</var> is (now) an <span>ASCII
+      case-insensitive</span> match for the tag name of an element
+      defined by this specification that is defined to be a
+      <span>prose element</span> but not a <span>phrasing
+      element</span>, then, for every position in the selection, take
+      the furthest <span>flow content</span> ancestor element of that
+      position that contains only <span>phrasing content</span>, and,
+      if that element is <span>editable</span>, and has a content
+      model that allows it to contain <span>prose content</span> other
+      than <span>phrasing content</span>, and has a parent element
+      whose content model allows that parent to contain any
+      <span>prose content</span>, rename the element (as if the <code
       title="">Element.renameNode()</code> method had been used) to
-      <var title="">value</var>, using the HTML namespace.</p>
-      <p>If there is no selection, then, where in the description
-      above refers to the selection, the user agent must act as if the
+      <var title="">value</var>, using the HTML namespace.</p> <p>If
+      there is no selection, then, where in the description above
+      refers to the selection, the user agent must act as if the
       selection was an empty range (with just one position) at the
       caret position.</p>
      </li>
@@ -39455,8 +39499,8 @@
   verify that the URL parses without failure and has a <span
   title="url-scheme"><scheme></span> component whose value is
   either "<code title="">ws</code>" or "<code title="">wss</code>",
-  when compared case-insensitively<!-- XXX ASCII -->. If it does, it
-  has, and it is, then the user agent must asynchronously
+  when compared in an <span>ASCII case-insensitive</span> manner. If
+  it does, it has, and it is, then the user agent must asynchronously
   <span>establish a Web Socket connection</span> to <var
   title="">url</var>. Otherwise, the constructor must raise a
   <code>SYNTAX_ERR</code> exception.</p>
@@ -41153,7 +41197,14 @@
 
   </div>
 
+  <p>Many strings in the HTML syntax (e.g. the names of elements and
+  their attributes) are case-insensitive, but only for characters in
+  the ranges U+0041 .. U+005A (LATIN CAPITAL LETTER A to LATIN CAPITAL
+  LETTER Z) and U+0061 .. U+007A (LATIN SMALL LETTER A to LATIN SMALL
+  LETTER Z). For convenience, in this section this is just referred to
+  as "case-insensitive".</p>
 
+
   <h4>The DOCTYPE</h4>
 
   <p>A <dfn title="syntax-doctype">DOCTYPE</dfn> is a mostly useless,
@@ -41384,8 +41435,8 @@
   the control characters, and any characters that are not defined by
   Unicode. In the HTML syntax, attribute names may be written with any
   mix of lower- and uppercase letters that, when converted to
-  all-lowercase<!-- ASCII case-insensitive -->, matches the
-  attribute's name; attribute names are case-insensitive.</p>
+  all-lowercase, matches the attribute's name; attribute names are
+  case-insensitive.</p>
 
   <p><dfn title="syntax-attribute-value">Attribute values</dfn> are a
   mixture of <span title="syntax-text">text</span> and <span
@@ -41735,10 +41786,10 @@
   <p>The text in CDATA and RCDATA elements must not contain any
   occurrences of the string "<code title=""></</code>" (U+003C
   LESS-THAN SIGN, U+002F SOLIDUS) followed by characters that
-  case-insensitively<!--ASCII--> match the tag name of the element
-  followed by one of U+0009 CHARACTER TABULATION, U+000A LINE FEED
-  (LF), U+000C FORM FEED (FF), U+0020 SPACE, U+003E GREATER-THAN SIGN
-  (>), or U+002F SOLIDUS (/), unless that string is part of an <span
+  case-insensitively match the tag name of the element followed by one
+  of U+0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000C FORM
+  FEED (FF), U+0020 SPACE, U+003E GREATER-THAN SIGN (>), or U+002F
+  SOLIDUS (/), unless that string is part of an <span
   title="syntax-escape">escaping text span</span>.</p>
 
   <p>An <dfn title="syntax-escape">escaping text span</dfn> is a span
@@ -42476,11 +42527,11 @@
 
   <p>When comparing a string specifying a character encoding with the
   name or alias of a character encoding to determine if they are
-  equal, user agents must ignore the all characters in the ranges
-  U+0009 to U+000D, U+0020 to U+002F, U+003A to U+0040, U+005B to
-  U+0060, and U+007B to U+007E (all whitespace and punctuation
-  characters in ASCII) in both names, and then perform the comparison
-  case-insensitively<!-- XXX ASCII -->.</p>
+  equal, user agents must ignore all characters in the ranges U+0009
+  to U+000D, U+0020 to U+002F, U+003A to U+0040, U+005B to U+0060, and
+  U+007B to U+007E (all whitespace and punctuation characters in
+  ASCII) in both names, and then perform the comparison in an
+  <span>ASCII case-insensitive</span> manner.</p>
 
   <p class="example">For instance, "GB_2312-80" and "g.b.2312(80)" are
   considered equivalent names.</p>
@@ -43361,11 +43412,11 @@
   <p>If the <span>content model flag</span> is set to the RCDATA or
   CDATA states but no start tag token has ever been emitted by this
   instance of the tokeniser (<span>fragment case</span>), or, if the
-  <span>content model flag</span> is set to the RCDATA or CDATA
-  states and the next few characters do not match the tag name of
-  the last start tag token emitted (case insensitively), or if they
-  do but they are not immediately followed by one of the following
-  characters:</p>
+  <span>content model flag</span> is set to the RCDATA or CDATA states
+  and the next few characters do not match the tag name of the last
+  start tag token emitted (compared in an <span>ASCII case
+  insensitive</span> manner), or if they do but they are not
+  immediately followed by one of the following characters:</p>
 
   <ul class="brief">
    <li>U+0009 CHARACTER TABULATION</li>
@@ -43840,21 +43891,19 @@
   whose data is the empty string, and switch to the <span>comment
   start state</span>.</p>
 
-  <p>Otherwise, if the next seven characters are a
-  <span>case-insensitive</span><!-- XXX xref, ascii only --> match
-  for the word "DOCTYPE", then consume those characters and switch
-  to the <span>DOCTYPE state</span>.</p>
+  <p>Otherwise, if the next seven characters are an <span>ASCII
+  case-insensitive</span> match for the word "DOCTYPE", then consume
+  those characters and switch to the <span>DOCTYPE state</span>.</p>
 
   <p>Otherwise, if the <span>insertion mode</span> is "<span
   title="insertion mode: in foreign content">in foreign
-  content</span>" and the <span>current node</span> is not an
-  element in the <span>HTML namespace</span> and the next seven
-  characters are a <span>case-sensitive</span><!-- XXX xref, ascii
-  only --> match for the string "[CDATA[" (the five uppercase
-  letters "CDATA" with a U+005B LEFT SQUARE BRACKET character before
-  and after), then consume those characters and switch to the
-  <span>CDATA section state</span> (which is unrelated to the
-  <span>content model flag</span>'s CDATA state).</p>
+  content</span>" and the <span>current node</span> is not an element
+  in the <span>HTML namespace</span> and the next seven characters are
+  an <span>ASCII case-sensitive</span> match for the string "[CDATA["
+  (the five uppercase letters "CDATA" with a U+005B LEFT SQUARE
+  BRACKET character before and after), then consume those characters
+  and switch to the <span>CDATA section state</span> (which is
+  unrelated to the <span>content model flag</span>'s CDATA state).</p>
 
   <p>Otherwise, this is a <span>parse error</span>. Switch to the
   <span>bogus comment state</span>. The next character that is
@@ -44096,15 +44145,15 @@
    <dt>Anything else</dt>
    <dd>
 
-    <p>If the next six characters are a
-    <span>case-insensitive</span><!-- XXX xref, ascii only --> match
-    for the word "PUBLIC", then consume those characters and switch
-    to the <span>before DOCTYPE public identifier state</span>.</p>
+    <p>If the next six characters are an <span>ASCII
+    case-insensitive</span> match for the word "PUBLIC", then consume
+    those characters and switch to the <span>before DOCTYPE public
+    identifier state</span>.</p>
 
-    <p>Otherwise, if the next six characters are a
-    <span>case-insensitive</span><!-- XXX xref, ascii only --> match
-    for the word "SYSTEM", then consume those characters and switch
-    to the <span>before DOCTYPE system identifier state</span>.</p>
+    <p>Otherwise, if the next six characters are an <span>ASCII
+    case-insensitive</span> match for the word "SYSTEM", then consume
+    those characters and switch to the <span>before DOCTYPE system
+    identifier state</span>.</p>
 
     <p>Otherwise, this is the <span>parse error</span>. Set the
     DOCTYPE token's <i>force-quirks flag</i> to <i>on</i>. Switch to
@@ -44575,9 +44624,9 @@
    <dd>
 
     <p>Consume the maximum number of characters possible, with the
-    consumed characters case-sensitively matching one of the
-    identifiers in the first column of the <span>named character
-    references</span> table.</p>
+    consumed characters matching one of the identifiers in the first
+    column of the <span>named character references</span> table (in a
+    <span>case-sensitive</span> manner).</p>
 
     <p>If no match can be made, then this is a <span>parse
     error</span>. No characters are consumed, and nothing is
@@ -44936,15 +44985,16 @@
    <dt>A DOCTYPE token</dt>
    <dd>
 
-    <p>If the DOCTYPE token's <code title="">name</code> does not
-    case-insensitively match the string "<code title="">HTML</code>",
-    or if the token's public identifier is not missing, or if the
-    token's system identifier is not missing, then there is a
-    <span>parse error</span>. Conformance checkers may, instead of
-    reporting this error, switch to a conformance checking mode for
-    another language (e.g. based on the DOCTYPE token a conformance
-    checker could recognize that the document is an HTML4-era
-    document, and defer to an HTML4 conformance checker.)</p>
+    <p>If the DOCTYPE token's <code title="">name</code> is not an
+    <span>ASCII case-insensitive</span> match for the string "<code
+    title="">HTML</code>", or if the token's public identifier is not
+    missing, or if the token's system identifier is not missing, then
+    there is a <span>parse error</span>. Conformance checkers may,
+    instead of reporting this error, switch to a conformance checking
+    mode for another language (e.g. based on the DOCTYPE token a
+    conformance checker could recognize that the document is an
+    HTML4-era document, and defer to an HTML4 conformance
+    checker.)</p>
 
     <p>Append a <code>DocumentType</code> node to the
     <code>Document</code> node, with the <code title="">name</code>
@@ -45057,9 +45107,9 @@
     </ul>
 
     <p>The name, system identifier, and public identifier strings must
-    be compared to the values given in the lists above in a
-    case-insensitive<!-- ASCII --> manner. A system identifier whose
-    value is the empty string is not considered missing for the
+    be compared to the values given in the lists above in an
+    <span>ASCII case-insensitive</span> manner. A system identifier
+    whose value is the empty string is not considered missing for the
     purposes of the conditions above.</p>
 
     <p>Then, switch the <span>insertion mode</span> to "<span
@@ -47011,10 +47061,10 @@
    <dd>
 
     <p>If the token does not have an attribute with the name "type",
-    or if it does, but that attribute's value is not a
-    case-insensitive <!-- XXX ASCII --> match for the string "hidden",
-    or, if the <span>current table</span> is <span>tainted</span>,
-    then: act as described in the "anything else" entry below.</p>
+    or if it does, but that attribute's value is not an <span>ASCII
+    case-insensitive</span> match for the string "hidden", or, if the
+    <span>current table</span> is <span>tainted</span>, then: act as
+    described in the "anything else" entry below.</p>
 
     <p>Otherwise:</p>
 
@@ -48335,7 +48385,7 @@
   the local names of elements and attributes, then the tool may map
   all element and attribute local names that the API wouldn't support
   to a set of names that <em>are</em> allowed, by replacing any
-  character that isn't supported with the upper case letter U and the
+  character that isn't supported with the uppercase letter U and the
   five digits of the character's Unicode codepoint when expressed in
   hexadecimal, using digits 0-9 and capital letters A-F as the
   symbols, in increasing numeric order.</p>
@@ -48910,9 +48960,10 @@
   document (printing) and what this means for the UA, in particular
   creating a new view for the print media.</p>
 
-  <p class="big-issue">Must define that in CSS, tag names in HTML
-  documents, and class names in quirks mode documents, are
-  case-insensitive.</p>
+  <p class="big-issue">Must define that in CSS, tag and attribute
+  names in HTML documents, and class names in quirks mode documents,
+  are case-insensitive, as well as saying which attribute values must
+  be compared case-insensitively.</p>
 
 
   <h3>Rendering and the DOM</h3>
@@ -49884,16 +49935,12 @@
 <pav> the html spec should say what to do with it
 
 
-should we say that elements in HTML must be lowercase? (but with error
-handling for uppercase tags, obviously)? If so, update examples.
-
 <title> is for out of context headers
 <h1> is for in-context headers
 
 The parsing rules of HTML
 
 media="" is case-insensitive
-case-sensitivity of other attributes, and what it means
 
 empty title attribute is equivalent to missing attribute for purposes
 of alternate style sheet processing




More information about the Commit-Watchers mailing list