[html5] r7727 - [giow] (0) Sort algorithm, first draft. Fixing https://www.w3.org/Bugs/Public/sh [...]

whatwg at whatwg.org whatwg at whatwg.org
Fri Mar 1 17:30:15 PST 2013


Author: ianh
Date: 2013-03-01 17:30:14 -0800 (Fri, 01 Mar 2013)
New Revision: 7727

Modified:
   complete.html
   index
   source
Log:
[giow] (0) Sort algorithm, first draft.
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=20524
Affected topics: HTML

Modified: complete.html
===================================================================
--- complete.html	2013-02-25 19:41:46 UTC (rev 7726)
+++ complete.html	2013-03-02 01:30:14 UTC (rev 7727)
@@ -248,7 +248,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
    <hgroup><h1 class=allcaps>HTML</h1>
-    <h2 class="no-num no-toc">Living Standard — Last Updated 25 February 2013</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 2 March 2013</h2>
    </hgroup><dl><dt><strong>Web developer edition:</strong></dt>
     <dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
     <dt>Multiple-page version:</dt>
@@ -42580,8 +42580,8 @@
      <li>
 
       <p>If <var title="">type<sub>a</sub></var> and <var title="">type<sub>b</sub></var> are not
-      "string", then: return "a before b" if <var title="">value<sub>a</sub></var> is earlier
-      than <var title="">value<sub>b</sub></var>, and return "b before a" otherwise.</p>
+      "string", then: if <var title="">value<sub>a</sub></var> is earlier than <var title="">value<sub>b</sub></var> then return "a before b" and abort these steps, otherwise,
+      return "b before a" and abort these steps.</p>
 
       <p>Values sort in their natural order, with the following additional constraints:</p>
 
@@ -42608,13 +42608,194 @@
 
      <li>
 
-      <p class=XXX>Return "a before b" if <var title="">value<sub>a</sub></var> is earlier than
-      <var title="">value<sub>b</sub></var>, and return "b before a" otherwise; for these purposes,
-      the strings must be compared using collation order of the <a href=#language>language</a> of the
-      <code><a href=#the-table-element>table</a></code> element to which <var title="">th</var>'s <a href=#concept-table title=concept-table>table</a> corresponds.</p>
+      <p>Let <var title="">components<sub>a</sub></var> be the result of <a href=#parsing-the-sort-key>parsing the sort
+      key</a> <var title="">value<sub>a</sub></var>.</p>
 
+      <p>Let <var title="">components<sub>b</sub></var> be the result of <a href=#parsing-the-sort-key>parsing the sort
+      key</a> <var title="">value<sub>b</sub></var>.</p>
+
+      <p>As described below, <var title="">components<sub>a</sub></var> and <var title="">components<sub>b</sub></var> are tuples consisting of a list of <var title="">n</var>
+      <i>numbers</i>, a list of <var title="">n</var> <i>number strings</i>, a list of <var title="">n</var>+1 <i>non-numeric strings</i>, and a list of 2<var title="">n</var>+1 <i>raw
+      strings</i>, for any non-negative integer value of <var title="">n</var> (zero or more).</p>
+
      </li>
 
+     <li>
+
+      <p>Let <var title="">order</var> be the result a <a href=#locale-specific-string-comparison>locale-specific string
+      comparison</a> of <var title="">components<sub>a</sub></var>'s first <i>non-numeric
+      string</i> and <var title="">components<sub>b</sub></var>'s first <i>non-numeric string</i>,
+      in the context of <var title="">th</var>.</p>
+
+      <p>If <var title="">order</var> is not "equal" then return <var title="">order</var> and abort
+      these steps.</p>
+
+     </li>
+
+     <li>
+
+      <p>If <var title="">components<sub>a</sub></var> and <var title="">components<sub>b</sub></var> both have exactly one the <i>number</i>, then run these
+      substeps:</p>
+
+      <ol><li>
+
+        <p>If <var title="">components<sub>a</sub></var>'s <i>number</i> is less than <var title="">components<sub>b</sub></var>'s <i>number</i>, return "a before b".</p>
+
+        <p>If <var title="">components<sub>b</sub></var>'s <i>number</i> is less than <var title="">components<sub>a</sub></var>'s <i>number</i>, return "b before a".</p>
+
+       </li>
+
+       <li>
+
+        <p>Let <var title="">order</var> be the result a <a href=#locale-specific-string-comparison>locale-specific string
+        comparison</a> of <var title="">components<sub>a</sub></var>'s second <i>non-numeric
+        string</i> and <var title="">components<sub>b</sub></var>'s second <i>non-numeric
+        string</i>, in the context of <var title="">th</var>.</p>
+
+        <p>If <var title="">order</var> is not "equal" then return <var title="">order</var> and
+        abort these steps.</p>
+
+       </li>
+
+       <li>
+
+        <p>Let <var title="">order</var> be the result a <a href=#locale-specific-string-comparison>locale-specific string
+        comparison</a> of <var title="">components<sub>a</sub></var>'s <i>number string</i> and
+        <var title="">components<sub>b</sub></var>'s <i>number string</i>, in the context of <var title="">th</var>.</p>
+
+        <p>If <var title="">order</var> is not "equal" then return <var title="">order</var> and
+        abort these steps.</p>
+
+       </li>
+
+      </ol><p>Otherwise, run these substeps:</p>
+
+      <ol><li>
+
+        <p>If <var title="">components<sub>a</sub></var> has zero <i>numbers</i> but <var title="">components<sub>b</sub></var> has more than zero <i>numbers</i>, return "a before
+        b".</p>
+
+        <p>If <var title="">components<sub>b</sub></var> has zero <i>numbers</i> but <var title="">components<sub>a</sub></var> has more than zero <i>numbers</i>, return "b before
+        a".</p>
+
+       </li>
+
+       <li>
+
+        <!-- either an=bn=0, an=1 bn>1, bn=1 an>1, or an and bn > 1. -->
+
+        <p>If <var title="">components<sub>a</sub></var> has one <i>number</i>, return "a before
+        b".</p>
+
+        <p>If <var title="">components<sub>b</sub></var> has one <i>number</i>, return "b before
+        a".</p>
+
+       </li>
+
+       <li>
+
+        <!-- either an=bn=0, or an and bn > 1. -->
+
+        <p>If <var title="">components<sub>a</sub></var> and <var title="">components<sub>b</sub></var> have more than one <i>number</i>, run these substeps:</p>
+
+        <ol><li><p>Let <var title="">count</var> be the smaller of the number of <i>numbers</i> in <var title="">components<sub>a</sub></var> and the number of <i>numbers</i> in <var title="">components<sub>b</sub></var>.</li>
+
+         <li><p>For each <i>number</i> in <var title="">components<sub>a</sub></var> and <var title="">components<sub>b</sub></var> from the first to the <var title="">count</var>th, in
+         order: if <var title="">components<sub>a</sub></var>'s <i>number</i> is less than <var title="">components<sub>b</sub></var>'s <i>number</i>, then return "a before b" and abort
+         these steps; otherwise, if <var title="">components<sub>b</sub></var>'s <i>number</i> is
+         less than <var title="">components<sub>a</sub></var>'s <i>number</i>, return "b before a"
+         and abort these steps.</li>
+
+         <li>
+
+          <p>If <var title="">components<sub>a</sub></var> has fewer <i>numbers</i> than <var title="">components<sub>b</sub></var>, return "a before b" and abort these steps.</p>
+
+          <p>If <var title="">components<sub>b</sub></var> has fewer <i>numbers</i> than <var title="">components<sub>a</sub></var>, return "b before a" and abort these steps.</p>
+
+         </li>
+
+         <!-- at this point, we know /a/ and /b/ have the same number of components -->
+
+         <li><p>Let <var title="">index</var> be zero.</li>
+
+         <li>
+
+          <p><i>String loop</i>: Let <var title="">order</var> be the result a <a href=#locale-specific-string-comparison>locale-specific
+          string comparison</a> of <var title="">components<sub>a</sub></var>'s <var title="">index</var>th <i>number string</i> and <var title="">components<sub>b</sub></var>'s <var title="">index</var>th <i>number string</i>,
+          in the context of <var title="">th</var>.</p>
+
+          <p>If <var title="">order</var> is not "equal" then return <var title="">order</var> and
+          abort these steps.</p>
+
+         </li>
+
+         <li>
+
+          <p>Increment <var title="">index</var>.</p>
+
+         </li>
+
+         <li>
+
+          <p>Let <var title="">order</var> be the result a <a href=#locale-specific-string-comparison>locale-specific string
+          comparison</a> of <var title="">components<sub>a</sub></var>'s <var title="">index</var>th <i>separator string</i> and <var title="">components<sub>b</sub></var>'s <var title="">index</var>th <i>separator
+          string</i>, in the context of <var title="">th</var>.</p>
+
+          <p>If <var title="">order</var> is not "equal" then return <var title="">order</var> and
+          abort these steps.</p>
+
+         </li>
+
+         <li>
+
+          <p>If <var title="">index</var> is less than the number of <i>numbers</i> in <var title="">components<sub>a</sub></var> and <var title="">components<sub>b</sub></var>, return
+          to the step labeled <i>string loop</i>.</p>
+
+         </li>
+
+        </ol></li>
+
+      </ol></li>
+
+     <li>
+
+      <!-- at this point, we know /a/ and /b/ have the same number of components -->
+
+      <p>Let <var title="">index</var> be zero.</p>
+
+     </li>
+
+     <li>
+
+      <p><i>Final loop:</i> Let <var title="">order</var> be the result a <a href=#raw-string-comparison>raw string
+      comparison</a> of <var title="">components<sub>a</sub></var>'s <var title="">n</var>th
+      <i>raw string</i> and <var title="">components<sub>b</sub></var>'s <var title="">n</var>th
+      <i>raw string</i>.</p>
+
+      <p>If <var title="">order</var> is not "equal" then return <var title="">order</var> and abort
+      these steps.</p>
+
+     </li>
+
+     <li>
+
+      <p>Increment <var title="">index</var>.</p>
+
+     </li>
+
+     <li>
+
+      <p>If <var title="">index</var> is less than the number of <i>raw strings</i> in <var title="">components<sub>a</sub></var> and <var title="">components<sub>b</sub></var>, return
+      to the step labeled <i>final loop</i>.</p>
+
+     </li>
+
+     <li>
+
+      <p>Return "equal".</p>
+
+     </li>
+
     </ol></li>
 
 
@@ -42646,7 +42827,400 @@
    <li><p><i>End</i>: Set <var title="">table</var>'s <a href=#currently-sorting-flag>currently-sorting flag</a> to
    false.</li>
 
-  </ol><p>When any of the descendants of a <a href=#sorting-enabled-table-element>sorting-enabled <code>table</code> element</a> change
+  </ol><p>When a user agent is to <dfn id=parsing-the-sort-key title="parsing the sort key">parse the sort key</dfn> <var title="">value</var>, it must run the following steps. These return a tuple consisting of a list
+  of <var title="">n</var> <i>numbers</i>, a list of <var title="">n</var> <i>number strings</i>, a
+  list of <var title="">n</var>+1 <i>non-numeric strings</i>, and a list of 2<var title="">n</var>+1
+  <i>raw strings</i>, respectively, for any non-negative integer value of <var title="">n</var> (zero or
+  more).</p>
+
+  <ol><li>
+    <p>Let <var title="">raw strings</var> be a list of strings initially containing just one entry, an empty string.</p>
+   </li>
+
+   <li>
+    <p>Let <var title="">negatives prejudiced</var> be false.</p>
+    <p>Let <var title="">decimals prejudiced</var> be false.</p>
+    <p>Let <var title="">exponents prejudiced</var> be false.</p>
+   </li>
+
+   <li>
+    <p>Let <var title="">buffer</var> be the empty string.</p>
+    <p>Let <var title="">index</var> be zero.</p>
+    <p>Let <var title="">mode</var> be "<a href=#sort-parser-mode:-separator title="sort parser mode: separator">separator</a>".</p>
+
+    <p>When a subsequent step in this algorithm says to <dfn id=sort-parser-push-the-buffer title="sort parser push the
+    buffer">push the buffer</dfn>, the user agent must run the following substeps:</p>
+
+    <ol><li><p>Add an entry to <var title="">raw strings</var> that consists of the value of <var title="">buffer</var>.</li>
+
+     <li><p>Add an entry to <var title="">raw strings</var> that is the empty string.</li>
+
+     <li><p>Decrement <var title="">index</var> by one.</li>
+
+     <li><p>Set <var title="">mode</var> to "<a href=#sort-parser-mode:-separator title="sort parser mode: separator">separator</a>".</li>
+
+    </ol></li>
+
+   <li>
+    <p>Let <var title="">checkpoint buffer</var> be the empty string.</p> <!-- actual value doesn't matter; it won't be used -->
+    <p>Let <var title="">checkpoint index</var> be zero.</p> <!-- actual value doesn't matter; it won't be used -->
+
+    <p>When a subsequent step in this algorithm says to <dfn id=sort-parser-checkpoint title="sort parser
+    checkpoint">checkpoint</dfn>, the user agent must run the following substeps:</p>
+
+    <ol><li><p>Set the <var title="">checkpoint buffer</var> to the value of <var title="">buffer</var>.</p>
+     <li><p>Set the <var title="">checkpoint index</var> to the value of <var title="">index</var>.</p>
+    </ol><p>When a subsequent step in this algorithm says to <dfn id=sort-parser-push-the-checkpoint title="sort parser push the
+    checkpoint">push the checkpoint</dfn>, the user agent must run the following substeps:</p>
+
+    <ol><li><p>Add an entry to <var title="">raw strings</var> that consists of the value of <var title="">checkpoint buffer</var>.</li>
+
+     <li><p>Add an entry to <var title="">raw strings</var> that is the empty string.</li>
+
+     <li><p>Decrement <var title="">index</var> by one.</li>
+
+     <li><p>Set <var title="">mode</var> to "<a href=#sort-parser-mode:-separator title="sort parser mode: separator">separator</a>".</li>
+
+    </ol></li>
+
+   <li>
+
+    <p>Run through the following steps repeatedly until the condition in the last step is met.</p>
+
+    <ol><li>
+
+      <p><i>Top of loop</i>: If <var title="">index</var> is equal to or greater than the number of
+      characters in <var title="">value</var>, let <var title="">c</var> be EOF. Otherwise, let <var title="">c</var> be the <var title="">index</var>th character in <var title="">value</var>.</p>
+
+     </li>
+
+     <li>
+
+      <p>Run the appropriate steps from the following list:</p>
+
+      <dl class=switch><dt>If <var title="sort parser mode">mode</var> is "<dfn id=sort-parser-mode:-separator title="sort parser mode: separator">separator</dfn>"</dt>
+       <dd>
+        <p>Run the appropriate substeps from the following list:</p>
+        <dl class=switch><dt>If <var title="">c</var> is a <a href=#space-character>space character</a></dt>
+         <dd>
+          <p>Set <var title="">negatives prejudiced</var> to false.</p>
+          <p>Set <var title="">decimals prejudiced</var> to false.</p>
+          <p>Set <var title="">exponents prejudiced</var> to false.</p>
+          <p>Append <var title="">c</var> to the last entry in <var title="">raw strings</var>.</p>
+         </dd>
+         <dt>If <var title="">c</var> is a U+002D HYPHEN-MINUS character (-) and <var title="">negatives prejudiced</var> is false</dt>
+         <dd>
+          <p>Set <var title="">buffer</var> to the value of <var title="">c</var>.</p>
+          <p>Set <var title="sort parser mode">mode</var> to "<a href=#sort-parser-mode:-negative title="sort parser mode: negative">negative</a>".</p>
+         </dd>
+         <dt>If <var title="">c</var> is a U+002E FULL STOP character (.) and <var title="">decimals prejudiced</var> is false</dt>
+         <dd>
+          <p>Set <var title="">buffer</var> to the value of <var title="">c</var>.</p>
+          <p>Set <var title="sort parser mode">mode</var> to "<a href=#sort-parser-mode:-leading-decimal title="sort parser mode: leading-decimal">leading-decimal</a>".</p>
+         </dd>
+         <dt>If <var title="">c</var> is an <a href=#ascii-digits title="ASCII digits">ASCII digit</a></dt>
+         <dd>
+          <p>Set <var title="">buffer</var> to the value of <var title="">c</var>.</p>
+          <p>Set <var title="sort parser mode">mode</var> to "<a href=#sort-parser-mode:-integral title="sort parser mode: integral">integral</a>".</p>
+         </dd>
+         <dt>If <var title="">c</var> is an <a href=#uppercase-ascii-letters title="uppercase ASCII letters">uppercase ASCII letter</a> or a <a href=#lowercase-ascii-letters title="lowercase ASCII letters">lowercase ASCII letter</a></dt>
+         <dd>
+          <p>Set <var title="">exponents prejudiced</var> to true.</p>
+          <p>Append <var title="">c</var> to the last entry in <var title="">raw strings</var>.</p>
+         </dd>
+         <dt>If <var title="">c</var> is EOF</dt>
+         <dd>
+          <p>Do nothing.</p>
+         </dd>
+         <dt>Otherwise</dt>
+         <dd>
+          <p>Append <var title="">c</var> to the last entry in <var title="">raw strings</var>.</p>
+         </dd>
+        </dl></dd>
+       <dt>If <var title="sort parser mode">mode</var> is "<dfn id=sort-parser-mode:-negative title="sort parser mode: negative">negative</dfn>"</dt>
+       <dd>
+        <p>Run the appropriate substeps from the following list:</p>
+        <dl class=switch><dt>If <var title="">c</var> is a U+002D HYPHEN-MINUS character (-)</dt>
+         <dd>
+          <p>Set <var title="">negatives prejudiced</var> to true.</p>
+          <p>Append <var title="">buffer</var> to the last entry in <var title="">raw strings</var>.</p>
+          <p>Append <var title="">c</var> to the last entry in <var title="">raw strings</var>.</p>
+          <p>Set <var title="sort parser mode">mode</var> to "<a href=#sort-parser-mode:-separator title="sort parser mode: separator">separator</a>".</p>
+         </dd>
+         <dt>If <var title="">c</var> is a U+002E FULL STOP character (.) and <var title="">decimals prejudiced</var> is false</dt>
+         <dd>
+          <p>Append <var title="">c</var> to <var title="">buffer</var>.</p>
+          <p>Set <var title="sort parser mode">mode</var> to "<a href=#sort-parser-mode:-leading-decimal title="sort parser mode: leading-decimal">leading-decimal</a>".</p>
+         </dd>
+         <dt>If <var title="">c</var> is an <a href=#ascii-digits title="ASCII digits">ASCII digit</a></dt>
+         <dd>
+          <p>Append <var title="">c</var> to <var title="">buffer</var>.</p>
+          <p>Set <var title="sort parser mode">mode</var> to "<a href=#sort-parser-mode:-integral title="sort parser mode: integral">integral</a>".</p>
+         </dd>
+         <dt>Otherwise</dt>
+         <dd>
+          <p>Append <var title="">buffer</var> to the last entry in <var title="">raw strings</var>.</p>
+          <p>Decrement <var title="">index</var> by one.</p>
+          <p>Set <var title="sort parser mode">mode</var> to "<a href=#sort-parser-mode:-separator title="sort parser mode: separator">separator</a>".</p>
+         </dd>
+        </dl></dd>
+       <dt>If <var title="sort parser mode">mode</var> is "<dfn id=sort-parser-mode:-integral title="sort parser mode: integral">integral</dfn>"</dt>
+       <dd>
+        <p>Run the appropriate substeps from the following list:</p>
+        <dl class=switch><dt>If <var title="">c</var> is a U+002D HYPHEN-MINUS character (-)</dt>
+         <dd>
+          <p>Set <var title="">negatives prejudiced</var> to true.</p>
+          <p><a href=#sort-parser-push-the-buffer title="sort parser push the buffer">Push the buffer</a>.</p>
+         </dd>
+         <dt>If <var title="">c</var> is a U+002E FULL STOP character (.) and <var title="">decimals prejudiced</var> is false</dt>
+         <dd>
+          <p><a href=#sort-parser-checkpoint title="sort parser checkpoint">Checkpoint</a>.</p>
+          <p>Append <var title="">c</var> to <var title="">buffer</var>.</p>
+          <p>Set <var title="sort parser mode">mode</var> to "<a href=#sort-parser-mode:-decimal title="sort parser mode: decimal">decimal</a>".</p>
+         </dd>
+         <dt>If <var title="">c</var> is an <a href=#ascii-digits title="ASCII digits">ASCII digit</a></dt>
+         <dd>
+          <p>Append <var title="">c</var> to the last entry in <var title="">raw strings</var>.</p>
+         </dd>
+         <dt>If <var title="">c</var> is  and <var title="">exponents prejudiced</var> is false</dt>
+         <dd>
+          <p><a href=#sort-parser-checkpoint title="sort parser checkpoint">Checkpoint</a>.</p>
+          <p>Append <var title="">c</var> to <var title="">buffer</var>.</p>
+          <p>Set <var title="sort parser mode">mode</var> to "<a href=#sort-parser-mode:-exponent title="sort parser mode: exponent">exponent</a>".</p>
+         </dd>
+         <dt>Otherwise</dt>
+         <dd>
+          <p><a href=#sort-parser-push-the-buffer title="sort parser push the buffer">Push the buffer</a>.</p>
+         </dd>
+        </dl></dd>
+       <dt>If <var title="sort parser mode">mode</var> is "<dfn id=sort-parser-mode:-leading-decimal title="sort parser mode: leading-decimal">leading-decimal</dfn>"</dt>
+       <dd>
+        <p>Run the appropriate substeps from the following list:</p>
+        <dl class=switch><dt>If <var title="">c</var> is an <a href=#ascii-digits title="ASCII digits">ASCII digit</a></dt>
+         <dd>
+          <p>Append <var title="">c</var> to <var title="">buffer</var>.</p>
+          <p>Set <var title="sort parser mode">mode</var> to "<a href=#sort-parser-mode:-decimal title="sort parser mode: decimal">decimal</a>".</p>
+         </dd>
+         <dt>Otherwise</dt>
+         <dd>
+          <p>Append <var title="">buffer</var> to the last entry in <var title="">raw strings</var>.</p>
+          <p>Decrement <var title="">index</var> by one.</p>
+          <p>Set <var title="sort parser mode">mode</var> to "<a href=#sort-parser-mode:-separator title="sort parser mode: separator">separator</a>".</p>
+         </dd>
+        </dl></dd>
+       <dt>If <var title="sort parser mode">mode</var> is "<dfn id=sort-parser-mode:-decimal title="sort parser mode: decimal">decimal</dfn>"</dt>
+       <dd>
+        <p>Run the appropriate substeps from the following list:</p>
+        <dl class=switch><dt>If <var title="">c</var> is a U+002D HYPHEN-MINUS character (-)</dt>
+         <dd>
+          <p>Set <var title="">negatives prejudiced</var> to true.</p>
+          <p><a href=#sort-parser-push-the-buffer title="sort parser push the buffer">Push the buffer</a>.</p>
+         </dd>
+         <dt>If <var title="">c</var> is  and any of the characters in <var title="">value</var> past the <var title="">index</var>th character are <a href=#ascii-digits>ASCII digits</a></dt>
+         <dd>
+          <p>Set <var title="">decimals prejudiced</var> to true.</p>
+          <p><a href=#sort-parser-push-the-checkpoint title="sort parser push the checkpoint">Push the checkpoint</a>.</p>
+         </dd>
+         <dt>If <var title="">c</var> is  and none of the characters in <var title="">value</var> past the <var title="">index</var>th character are <a href=#ascii-digits>ASCII digits</a></dt>
+         <dd>
+          <p><a href=#sort-parser-push-the-buffer title="sort parser push the buffer">Push the buffer</a>.</p>
+         </dd>
+         <dt>If <var title="">c</var> is an <a href=#ascii-digits title="ASCII digits">ASCII digit</a></dt>
+         <dd>
+          <p>Append <var title="">c</var> to <var title="">buffer</var>.</p>
+         </dd>
+         <dt>If <var title="">c</var> is  and <var title="">exponents prejudiced</var> is false</dt>
+         <dd>
+          <p><a href=#sort-parser-checkpoint title="sort parser checkpoint">Checkpoint</a>.</p>
+          <p>Append <var title="">c</var> to <var title="">buffer</var>.</p>
+          <p>Set <var title="sort parser mode">mode</var> to "<a href=#sort-parser-mode:-exponent title="sort parser mode: exponent">exponent</a>".</p>
+         </dd>
+         <dt>Otherwise</dt>
+         <dd>
+          <p><a href=#sort-parser-push-the-buffer title="sort parser push the buffer">Push the buffer</a>.</p>
+         </dd>
+        </dl></dd>
+       <dt>If <var title="sort parser mode">mode</var> is "<dfn id=sort-parser-mode:-exponent title="sort parser mode: exponent">exponent</dfn>"</dt>
+       <dd>
+        <p>Run the appropriate substeps from the following list:</p>
+        <dl class=switch><dt>If <var title="">c</var> is a U+002D HYPHEN-MINUS character (-) and <var title="">negatives prejudiced</var> is false</dt>
+         <dd>
+          <p>Append <var title="">c</var> to <var title="">buffer</var>.</p>
+          <p>Set <var title="sort parser mode">mode</var> to "<a href=#sort-parser-mode:-exponent-negative title="sort parser mode: exponent-negative">exponent-negative</a>".</p>
+         </dd>
+         <dt>If <var title="">c</var> is a U+002E FULL STOP character (.)</dt>
+         <dd>
+          <p>Set <var title="">decimals prejudiced</var> to true.</p>
+          <p><a href=#sort-parser-push-the-checkpoint title="sort parser push the checkpoint">Push the checkpoint</a>.</p>
+         </dd>
+         <dt>If <var title="">c</var> is an <a href=#ascii-digits title="ASCII digits">ASCII digit</a></dt>
+         <dd>
+          <p>Append <var title="">c</var> to <var title="">buffer</var>.</p>
+          <p>Set <var title="sort parser mode">mode</var> to "<a href=#sort-parser-mode:-exponent-number title="sort parser mode: exponent-number">exponent-number</a>".</p>
+         </dd>
+         <dt>If <var title="">c</var> is </dt>
+         <dd>
+          <p>Set <var title="">exponents prejudiced</var> to true.</p>
+          <p><a href=#sort-parser-push-the-checkpoint title="sort parser push the checkpoint">Push the checkpoint</a>.</p>
+         </dd>
+         <dt>Otherwise</dt>
+         <dd>
+          <p><a href=#sort-parser-push-the-checkpoint title="sort parser push the checkpoint">Push the checkpoint</a>.</p>
+         </dd>
+        </dl></dd>
+       <dt>If <var title="sort parser mode">mode</var> is "<dfn id=sort-parser-mode:-exponent-negative title="sort parser mode: exponent-negative">exponent-negative</dfn>"</dt>
+       <dd>
+        <p>Run the appropriate substeps from the following list:</p>
+        <dl class=switch><dt>If <var title="">c</var> is a U+002D HYPHEN-MINUS character (-)</dt>
+         <dd>
+          <p>Set <var title="">negatives prejudiced</var> to true.</p>
+          <p><a href=#sort-parser-push-the-checkpoint title="sort parser push the checkpoint">Push the checkpoint</a>.</p>
+         </dd>
+         <dt>If <var title="">c</var> is a U+002E FULL STOP character (.)</dt>
+         <dd>
+          <p>Set <var title="">decimals prejudiced</var> to true.</p>
+          <p><a href=#sort-parser-push-the-checkpoint title="sort parser push the checkpoint">Push the checkpoint</a>.</p>
+         </dd>
+         <dt>If <var title="">c</var> is an <a href=#ascii-digits title="ASCII digits">ASCII digit</a></dt>
+         <dd>
+          <p>Append <var title="">c</var> to <var title="">buffer</var>.</p>
+          <p>Set <var title="sort parser mode">mode</var> to "<a href=#sort-parser-mode:-exponent-negative-number title="sort parser mode: exponent-negative-number">exponent-negative-number</a>".</p>
+         </dd>
+         <dt>If <var title="">c</var> is </dt>
+         <dd>
+          <p>Set <var title="">exponents prejudiced</var> to true.</p>
+          <p><a href=#sort-parser-push-the-checkpoint title="sort parser push the checkpoint">Push the checkpoint</a>.</p>
+         </dd>
+         <dt>Otherwise</dt>
+         <dd>
+          <p><a href=#sort-parser-push-the-checkpoint title="sort parser push the checkpoint">Push the checkpoint</a>.</p>
+         </dd>
+        </dl></dd>
+       <dt>If <var title="sort parser mode">mode</var> is "<dfn id=sort-parser-mode:-exponent-number title="sort parser mode: exponent-number">exponent-number</dfn>"</dt>
+       <dd>
+        <p>Run the appropriate substeps from the following list:</p>
+        <dl class=switch><dt>If <var title="">c</var> is a U+002D HYPHEN-MINUS character (-)</dt>
+         <dd>
+          <p>Set <var title="">negatives prejudiced</var> to true.</p>
+          <p><a href=#sort-parser-push-the-buffer title="sort parser push the buffer">Push the buffer</a>.</p>
+         </dd>
+         <dt>If <var title="">c</var> is a U+002E FULL STOP character (.)</dt>
+         <dd>
+          <p>Set <var title="">decimals prejudiced</var> to true.</p>
+          <p><a href=#sort-parser-push-the-checkpoint title="sort parser push the checkpoint">Push the checkpoint</a>.</p>
+         </dd>
+         <dt>If <var title="">c</var> is an <a href=#ascii-digits title="ASCII digits">ASCII digit</a></dt>
+         <dd>
+          <p>Append <var title="">c</var> to <var title="">buffer</var>.</p>
+         </dd>
+         <dt>If <var title="">c</var> is </dt>
+         <dd>
+          <p>Set <var title="">exponents prejudiced</var> to true.</p>
+          <p><a href=#sort-parser-push-the-checkpoint title="sort parser push the checkpoint">Push the checkpoint</a>.</p>
+         </dd>
+         <dt>Otherwise</dt>
+         <dd>
+          <p><a href=#sort-parser-push-the-buffer title="sort parser push the buffer">Push the buffer</a>.</p>
+         </dd>
+        </dl></dd>
+       <dt>If <var title="sort parser mode">mode</var> is "<dfn id=sort-parser-mode:-exponent-negative-number title="sort parser mode: exponent-negative-number">exponent-negative-number</dfn>"</dt>
+       <dd>
+        <p>Run the appropriate substeps from the following list:</p>
+        <dl class=switch><dt>If <var title="">c</var> is a U+002D HYPHEN-MINUS character (-)</dt>
+         <dd>
+          <p>Set <var title="">negatives prejudiced</var> to true.</p>
+          <p><a href=#sort-parser-push-the-checkpoint title="sort parser push the checkpoint">Push the checkpoint</a>.</p>
+         </dd>
+         <dt>If <var title="">c</var> is a U+002E FULL STOP character (.)</dt>
+         <dd>
+          <p>Set <var title="">decimals prejudiced</var> to true.</p>
+          <p><a href=#sort-parser-push-the-checkpoint title="sort parser push the checkpoint">Push the checkpoint</a>.</p>
+         </dd>
+         <dt>If <var title="">c</var> is an <a href=#ascii-digits title="ASCII digits">ASCII digit</a></dt>
+         <dd>
+          <p>Append <var title="">c</var> to <var title="">buffer</var>.</p>
+         </dd>
+         <dt>If <var title="">c</var> is </dt>
+         <dd>
+          <p>Set <var title="">exponents prejudiced</var> to true.</p>
+          <p><a href=#sort-parser-push-the-checkpoint title="sort parser push the checkpoint">Push the checkpoint</a>.</p>
+         </dd>
+         <dt>Otherwise</dt>
+         <dd>
+          <p><a href=#sort-parser-push-the-buffer title="sort parser push the buffer">Push the buffer</a>.</p>
+         </dd>
+        </dl></dd>
+      </dl></li>
+
+     <li>
+
+      <p>Increment <var title="">index</var> by one.</p>
+
+     </li>
+
+     <li>
+
+      <p>If <var title="">index</var> is greater than the number of characters in <var title="">value</var>, stop repeating these substeps and continue along the overall steps.
+      Otherwise, return to the step labeled <i>top of loop</i>.</p>
+
+     </li>
+
+    </ol></li>
+
+   <li>
+    <p>Let <var title="">numbers</var> be an empty list.</p>
+    <p>Let <var title="">number strings</var> be an empty list.</p>
+    <p>Let <var title="">non-numeric strings</var> be an empty list.</p>
+   </li>
+
+   <li>
+
+    <p>For each even-numbered entry in <var title="">raw strings</var>, in order, starting from the
+    first entry (numbered 0), append an entry to <var title="">non-numeric strings</var> that
+    consists of the result of <a href=#trimming-and-collapsing>trimming and collapsing</a> the value of the entry.</p>
+
+   </li>
+
+   <li>
+
+    <p>If <var title="">raw strings</var> has more than one entry, then, for each odd-numbered entry
+    in <var title="">raw strings</var>, in order, starting from the second entry (numbered 1),
+    append an entry to <var title="">number strings</var> that consists of the value of the entry,
+    and append an entry to <var title="">number strings</var> that consists of the result of parsing
+    the value of the entry using the <a href=#rules-for-parsing-floating-point-number-values>rules for parsing floating-point number
+    values</a>.</p>
+
+   </li>
+
+   <li>
+
+    <p>Return <var title="">numbers</var>, <var title="">number strings</var>, <var title="">non-numeric strings</var>, and <var title="">raw strings</var> respectively.</p>
+
+   </li>
+
+  </ol><p>When the user agent is required by the step above to perform a <dfn id=locale-specific-string-comparison>locale-specific string
+  comparison</dfn> of two strings <var title="">a</var> and <var title="">b</var> in the context of
+  an element <var title="">e</var>, the user agent must apply the Unicode Collation Algorithm, using
+  the Default Unicode Collation Element Table as customized for the <a href=#language>language</a> of the
+  element <var title="">e</var> in the Common Locale Data Repository, to the strings <var title="">a</var> and <var title="">b</var>, ignoring case. If the result of this algorithm places
+  <var title="">a</var> first, then return "a before b"; if it places <var title="">b</var> first,
+  then return "b before a"; otherwise, if they compare as equal, then return "equal". <a href=#refsUCA>[UCA]</a> <a href=#CLDR>[CLDR]</a></p>
+
+  <p>When the user agent is required by the step above to perform a <dfn id=raw-string-comparison>raw string comparison</dfn>
+  of two strings <var title="">a</var> and <var title="">b</var>, the user agent must apply the
+  Unicode Collation Algorithm, using the Default Unicode Collation Element Table without
+  customizations, to the strings <var title="">a</var> and <var title="">b</var>. If the result of
+  this algorithm places <var title="">a</var> first, then return "a before b"; if it places <var title="">b</var> first, then return "b before a"; otherwise, if they compare as equal, then return
+  "equal". <a href=#refsUCA>[UCA]</a></p>
+
+  <p>Where the steps above refer to <dfn id=trimming-and-collapsing>trimming and collapsing</dfn> a string <var title="">value</var>, it means running the following algorithm:</p>
+
+  <ol><li><p><a href=#strip-leading-and-trailing-whitespace>Strip leading and trailing whitespace</a> from <var title="">value</var>.</li>
+
+   <li><p>Replace any sequence of one or more <a href=#space-character title="space character">space characters</a>
+   in <var title="">value</var> with a single U+0020 SPACE character.</li>
+
+  </ol><hr><p>When any of the descendants of a <a href=#sorting-enabled-table-element>sorting-enabled <code>table</code> element</a> change
   in any way (including attributes changing), and when a <code><a href=#the-table-element>table</a></code> element becomes a
   <a href=#sorting-enabled-table-element>sorting-enabled <code>table</code> element</a>, the <code><a href=#the-table-element>table</a></code> element is said to
   become <dfn id=a-table-with-a-pending-sort>a table with a pending sort</dfn>.</p>
@@ -93693,7 +94267,7 @@
 :root:lang(ja),       :not(:lang(ja)) > :lang(ja)             { quotes: '\300c' '\300d' '\300e' '\300f' } /* 「 」 『 』 */
 :root:lang(jgo),      :not(:lang(jgo)) > :lang(jgo)           { quotes: '\00ab' '\00bb' '\2039' '\203a' } /* « » ‹ › */
 :root:lang(jmc),      :not(:lang(jmc)) > :lang(jmc)           { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
-:root:lang(ka),       :not(:lang(ka)) > :lang(ka)             { quotes: '\201e' '\201c' '\00ab' '\00bb' } /* „ “ « » */
+:root:lang(ka),       :not(:lang(ka)) > :lang(ka)             { quotes: '\201e' '\201c' '\201e' '\201c' } /* „ “ „ “ */
 :root:lang(kab),      :not(:lang(kab)) > :lang(kab)           { quotes: '\00ab' '\00bb' '\201c' '\201d' } /* « » “ ” */
 :root:lang(kam),      :not(:lang(kam)) > :lang(kam)           { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
 :root:lang(kde),      :not(:lang(kde)) > :lang(kde)           { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
@@ -101309,7 +101883,7 @@
    <dd>(Non-normative) <cite><a href=http://www.w3.org/TR/charmod/>Character Model for the World Wide Web 1.0: Fundamentals</a></cite>, M. Dürst, F. Yergeau, R. Ishida, M. Wolf, T. Texin. W3C.</dd>
 
    <dt id=refsCLDR>[CLDR]</dt>
-   <dd>(Non-normative) <cite><a href=http://cldr.unicode.org/>Unicode Common Locale Data Repository</a></cite>. Unicode.</dd>
+   <dd><cite><a href=http://cldr.unicode.org/>Unicode Common Locale Data Repository</a></cite>. Unicode.</dd>
 
    <dt id=refsCOMPUTABLE>[COMPUTABLE]</dt>
    <dd>(Non-normative) <cite><a href=http://www.turingarchive.org/browse.php/B/12>On computable numbers, with an application to the Entscheidungsproblem</a></cite>, A. Turing. In <cite>Proceedings of the London Mathematical Society</cite>, series 2, volume 42, pages 230-265. London Mathematical Society, 1937.</dd>
@@ -101623,6 +102197,9 @@
    <dt id=refsUAAG>[UAAG]</dt>
    <dd>(Non-normative) <cite><a href=http://www.w3.org/TR/UAAG20/>User Agent Accessibility Guidelines (UAAG) 2.0</a></cite>, J. Allan, K. Ford, J. Richards, J. Spellman. W3C.</dd>
 
+   <dt id=refsUCA>[UCA]</dt>
+   <dd><cite><a href=http://www.unicode.org/reports/tr10/>UTR #10: Unicode Collation Algorithm</a></cite>, M. Davis, K. Whistler. Unicode Consortium.</dd>
+
    <dt id=refsUNDO>[UNDO]</dt>
    <dd><cite><a href=http://rniwa.com/editing/undomanager.html>UndoManager and DOM Transaction</a></cite>, R. Niwa.</dd>
 

Modified: index
===================================================================
--- index	2013-02-25 19:41:46 UTC (rev 7726)
+++ index	2013-03-02 01:30:14 UTC (rev 7727)
@@ -248,7 +248,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
    <hgroup><h1 class=allcaps>HTML</h1>
-    <h2 class="no-num no-toc">Living Standard — Last Updated 25 February 2013</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 2 March 2013</h2>
    </hgroup><dl><dt><strong>Web developer edition:</strong></dt>
     <dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
     <dt>Multiple-page version:</dt>
@@ -42580,8 +42580,8 @@
      <li>
 
       <p>If <var title="">type<sub>a</sub></var> and <var title="">type<sub>b</sub></var> are not
-      "string", then: return "a before b" if <var title="">value<sub>a</sub></var> is earlier
-      than <var title="">value<sub>b</sub></var>, and return "b before a" otherwise.</p>
+      "string", then: if <var title="">value<sub>a</sub></var> is earlier than <var title="">value<sub>b</sub></var> then return "a before b" and abort these steps, otherwise,
+      return "b before a" and abort these steps.</p>
 
       <p>Values sort in their natural order, with the following additional constraints:</p>
 
@@ -42608,13 +42608,194 @@
 
      <li>
 
-      <p class=XXX>Return "a before b" if <var title="">value<sub>a</sub></var> is earlier than
-      <var title="">value<sub>b</sub></var>, and return "b before a" otherwise; for these purposes,
-      the strings must be compared using collation order of the <a href=#language>language</a> of the
-      <code><a href=#the-table-element>table</a></code> element to which <var title="">th</var>'s <a href=#concept-table title=concept-table>table</a> corresponds.</p>
+      <p>Let <var title="">components<sub>a</sub></var> be the result of <a href=#parsing-the-sort-key>parsing the sort
+      key</a> <var title="">value<sub>a</sub></var>.</p>
 
+      <p>Let <var title="">components<sub>b</sub></var> be the result of <a href=#parsing-the-sort-key>parsing the sort
+      key</a> <var title="">value<sub>b</sub></var>.</p>
+
+      <p>As described below, <var title="">components<sub>a</sub></var> and <var title="">components<sub>b</sub></var> are tuples consisting of a list of <var title="">n</var>
+      <i>numbers</i>, a list of <var title="">n</var> <i>number strings</i>, a list of <var title="">n</var>+1 <i>non-numeric strings</i>, and a list of 2<var title="">n</var>+1 <i>raw
+      strings</i>, for any non-negative integer value of <var title="">n</var> (zero or more).</p>
+
      </li>
 
+     <li>
+
+      <p>Let <var title="">order</var> be the result a <a href=#locale-specific-string-comparison>locale-specific string
+      comparison</a> of <var title="">components<sub>a</sub></var>'s first <i>non-numeric
+      string</i> and <var title="">components<sub>b</sub></var>'s first <i>non-numeric string</i>,
+      in the context of <var title="">th</var>.</p>
+
+      <p>If <var title="">order</var> is not "equal" then return <var title="">order</var> and abort
+      these steps.</p>
+
+     </li>
+
+     <li>
+
+      <p>If <var title="">components<sub>a</sub></var> and <var title="">components<sub>b</sub></var> both have exactly one the <i>number</i>, then run these
+      substeps:</p>
+
+      <ol><li>
+
+        <p>If <var title="">components<sub>a</sub></var>'s <i>number</i> is less than <var title="">components<sub>b</sub></var>'s <i>number</i>, return "a before b".</p>
+
+        <p>If <var title="">components<sub>b</sub></var>'s <i>number</i> is less than <var title="">components<sub>a</sub></var>'s <i>number</i>, return "b before a".</p>
+
+       </li>
+
+       <li>
+
+        <p>Let <var title="">order</var> be the result a <a href=#locale-specific-string-comparison>locale-specific string
+        comparison</a> of <var title="">components<sub>a</sub></var>'s second <i>non-numeric
+        string</i> and <var title="">components<sub>b</sub></var>'s second <i>non-numeric
+        string</i>, in the context of <var title="">th</var>.</p>
+
+        <p>If <var title="">order</var> is not "equal" then return <var title="">order</var> and
+        abort these steps.</p>
+
+       </li>
+
+       <li>
+
+        <p>Let <var title="">order</var> be the result a <a href=#locale-specific-string-comparison>locale-specific string
+        comparison</a> of <var title="">components<sub>a</sub></var>'s <i>number string</i> and
+        <var title="">components<sub>b</sub></var>'s <i>number string</i>, in the context of <var title="">th</var>.</p>
+
+        <p>If <var title="">order</var> is not "equal" then return <var title="">order</var> and
+        abort these steps.</p>
+
+       </li>
+
+      </ol><p>Otherwise, run these substeps:</p>
+
+      <ol><li>
+
+        <p>If <var title="">components<sub>a</sub></var> has zero <i>numbers</i> but <var title="">components<sub>b</sub></var> has more than zero <i>numbers</i>, return "a before
+        b".</p>
+
+        <p>If <var title="">components<sub>b</sub></var> has zero <i>numbers</i> but <var title="">components<sub>a</sub></var> has more than zero <i>numbers</i>, return "b before
+        a".</p>
+
+       </li>
+
+       <li>
+
+        <!-- either an=bn=0, an=1 bn>1, bn=1 an>1, or an and bn > 1. -->
+
+        <p>If <var title="">components<sub>a</sub></var> has one <i>number</i>, return "a before
+        b".</p>
+
+        <p>If <var title="">components<sub>b</sub></var> has one <i>number</i>, return "b before
+        a".</p>
+
+       </li>
+
+       <li>
+
+        <!-- either an=bn=0, or an and bn > 1. -->
+
+        <p>If <var title="">components<sub>a</sub></var> and <var title="">components<sub>b</sub></var> have more than one <i>number</i>, run these substeps:</p>
+
+        <ol><li><p>Let <var title="">count</var> be the smaller of the number of <i>numbers</i> in <var title="">components<sub>a</sub></var> and the number of <i>numbers</i> in <var title="">components<sub>b</sub></var>.</li>
+
+         <li><p>For each <i>number</i> in <var title="">components<sub>a</sub></var> and <var title="">components<sub>b</sub></var> from the first to the <var title="">count</var>th, in
+         order: if <var title="">components<sub>a</sub></var>'s <i>number</i> is less than <var title="">components<sub>b</sub></var>'s <i>number</i>, then return "a before b" and abort
+         these steps; otherwise, if <var title="">components<sub>b</sub></var>'s <i>number</i> is
+         less than <var title="">components<sub>a</sub></var>'s <i>number</i>, return "b before a"
+         and abort these steps.</li>
+
+         <li>
+
+          <p>If <var title="">components<sub>a</sub></var> has fewer <i>numbers</i> than <var title="">components<sub>b</sub></var>, return "a before b" and abort these steps.</p>
+
+          <p>If <var title="">components<sub>b</sub></var> has fewer <i>numbers</i> than <var title="">components<sub>a</sub></var>, return "b before a" and abort these steps.</p>
+
+         </li>
+
+         <!-- at this point, we know /a/ and /b/ have the same number of components -->
+
+         <li><p>Let <var title="">index</var> be zero.</li>
+
+         <li>
+
+          <p><i>String loop</i>: Let <var title="">order</var> be the result a <a href=#locale-specific-string-comparison>locale-specific
+          string comparison</a> of <var title="">components<sub>a</sub></var>'s <var title="">index</var>th <i>number string</i> and <var title="">components<sub>b</sub></var>'s <var title="">index</var>th <i>number string</i>,
+          in the context of <var title="">th</var>.</p>
+
+          <p>If <var title="">order</var> is not "equal" then return <var title="">order</var> and
+          abort these steps.</p>
+
+         </li>
+
+         <li>
+
+          <p>Increment <var title="">index</var>.</p>
+
+         </li>
+
+         <li>
+
+          <p>Let <var title="">order</var> be the result a <a href=#locale-specific-string-comparison>locale-specific string
+          comparison</a> of <var title="">components<sub>a</sub></var>'s <var title="">index</var>th <i>separator string</i> and <var title="">components<sub>b</sub></var>'s <var title="">index</var>th <i>separator
+          string</i>, in the context of <var title="">th</var>.</p>
+
+          <p>If <var title="">order</var> is not "equal" then return <var title="">order</var> and
+          abort these steps.</p>
+
+         </li>
+
+         <li>
+
+          <p>If <var title="">index</var> is less than the number of <i>numbers</i> in <var title="">components<sub>a</sub></var> and <var title="">components<sub>b</sub></var>, return
+          to the step labeled <i>string loop</i>.</p>
+
+         </li>
+
+        </ol></li>
+
+      </ol></li>
+
+     <li>
+
+      <!-- at this point, we know /a/ and /b/ have the same number of components -->
+
+      <p>Let <var title="">index</var> be zero.</p>
+
+     </li>
+
+     <li>
+
+      <p><i>Final loop:</i> Let <var title="">order</var> be the result a <a href=#raw-string-comparison>raw string
+      comparison</a> of <var title="">components<sub>a</sub></var>'s <var title="">n</var>th
+      <i>raw string</i> and <var title="">components<sub>b</sub></var>'s <var title="">n</var>th
+      <i>raw string</i>.</p>
+
+      <p>If <var title="">order</var> is not "equal" then return <var title="">order</var> and abort
+      these steps.</p>
+
+     </li>
+
+     <li>
+
+      <p>Increment <var title="">index</var>.</p>
+
+     </li>
+
+     <li>
+
+      <p>If <var title="">index</var> is less than the number of <i>raw strings</i> in <var title="">components<sub>a</sub></var> and <var title="">components<sub>b</sub></var>, return
+      to the step labeled <i>final loop</i>.</p>
+
+     </li>
+
+     <li>
+
+      <p>Return "equal".</p>
+
+     </li>
+
     </ol></li>
 
 
@@ -42646,7 +42827,400 @@
    <li><p><i>End</i>: Set <var title="">table</var>'s <a href=#currently-sorting-flag>currently-sorting flag</a> to
    false.</li>
 
-  </ol><p>When any of the descendants of a <a href=#sorting-enabled-table-element>sorting-enabled <code>table</code> element</a> change
+  </ol><p>When a user agent is to <dfn id=parsing-the-sort-key title="parsing the sort key">parse the sort key</dfn> <var title="">value</var>, it must run the following steps. These return a tuple consisting of a list
+  of <var title="">n</var> <i>numbers</i>, a list of <var title="">n</var> <i>number strings</i>, a
+  list of <var title="">n</var>+1 <i>non-numeric strings</i>, and a list of 2<var title="">n</var>+1
+  <i>raw strings</i>, respectively, for any non-negative integer value of <var title="">n</var> (zero or
+  more).</p>
+
+  <ol><li>
+    <p>Let <var title="">raw strings</var> be a list of strings initially containing just one entry, an empty string.</p>
+   </li>
+
+   <li>
+    <p>Let <var title="">negatives prejudiced</var> be false.</p>
+    <p>Let <var title="">decimals prejudiced</var> be false.</p>
+    <p>Let <var title="">exponents prejudiced</var> be false.</p>
+   </li>
+
+   <li>
+    <p>Let <var title="">buffer</var> be the empty string.</p>
+    <p>Let <var title="">index</var> be zero.</p>
+    <p>Let <var title="">mode</var> be "<a href=#sort-parser-mode:-separator title="sort parser mode: separator">separator</a>".</p>
+
+    <p>When a subsequent step in this algorithm says to <dfn id=sort-parser-push-the-buffer title="sort parser push the
+    buffer">push the buffer</dfn>, the user agent must run the following substeps:</p>
+
+    <ol><li><p>Add an entry to <var title="">raw strings</var> that consists of the value of <var title="">buffer</var>.</li>
+
+     <li><p>Add an entry to <var title="">raw strings</var> that is the empty string.</li>
+
+     <li><p>Decrement <var title="">index</var> by one.</li>
+
+     <li><p>Set <var title="">mode</var> to "<a href=#sort-parser-mode:-separator title="sort parser mode: separator">separator</a>".</li>
+
+    </ol></li>
+
+   <li>
+    <p>Let <var title="">checkpoint buffer</var> be the empty string.</p> <!-- actual value doesn't matter; it won't be used -->
+    <p>Let <var title="">checkpoint index</var> be zero.</p> <!-- actual value doesn't matter; it won't be used -->
+
+    <p>When a subsequent step in this algorithm says to <dfn id=sort-parser-checkpoint title="sort parser
+    checkpoint">checkpoint</dfn>, the user agent must run the following substeps:</p>
+
+    <ol><li><p>Set the <var title="">checkpoint buffer</var> to the value of <var title="">buffer</var>.</p>
+     <li><p>Set the <var title="">checkpoint index</var> to the value of <var title="">index</var>.</p>
+    </ol><p>When a subsequent step in this algorithm says to <dfn id=sort-parser-push-the-checkpoint title="sort parser push the
+    checkpoint">push the checkpoint</dfn>, the user agent must run the following substeps:</p>
+
+    <ol><li><p>Add an entry to <var title="">raw strings</var> that consists of the value of <var title="">checkpoint buffer</var>.</li>
+
+     <li><p>Add an entry to <var title="">raw strings</var> that is the empty string.</li>
+
+     <li><p>Decrement <var title="">index</var> by one.</li>
+
+     <li><p>Set <var title="">mode</var> to "<a href=#sort-parser-mode:-separator title="sort parser mode: separator">separator</a>".</li>
+
+    </ol></li>
+
+   <li>
+
+    <p>Run through the following steps repeatedly until the condition in the last step is met.</p>
+
+    <ol><li>
+
+      <p><i>Top of loop</i>: If <var title="">index</var> is equal to or greater than the number of
+      characters in <var title="">value</var>, let <var title="">c</var> be EOF. Otherwise, let <var title="">c</var> be the <var title="">index</var>th character in <var title="">value</var>.</p>
+
+     </li>
+
+     <li>
+
+      <p>Run the appropriate steps from the following list:</p>
+
+      <dl class=switch><dt>If <var title="sort parser mode">mode</var> is "<dfn id=sort-parser-mode:-separator title="sort parser mode: separator">separator</dfn>"</dt>
+       <dd>
+        <p>Run the appropriate substeps from the following list:</p>
+        <dl class=switch><dt>If <var title="">c</var> is a <a href=#space-character>space character</a></dt>
+         <dd>
+          <p>Set <var title="">negatives prejudiced</var> to false.</p>
+          <p>Set <var title="">decimals prejudiced</var> to false.</p>
+          <p>Set <var title="">exponents prejudiced</var> to false.</p>
+          <p>Append <var title="">c</var> to the last entry in <var title="">raw strings</var>.</p>
+         </dd>
+         <dt>If <var title="">c</var> is a U+002D HYPHEN-MINUS character (-) and <var title="">negatives prejudiced</var> is false</dt>
+         <dd>
+          <p>Set <var title="">buffer</var> to the value of <var title="">c</var>.</p>
+          <p>Set <var title="sort parser mode">mode</var> to "<a href=#sort-parser-mode:-negative title="sort parser mode: negative">negative</a>".</p>
+         </dd>
+         <dt>If <var title="">c</var> is a U+002E FULL STOP character (.) and <var title="">decimals prejudiced</var> is false</dt>
+         <dd>
+          <p>Set <var title="">buffer</var> to the value of <var title="">c</var>.</p>
+          <p>Set <var title="sort parser mode">mode</var> to "<a href=#sort-parser-mode:-leading-decimal title="sort parser mode: leading-decimal">leading-decimal</a>".</p>
+         </dd>
+         <dt>If <var title="">c</var> is an <a href=#ascii-digits title="ASCII digits">ASCII digit</a></dt>
+         <dd>
+          <p>Set <var title="">buffer</var> to the value of <var title="">c</var>.</p>
+          <p>Set <var title="sort parser mode">mode</var> to "<a href=#sort-parser-mode:-integral title="sort parser mode: integral">integral</a>".</p>
+         </dd>
+         <dt>If <var title="">c</var> is an <a href=#uppercase-ascii-letters title="uppercase ASCII letters">uppercase ASCII letter</a> or a <a href=#lowercase-ascii-letters title="lowercase ASCII letters">lowercase ASCII letter</a></dt>
+         <dd>
+          <p>Set <var title="">exponents prejudiced</var> to true.</p>
+          <p>Append <var title="">c</var> to the last entry in <var title="">raw strings</var>.</p>
+         </dd>
+         <dt>If <var title="">c</var> is EOF</dt>
+         <dd>
+          <p>Do nothing.</p>
+         </dd>
+         <dt>Otherwise</dt>
+         <dd>
+          <p>Append <var title="">c</var> to the last entry in <var title="">raw strings</var>.</p>
+         </dd>
+        </dl></dd>
+       <dt>If <var title="sort parser mode">mode</var> is "<dfn id=sort-parser-mode:-negative title="sort parser mode: negative">negative</dfn>"</dt>
+       <dd>
+        <p>Run the appropriate substeps from the following list:</p>
+        <dl class=switch><dt>If <var title="">c</var> is a U+002D HYPHEN-MINUS character (-)</dt>
+         <dd>
+          <p>Set <var title="">negatives prejudiced</var> to true.</p>
+          <p>Append <var title="">buffer</var> to the last entry in <var title="">raw strings</var>.</p>
+          <p>Append <var title="">c</var> to the last entry in <var title="">raw strings</var>.</p>
+          <p>Set <var title="sort parser mode">mode</var> to "<a href=#sort-parser-mode:-separator title="sort parser mode: separator">separator</a>".</p>
+         </dd>
+         <dt>If <var title="">c</var> is a U+002E FULL STOP character (.) and <var title="">decimals prejudiced</var> is false</dt>
+         <dd>
+          <p>Append <var title="">c</var> to <var title="">buffer</var>.</p>
+          <p>Set <var title="sort parser mode">mode</var> to "<a href=#sort-parser-mode:-leading-decimal title="sort parser mode: leading-decimal">leading-decimal</a>".</p>
+         </dd>
+         <dt>If <var title="">c</var> is an <a href=#ascii-digits title="ASCII digits">ASCII digit</a></dt>
+         <dd>
+          <p>Append <var title="">c</var> to <var title="">buffer</var>.</p>
+          <p>Set <var title="sort parser mode">mode</var> to "<a href=#sort-parser-mode:-integral title="sort parser mode: integral">integral</a>".</p>
+         </dd>
+         <dt>Otherwise</dt>
+         <dd>
+          <p>Append <var title="">buffer</var> to the last entry in <var title="">raw strings</var>.</p>
+          <p>Decrement <var title="">index</var> by one.</p>
+          <p>Set <var title="sort parser mode">mode</var> to "<a href=#sort-parser-mode:-separator title="sort parser mode: separator">separator</a>".</p>
+         </dd>
+        </dl></dd>
+       <dt>If <var title="sort parser mode">mode</var> is "<dfn id=sort-parser-mode:-integral title="sort parser mode: integral">integral</dfn>"</dt>
+       <dd>
+        <p>Run the appropriate substeps from the following list:</p>
+        <dl class=switch><dt>If <var title="">c</var> is a U+002D HYPHEN-MINUS character (-)</dt>
+         <dd>
+          <p>Set <var title="">negatives prejudiced</var> to true.</p>
+          <p><a href=#sort-parser-push-the-buffer title="sort parser push the buffer">Push the buffer</a>.</p>
+         </dd>
+         <dt>If <var title="">c</var> is a U+002E FULL STOP character (.) and <var title="">decimals prejudiced</var> is false</dt>
+         <dd>
+          <p><a href=#sort-parser-checkpoint title="sort parser checkpoint">Checkpoint</a>.</p>
+          <p>Append <var title="">c</var> to <var title="">buffer</var>.</p>
+          <p>Set <var title="sort parser mode">mode</var> to "<a href=#sort-parser-mode:-decimal title="sort parser mode: decimal">decimal</a>".</p>
+         </dd>
+         <dt>If <var title="">c</var> is an <a href=#ascii-digits title="ASCII digits">ASCII digit</a></dt>
+         <dd>
+          <p>Append <var title="">c</var> to the last entry in <var title="">raw strings</var>.</p>
+         </dd>
+         <dt>If <var title="">c</var> is  and <var title="">exponents prejudiced</var> is false</dt>
+         <dd>
+          <p><a href=#sort-parser-checkpoint title="sort parser checkpoint">Checkpoint</a>.</p>
+          <p>Append <var title="">c</var> to <var title="">buffer</var>.</p>
+          <p>Set <var title="sort parser mode">mode</var> to "<a href=#sort-parser-mode:-exponent title="sort parser mode: exponent">exponent</a>".</p>
+         </dd>
+         <dt>Otherwise</dt>
+         <dd>
+          <p><a href=#sort-parser-push-the-buffer title="sort parser push the buffer">Push the buffer</a>.</p>
+         </dd>
+        </dl></dd>
+       <dt>If <var title="sort parser mode">mode</var> is "<dfn id=sort-parser-mode:-leading-decimal title="sort parser mode: leading-decimal">leading-decimal</dfn>"</dt>
+       <dd>
+        <p>Run the appropriate substeps from the following list:</p>
+        <dl class=switch><dt>If <var title="">c</var> is an <a href=#ascii-digits title="ASCII digits">ASCII digit</a></dt>
+         <dd>
+          <p>Append <var title="">c</var> to <var title="">buffer</var>.</p>
+          <p>Set <var title="sort parser mode">mode</var> to "<a href=#sort-parser-mode:-decimal title="sort parser mode: decimal">decimal</a>".</p>
+         </dd>
+         <dt>Otherwise</dt>
+         <dd>
+          <p>Append <var title="">buffer</var> to the last entry in <var title="">raw strings</var>.</p>
+          <p>Decrement <var title="">index</var> by one.</p>
+          <p>Set <var title="sort parser mode">mode</var> to "<a href=#sort-parser-mode:-separator title="sort parser mode: separator">separator</a>".</p>
+         </dd>
+        </dl></dd>
+       <dt>If <var title="sort parser mode">mode</var> is "<dfn id=sort-parser-mode:-decimal title="sort parser mode: decimal">decimal</dfn>"</dt>
+       <dd>
+        <p>Run the appropriate substeps from the following list:</p>
+        <dl class=switch><dt>If <var title="">c</var> is a U+002D HYPHEN-MINUS character (-)</dt>
+         <dd>
+          <p>Set <var title="">negatives prejudiced</var> to true.</p>
+          <p><a href=#sort-parser-push-the-buffer title="sort parser push the buffer">Push the buffer</a>.</p>
+         </dd>
+         <dt>If <var title="">c</var> is  and any of the characters in <var title="">value</var> past the <var title="">index</var>th character are <a href=#ascii-digits>ASCII digits</a></dt>
+         <dd>
+          <p>Set <var title="">decimals prejudiced</var> to true.</p>
+          <p><a href=#sort-parser-push-the-checkpoint title="sort parser push the checkpoint">Push the checkpoint</a>.</p>
+         </dd>
+         <dt>If <var title="">c</var> is  and none of the characters in <var title="">value</var> past the <var title="">index</var>th character are <a href=#ascii-digits>ASCII digits</a></dt>
+         <dd>
+          <p><a href=#sort-parser-push-the-buffer title="sort parser push the buffer">Push the buffer</a>.</p>
+         </dd>
+         <dt>If <var title="">c</var> is an <a href=#ascii-digits title="ASCII digits">ASCII digit</a></dt>
+         <dd>
+          <p>Append <var title="">c</var> to <var title="">buffer</var>.</p>
+         </dd>
+         <dt>If <var title="">c</var> is  and <var title="">exponents prejudiced</var> is false</dt>
+         <dd>
+          <p><a href=#sort-parser-checkpoint title="sort parser checkpoint">Checkpoint</a>.</p>
+          <p>Append <var title="">c</var> to <var title="">buffer</var>.</p>
+          <p>Set <var title="sort parser mode">mode</var> to "<a href=#sort-parser-mode:-exponent title="sort parser mode: exponent">exponent</a>".</p>
+         </dd>
+         <dt>Otherwise</dt>
+         <dd>
+          <p><a href=#sort-parser-push-the-buffer title="sort parser push the buffer">Push the buffer</a>.</p>
+         </dd>
+        </dl></dd>
+       <dt>If <var title="sort parser mode">mode</var> is "<dfn id=sort-parser-mode:-exponent title="sort parser mode: exponent">exponent</dfn>"</dt>
+       <dd>
+        <p>Run the appropriate substeps from the following list:</p>
+        <dl class=switch><dt>If <var title="">c</var> is a U+002D HYPHEN-MINUS character (-) and <var title="">negatives prejudiced</var> is false</dt>
+         <dd>
+          <p>Append <var title="">c</var> to <var title="">buffer</var>.</p>
+          <p>Set <var title="sort parser mode">mode</var> to "<a href=#sort-parser-mode:-exponent-negative title="sort parser mode: exponent-negative">exponent-negative</a>".</p>
+         </dd>
+         <dt>If <var title="">c</var> is a U+002E FULL STOP character (.)</dt>
+         <dd>
+          <p>Set <var title="">decimals prejudiced</var> to true.</p>
+          <p><a href=#sort-parser-push-the-checkpoint title="sort parser push the checkpoint">Push the checkpoint</a>.</p>
+         </dd>
+         <dt>If <var title="">c</var> is an <a href=#ascii-digits title="ASCII digits">ASCII digit</a></dt>
+         <dd>
+          <p>Append <var title="">c</var> to <var title="">buffer</var>.</p>
+          <p>Set <var title="sort parser mode">mode</var> to "<a href=#sort-parser-mode:-exponent-number title="sort parser mode: exponent-number">exponent-number</a>".</p>
+         </dd>
+         <dt>If <var title="">c</var> is </dt>
+         <dd>
+          <p>Set <var title="">exponents prejudiced</var> to true.</p>
+          <p><a href=#sort-parser-push-the-checkpoint title="sort parser push the checkpoint">Push the checkpoint</a>.</p>
+         </dd>
+         <dt>Otherwise</dt>
+         <dd>
+          <p><a href=#sort-parser-push-the-checkpoint title="sort parser push the checkpoint">Push the checkpoint</a>.</p>
+         </dd>
+        </dl></dd>
+       <dt>If <var title="sort parser mode">mode</var> is "<dfn id=sort-parser-mode:-exponent-negative title="sort parser mode: exponent-negative">exponent-negative</dfn>"</dt>
+       <dd>
+        <p>Run the appropriate substeps from the following list:</p>
+        <dl class=switch><dt>If <var title="">c</var> is a U+002D HYPHEN-MINUS character (-)</dt>
+         <dd>
+          <p>Set <var title="">negatives prejudiced</var> to true.</p>
+          <p><a href=#sort-parser-push-the-checkpoint title="sort parser push the checkpoint">Push the checkpoint</a>.</p>
+         </dd>
+         <dt>If <var title="">c</var> is a U+002E FULL STOP character (.)</dt>
+         <dd>
+          <p>Set <var title="">decimals prejudiced</var> to true.</p>
+          <p><a href=#sort-parser-push-the-checkpoint title="sort parser push the checkpoint">Push the checkpoint</a>.</p>
+         </dd>
+         <dt>If <var title="">c</var> is an <a href=#ascii-digits title="ASCII digits">ASCII digit</a></dt>
+         <dd>
+          <p>Append <var title="">c</var> to <var title="">buffer</var>.</p>
+          <p>Set <var title="sort parser mode">mode</var> to "<a href=#sort-parser-mode:-exponent-negative-number title="sort parser mode: exponent-negative-number">exponent-negative-number</a>".</p>
+         </dd>
+         <dt>If <var title="">c</var> is </dt>
+         <dd>
+          <p>Set <var title="">exponents prejudiced</var> to true.</p>
+          <p><a href=#sort-parser-push-the-checkpoint title="sort parser push the checkpoint">Push the checkpoint</a>.</p>
+         </dd>
+         <dt>Otherwise</dt>
+         <dd>
+          <p><a href=#sort-parser-push-the-checkpoint title="sort parser push the checkpoint">Push the checkpoint</a>.</p>
+         </dd>
+        </dl></dd>
+       <dt>If <var title="sort parser mode">mode</var> is "<dfn id=sort-parser-mode:-exponent-number title="sort parser mode: exponent-number">exponent-number</dfn>"</dt>
+       <dd>
+        <p>Run the appropriate substeps from the following list:</p>
+        <dl class=switch><dt>If <var title="">c</var> is a U+002D HYPHEN-MINUS character (-)</dt>
+         <dd>
+          <p>Set <var title="">negatives prejudiced</var> to true.</p>
+          <p><a href=#sort-parser-push-the-buffer title="sort parser push the buffer">Push the buffer</a>.</p>
+         </dd>
+         <dt>If <var title="">c</var> is a U+002E FULL STOP character (.)</dt>
+         <dd>
+          <p>Set <var title="">decimals prejudiced</var> to true.</p>
+          <p><a href=#sort-parser-push-the-checkpoint title="sort parser push the checkpoint">Push the checkpoint</a>.</p>
+         </dd>
+         <dt>If <var title="">c</var> is an <a href=#ascii-digits title="ASCII digits">ASCII digit</a></dt>
+         <dd>
+          <p>Append <var title="">c</var> to <var title="">buffer</var>.</p>
+         </dd>
+         <dt>If <var title="">c</var> is </dt>
+         <dd>
+          <p>Set <var title="">exponents prejudiced</var> to true.</p>
+          <p><a href=#sort-parser-push-the-checkpoint title="sort parser push the checkpoint">Push the checkpoint</a>.</p>
+         </dd>
+         <dt>Otherwise</dt>
+         <dd>
+          <p><a href=#sort-parser-push-the-buffer title="sort parser push the buffer">Push the buffer</a>.</p>
+         </dd>
+        </dl></dd>
+       <dt>If <var title="sort parser mode">mode</var> is "<dfn id=sort-parser-mode:-exponent-negative-number title="sort parser mode: exponent-negative-number">exponent-negative-number</dfn>"</dt>
+       <dd>
+        <p>Run the appropriate substeps from the following list:</p>
+        <dl class=switch><dt>If <var title="">c</var> is a U+002D HYPHEN-MINUS character (-)</dt>
+         <dd>
+          <p>Set <var title="">negatives prejudiced</var> to true.</p>
+          <p><a href=#sort-parser-push-the-checkpoint title="sort parser push the checkpoint">Push the checkpoint</a>.</p>
+         </dd>
+         <dt>If <var title="">c</var> is a U+002E FULL STOP character (.)</dt>
+         <dd>
+          <p>Set <var title="">decimals prejudiced</var> to true.</p>
+          <p><a href=#sort-parser-push-the-checkpoint title="sort parser push the checkpoint">Push the checkpoint</a>.</p>
+         </dd>
+         <dt>If <var title="">c</var> is an <a href=#ascii-digits title="ASCII digits">ASCII digit</a></dt>
+         <dd>
+          <p>Append <var title="">c</var> to <var title="">buffer</var>.</p>
+         </dd>
+         <dt>If <var title="">c</var> is </dt>
+         <dd>
+          <p>Set <var title="">exponents prejudiced</var> to true.</p>
+          <p><a href=#sort-parser-push-the-checkpoint title="sort parser push the checkpoint">Push the checkpoint</a>.</p>
+         </dd>
+         <dt>Otherwise</dt>
+         <dd>
+          <p><a href=#sort-parser-push-the-buffer title="sort parser push the buffer">Push the buffer</a>.</p>
+         </dd>
+        </dl></dd>
+      </dl></li>
+
+     <li>
+
+      <p>Increment <var title="">index</var> by one.</p>
+
+     </li>
+
+     <li>
+
+      <p>If <var title="">index</var> is greater than the number of characters in <var title="">value</var>, stop repeating these substeps and continue along the overall steps.
+      Otherwise, return to the step labeled <i>top of loop</i>.</p>
+
+     </li>
+
+    </ol></li>
+
+   <li>
+    <p>Let <var title="">numbers</var> be an empty list.</p>
+    <p>Let <var title="">number strings</var> be an empty list.</p>
+    <p>Let <var title="">non-numeric strings</var> be an empty list.</p>
+   </li>
+
+   <li>
+
+    <p>For each even-numbered entry in <var title="">raw strings</var>, in order, starting from the
+    first entry (numbered 0), append an entry to <var title="">non-numeric strings</var> that
+    consists of the result of <a href=#trimming-and-collapsing>trimming and collapsing</a> the value of the entry.</p>
+
+   </li>
+
+   <li>
+
+    <p>If <var title="">raw strings</var> has more than one entry, then, for each odd-numbered entry
+    in <var title="">raw strings</var>, in order, starting from the second entry (numbered 1),
+    append an entry to <var title="">number strings</var> that consists of the value of the entry,
+    and append an entry to <var title="">number strings</var> that consists of the result of parsing
+    the value of the entry using the <a href=#rules-for-parsing-floating-point-number-values>rules for parsing floating-point number
+    values</a>.</p>
+
+   </li>
+
+   <li>
+
+    <p>Return <var title="">numbers</var>, <var title="">number strings</var>, <var title="">non-numeric strings</var>, and <var title="">raw strings</var> respectively.</p>
+
+   </li>
+
+  </ol><p>When the user agent is required by the step above to perform a <dfn id=locale-specific-string-comparison>locale-specific string
+  comparison</dfn> of two strings <var title="">a</var> and <var title="">b</var> in the context of
+  an element <var title="">e</var>, the user agent must apply the Unicode Collation Algorithm, using
+  the Default Unicode Collation Element Table as customized for the <a href=#language>language</a> of the
+  element <var title="">e</var> in the Common Locale Data Repository, to the strings <var title="">a</var> and <var title="">b</var>, ignoring case. If the result of this algorithm places
+  <var title="">a</var> first, then return "a before b"; if it places <var title="">b</var> first,
+  then return "b before a"; otherwise, if they compare as equal, then return "equal". <a href=#refsUCA>[UCA]</a> <a href=#CLDR>[CLDR]</a></p>
+
+  <p>When the user agent is required by the step above to perform a <dfn id=raw-string-comparison>raw string comparison</dfn>
+  of two strings <var title="">a</var> and <var title="">b</var>, the user agent must apply the
+  Unicode Collation Algorithm, using the Default Unicode Collation Element Table without
+  customizations, to the strings <var title="">a</var> and <var title="">b</var>. If the result of
+  this algorithm places <var title="">a</var> first, then return "a before b"; if it places <var title="">b</var> first, then return "b before a"; otherwise, if they compare as equal, then return
+  "equal". <a href=#refsUCA>[UCA]</a></p>
+
+  <p>Where the steps above refer to <dfn id=trimming-and-collapsing>trimming and collapsing</dfn> a string <var title="">value</var>, it means running the following algorithm:</p>
+
+  <ol><li><p><a href=#strip-leading-and-trailing-whitespace>Strip leading and trailing whitespace</a> from <var title="">value</var>.</li>
+
+   <li><p>Replace any sequence of one or more <a href=#space-character title="space character">space characters</a>
+   in <var title="">value</var> with a single U+0020 SPACE character.</li>
+
+  </ol><hr><p>When any of the descendants of a <a href=#sorting-enabled-table-element>sorting-enabled <code>table</code> element</a> change
   in any way (including attributes changing), and when a <code><a href=#the-table-element>table</a></code> element becomes a
   <a href=#sorting-enabled-table-element>sorting-enabled <code>table</code> element</a>, the <code><a href=#the-table-element>table</a></code> element is said to
   become <dfn id=a-table-with-a-pending-sort>a table with a pending sort</dfn>.</p>
@@ -93693,7 +94267,7 @@
 :root:lang(ja),       :not(:lang(ja)) > :lang(ja)             { quotes: '\300c' '\300d' '\300e' '\300f' } /* 「 」 『 』 */
 :root:lang(jgo),      :not(:lang(jgo)) > :lang(jgo)           { quotes: '\00ab' '\00bb' '\2039' '\203a' } /* « » ‹ › */
 :root:lang(jmc),      :not(:lang(jmc)) > :lang(jmc)           { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
-:root:lang(ka),       :not(:lang(ka)) > :lang(ka)             { quotes: '\201e' '\201c' '\00ab' '\00bb' } /* „ “ « » */
+:root:lang(ka),       :not(:lang(ka)) > :lang(ka)             { quotes: '\201e' '\201c' '\201e' '\201c' } /* „ “ „ “ */
 :root:lang(kab),      :not(:lang(kab)) > :lang(kab)           { quotes: '\00ab' '\00bb' '\201c' '\201d' } /* « » “ ” */
 :root:lang(kam),      :not(:lang(kam)) > :lang(kam)           { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
 :root:lang(kde),      :not(:lang(kde)) > :lang(kde)           { quotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ ’ */
@@ -101309,7 +101883,7 @@
    <dd>(Non-normative) <cite><a href=http://www.w3.org/TR/charmod/>Character Model for the World Wide Web 1.0: Fundamentals</a></cite>, M. Dürst, F. Yergeau, R. Ishida, M. Wolf, T. Texin. W3C.</dd>
 
    <dt id=refsCLDR>[CLDR]</dt>
-   <dd>(Non-normative) <cite><a href=http://cldr.unicode.org/>Unicode Common Locale Data Repository</a></cite>. Unicode.</dd>
+   <dd><cite><a href=http://cldr.unicode.org/>Unicode Common Locale Data Repository</a></cite>. Unicode.</dd>
 
    <dt id=refsCOMPUTABLE>[COMPUTABLE]</dt>
    <dd>(Non-normative) <cite><a href=http://www.turingarchive.org/browse.php/B/12>On computable numbers, with an application to the Entscheidungsproblem</a></cite>, A. Turing. In <cite>Proceedings of the London Mathematical Society</cite>, series 2, volume 42, pages 230-265. London Mathematical Society, 1937.</dd>
@@ -101623,6 +102197,9 @@
    <dt id=refsUAAG>[UAAG]</dt>
    <dd>(Non-normative) <cite><a href=http://www.w3.org/TR/UAAG20/>User Agent Accessibility Guidelines (UAAG) 2.0</a></cite>, J. Allan, K. Ford, J. Richards, J. Spellman. W3C.</dd>
 
+   <dt id=refsUCA>[UCA]</dt>
+   <dd><cite><a href=http://www.unicode.org/reports/tr10/>UTR #10: Unicode Collation Algorithm</a></cite>, M. Davis, K. Whistler. Unicode Consortium.</dd>
+
    <dt id=refsUNDO>[UNDO]</dt>
    <dd><cite><a href=http://rniwa.com/editing/undomanager.html>UndoManager and DOM Transaction</a></cite>, R. Niwa.</dd>
 

Modified: source
===================================================================
--- source	2013-02-25 19:41:46 UTC (rev 7726)
+++ source	2013-03-02 01:30:14 UTC (rev 7727)
@@ -49794,8 +49794,9 @@
      <li>
 
       <p>If <var title="">type<sub>a</sub></var> and <var title="">type<sub>b</sub></var> are not
-      "string", then: return "a before b" if <var title="">value<sub>a</sub></var> is earlier
-      than <var title="">value<sub>b</sub></var>, and return "b before a" otherwise.</p>
+      "string", then: if <var title="">value<sub>a</sub></var> is earlier than <var
+      title="">value<sub>b</sub></var> then return "a before b" and abort these steps, otherwise,
+      return "b before a" and abort these steps.</p>
 
       <p>Values sort in their natural order, with the following additional constraints:</p>
 
@@ -49822,14 +49823,227 @@
 
      <li>
 
-      <p class="XXX">Return "a before b" if <var title="">value<sub>a</sub></var> is earlier than
-      <var title="">value<sub>b</sub></var>, and return "b before a" otherwise; for these purposes,
-      the strings must be compared using collation order of the <span>language</span> of the
-      <code>table</code> element to which <var title="">th</var>'s <span
-      title="concept-table">table</span> corresponds.</p>
+      <p>Let <var title="">components<sub>a</sub></var> be the result of <span>parsing the sort
+      key</span> <var title="">value<sub>a</sub></var>.</p>
 
+      <p>Let <var title="">components<sub>b</sub></var> be the result of <span>parsing the sort
+      key</span> <var title="">value<sub>b</sub></var>.</p>
+
+      <p>As described below, <var title="">components<sub>a</sub></var> and <var
+      title="">components<sub>b</sub></var> are tuples consisting of a list of <var title="">n</var>
+      <i>numbers</i>, a list of <var title="">n</var> <i>number strings</i>, a list of <var
+      title="">n</var>+1 <i>non-numeric strings</i>, and a list of 2<var title="">n</var>+1 <i>raw
+      strings</i>, for any non-negative integer value of <var title="">n</var> (zero or more).</p>
+
      </li>
 
+     <li>
+
+      <p>Let <var title="">order</var> be the result a <span>locale-specific string
+      comparison</span> of <var title="">components<sub>a</sub></var>'s first <i>non-numeric
+      string</i> and <var title="">components<sub>b</sub></var>'s first <i>non-numeric string</i>,
+      in the context of <var title="">th</var>.</p>
+
+      <p>If <var title="">order</var> is not "equal" then return <var title="">order</var> and abort
+      these steps.</p>
+
+     </li>
+
+     <li>
+
+      <p>If <var title="">components<sub>a</sub></var> and <var
+      title="">components<sub>b</sub></var> both have exactly one the <i>number</i>, then run these
+      substeps:</p>
+
+      <ol>
+
+       <li>
+
+        <p>If <var title="">components<sub>a</sub></var>'s <i>number</i> is less than <var
+        title="">components<sub>b</sub></var>'s <i>number</i>, return "a before b".</p>
+
+        <p>If <var title="">components<sub>b</sub></var>'s <i>number</i> is less than <var
+        title="">components<sub>a</sub></var>'s <i>number</i>, return "b before a".</p>
+
+       </li>
+
+       <li>
+
+        <p>Let <var title="">order</var> be the result a <span>locale-specific string
+        comparison</span> of <var title="">components<sub>a</sub></var>'s second <i>non-numeric
+        string</i> and <var title="">components<sub>b</sub></var>'s second <i>non-numeric
+        string</i>, in the context of <var title="">th</var>.</p>
+
+        <p>If <var title="">order</var> is not "equal" then return <var title="">order</var> and
+        abort these steps.</p>
+
+       </li>
+
+       <li>
+
+        <p>Let <var title="">order</var> be the result a <span>locale-specific string
+        comparison</span> of <var title="">components<sub>a</sub></var>'s <i>number string</i> and
+        <var title="">components<sub>b</sub></var>'s <i>number string</i>, in the context of <var
+        title="">th</var>.</p>
+
+        <p>If <var title="">order</var> is not "equal" then return <var title="">order</var> and
+        abort these steps.</p>
+
+       </li>
+
+      </ol>
+
+      <p>Otherwise, run these substeps:</p>
+
+      <ol>
+
+       <li>
+
+        <p>If <var title="">components<sub>a</sub></var> has zero <i>numbers</i> but <var
+        title="">components<sub>b</sub></var> has more than zero <i>numbers</i>, return "a before
+        b".</p>
+
+        <p>If <var title="">components<sub>b</sub></var> has zero <i>numbers</i> but <var
+        title="">components<sub>a</sub></var> has more than zero <i>numbers</i>, return "b before
+        a".</p>
+
+       </li>
+
+       <li>
+
+        <!-- either an=bn=0, an=1 bn>1, bn=1 an>1, or an and bn > 1. -->
+
+        <p>If <var title="">components<sub>a</sub></var> has one <i>number</i>, return "a before
+        b".</p>
+
+        <p>If <var title="">components<sub>b</sub></var> has one <i>number</i>, return "b before
+        a".</p>
+
+       </li>
+
+       <li>
+
+        <!-- either an=bn=0, or an and bn > 1. -->
+
+        <p>If <var title="">components<sub>a</sub></var> and <var
+        title="">components<sub>b</sub></var> have more than one <i>number</i>, run these substeps:</p>
+
+        <ol>
+
+         <li><p>Let <var title="">count</var> be the smaller of the number of <i>numbers</i> in <var
+         title="">components<sub>a</sub></var> and the number of <i>numbers</i> in <var
+         title="">components<sub>b</sub></var>.</p></li>
+
+         <li><p>For each <i>number</i> in <var title="">components<sub>a</sub></var> and <var
+         title="">components<sub>b</sub></var> from the first to the <var title="">count</var>th, in
+         order: if <var title="">components<sub>a</sub></var>'s <i>number</i> is less than <var
+         title="">components<sub>b</sub></var>'s <i>number</i>, then return "a before b" and abort
+         these steps; otherwise, if <var title="">components<sub>b</sub></var>'s <i>number</i> is
+         less than <var title="">components<sub>a</sub></var>'s <i>number</i>, return "b before a"
+         and abort these steps.</p></li>
+
+         <li>
+
+          <p>If <var title="">components<sub>a</sub></var> has fewer <i>numbers</i> than <var
+          title="">components<sub>b</sub></var>, return "a before b" and abort these steps.</p>
+
+          <p>If <var title="">components<sub>b</sub></var> has fewer <i>numbers</i> than <var
+          title="">components<sub>a</sub></var>, return "b before a" and abort these steps.</p>
+
+         </li>
+
+         <!-- at this point, we know /a/ and /b/ have the same number of components -->
+
+         <li><p>Let <var title="">index</var> be zero.</p></li>
+
+         <li>
+
+          <p><i>String loop</i>: Let <var title="">order</var> be the result a <span>locale-specific
+          string comparison</span> of <var title="">components<sub>a</sub></var>'s <var
+          title="">index</var>th <i>number string</i> and <var
+          title="">components<sub>b</sub></var>'s <var title="">index</var>th <i>number string</i>,
+          in the context of <var title="">th</var>.</p>
+
+          <p>If <var title="">order</var> is not "equal" then return <var title="">order</var> and
+          abort these steps.</p>
+
+         </li>
+
+         <li>
+
+          <p>Increment <var title="">index</var>.</p>
+
+         </li>
+
+         <li>
+
+          <p>Let <var title="">order</var> be the result a <span>locale-specific string
+          comparison</span> of <var title="">components<sub>a</sub></var>'s <var
+          title="">index</var>th <i>separator string</i> and <var
+          title="">components<sub>b</sub></var>'s <var title="">index</var>th <i>separator
+          string</i>, in the context of <var title="">th</var>.</p>
+
+          <p>If <var title="">order</var> is not "equal" then return <var title="">order</var> and
+          abort these steps.</p>
+
+         </li>
+
+         <li>
+
+          <p>If <var title="">index</var> is less than the number of <i>numbers</i> in <var
+          title="">components<sub>a</sub></var> and <var title="">components<sub>b</sub></var>, return
+          to the step labeled <i>string loop</i>.</p>
+
+         </li>
+
+        </ol>
+
+       </li>
+
+      </ol>
+
+     </li>
+
+     <li>
+
+      <!-- at this point, we know /a/ and /b/ have the same number of components -->
+
+      <p>Let <var title="">index</var> be zero.</p>
+
+     </li>
+
+     <li>
+
+      <p><i>Final loop:</i> Let <var title="">order</var> be the result a <span>raw string
+      comparison</span> of <var title="">components<sub>a</sub></var>'s <var title="">n</var>th
+      <i>raw string</i> and <var title="">components<sub>b</sub></var>'s <var title="">n</var>th
+      <i>raw string</i>.</p>
+
+      <p>If <var title="">order</var> is not "equal" then return <var title="">order</var> and abort
+      these steps.</p>
+
+     </li>
+
+     <li>
+
+      <p>Increment <var title="">index</var>.</p>
+
+     </li>
+
+     <li>
+
+      <p>If <var title="">index</var> is less than the number of <i>raw strings</i> in <var
+      title="">components<sub>a</sub></var> and <var title="">components<sub>b</sub></var>, return
+      to the step labeled <i>final loop</i>.</p>
+
+     </li>
+
+     <li>
+
+      <p>Return "equal".</p>
+
+     </li>
+
     </ol>
 
    </li>
@@ -49867,6 +50081,329 @@
 
   </ol>
 
+  <p>When a user agent is to <dfn title="parsing the sort key">parse the sort key</dfn> <var
+  title="">value</var>, it must run the following steps. These return a tuple consisting of a list
+  of <var title="">n</var> <i>numbers</i>, a list of <var title="">n</var> <i>number strings</i>, a
+  list of <var title="">n</var>+1 <i>non-numeric strings</i>, and a list of 2<var title="">n</var>+1
+  <i>raw strings</i>, respectively, for any non-negative integer value of <var title="">n</var> (zero or
+  more).</p>
+
+  <ol>
+
+   <li>
+    <p>Let <var title="">raw strings</var> be a list of strings initially containing just one entry, an empty string.</p>
+   </li>
+
+   <li>
+    <p>Let <var title="">negatives prejudiced</var> be false.</p>
+    <p>Let <var title="">decimals prejudiced</var> be false.</p>
+    <p>Let <var title="">exponents prejudiced</var> be false.</p>
+   </li>
+
+   <li>
+    <p>Let <var title="">buffer</var> be the empty string.</p>
+    <p>Let <var title="">index</var> be zero.</p>
+    <p>Let <var title="">mode</var> be "<span title="sort parser mode: separator">separator</span>".</p>
+
+    <p>When a subsequent step in this algorithm says to <dfn title="sort parser push the
+    buffer">push the buffer</dfn>, the user agent must run the following substeps:</p>
+
+    <ol>
+
+     <li><p>Add an entry to <var title="">raw strings</var> that consists of the value of <var
+     title="">buffer</var>.</p></li>
+
+     <li><p>Add an entry to <var title="">raw strings</var> that is the empty string.</p></li>
+
+     <li><p>Decrement <var title="">index</var> by one.</p></li>
+
+     <li><p>Set <var title="">mode</var> to "<span title="sort parser mode: separator">separator</span>".</p></li>
+
+    </ol>
+
+   </li>
+
+   <li>
+    <p>Let <var title="">checkpoint buffer</var> be the empty string.</p> <!-- actual value doesn't matter; it won't be used -->
+    <p>Let <var title="">checkpoint index</var> be zero.</p> <!-- actual value doesn't matter; it won't be used -->
+
+    <p>When a subsequent step in this algorithm says to <dfn title="sort parser
+    checkpoint">checkpoint</dfn>, the user agent must run the following substeps:</p>
+
+    <ol>
+     <li><p>Set the <var title="">checkpoint buffer</var> to the value of <var title="">buffer</var>.</p>
+     <li><p>Set the <var title="">checkpoint index</var> to the value of <var title="">index</var>.</p>
+    </ol>
+
+    <p>When a subsequent step in this algorithm says to <dfn title="sort parser push the
+    checkpoint">push the checkpoint</dfn>, the user agent must run the following substeps:</p>
+
+    <ol>
+
+     <li><p>Add an entry to <var title="">raw strings</var> that consists of the value of <var
+     title="">checkpoint buffer</var>.</p></li>
+
+     <li><p>Add an entry to <var title="">raw strings</var> that is the empty string.</p></li>
+
+     <li><p>Decrement <var title="">index</var> by one.</p></li>
+
+     <li><p>Set <var title="">mode</var> to "<span title="sort parser mode: separator">separator</span>".</p></li>
+
+    </ol>
+
+   </li>
+
+   <li>
+
+    <p>Run through the following steps repeatedly until the condition in the last step is met.</p>
+
+    <ol>
+
+     <li>
+
+      <p><i>Top of loop</i>: If <var title="">index</var> is equal to or greater than the number of
+      characters in <var title="">value</var>, let <var title="">c</var> be EOF. Otherwise, let <var
+      title="">c</var> be the <var title="">index</var>th character in <var
+      title="">value</var>.</p>
+
+     </li>
+
+     <li>
+
+      <p>Run the appropriate steps from the following list:</p>
+
+      <pre>parse using c, index, buffer, negatives prejudiced, decimals prejudiced, exponents prejudiced
+      posting to: the last entry in <var title="">raw strings</var>
+      buffering to: <var title="">buffer</var>
+      defined above: push the buffer, checkpoint, push the checkpoint
+      prefix xrefs with "sort parser"
+      switch using mode
+        case separator:
+          c=space character:
+            negatives prejudiced := false
+            decimals prejudiced := false
+            exponents prejudiced := false
+            post c
+          c=- unless negatives prejudiced:
+            buffer := c
+            mode := negative
+          c=. unless decimals prejudiced:
+            buffer := c
+            mode := leading-decimal
+          c=0-9:
+            buffer := c
+            mode := integral
+          c=letter:
+            exponents prejudiced := true
+            post c
+          c=eof:
+            nop
+          otherwise:
+            post c
+        case negative:
+          c=-:
+            negatives prejudiced := true
+            post buffer
+            post c
+            mode := separator
+          c=. unless decimals prejudiced:
+            buffer c
+            mode := leading-decimal
+          c=0-9:
+            buffer c
+            mode := integral
+          otherwise:
+            post buffer
+            dec index
+            mode := separator
+        case integral:
+          c=-:
+            negatives prejudiced := true
+            push the buffer
+          c=. unless decimals prejudiced:
+            checkpoint
+            buffer c
+            mode := decimal
+          c=0-9:
+            post c
+          c=e/E unless exponents prejudiced:
+            checkpoint
+            buffer c
+            mode := exponent
+          otherwise:
+            push the buffer
+        case leading-decimal:
+          c=0-9:
+            buffer c
+            mode := decimal
+          otherwise:
+            post buffer
+            dec index
+            mode := separator
+        case decimal:
+          c=-:
+            negatives prejudiced := true
+            push the buffer
+          c=. if numbers are coming:
+            decimals prejudiced := true
+            push the checkpoint
+          c=. if numbers are not coming:
+            push the buffer
+          c=0-9:
+            buffer c
+          c=e/E unless exponents prejudiced:
+            checkpoint
+            buffer c
+            mode := exponent
+          otherwise:
+            push the buffer
+        case exponent:
+          c=- unless negatives prejudiced:
+            buffer c
+            mode := exponent-negative
+          c=.:
+            decimals prejudiced := true
+            push the checkpoint
+          c=0-9:
+            buffer c
+            mode := exponent-number
+          c=e/E:
+            exponents prejudiced := true
+            push the checkpoint
+          otherwise:
+            push the checkpoint
+        case exponent-negative:
+          c=-:
+            negatives prejudiced := true
+            push the checkpoint
+          c=.:
+            decimals prejudiced := true
+            push the checkpoint
+          c=0-9:
+            buffer c
+            mode := exponent-negative-number
+          c=e/E:
+            exponents prejudiced := true
+            push the checkpoint
+          otherwise:
+            push the checkpoint
+        case exponent-number:
+          c=-:
+            negatives prejudiced := true
+            push the buffer
+          c=.:
+            decimals prejudiced := true
+            push the checkpoint
+          c=0-9:
+            buffer c
+          c=e/E:
+            exponents prejudiced := true
+            push the checkpoint
+          otherwise:
+            push the buffer
+        case exponent-negative-number:
+          c=-:
+            negatives prejudiced := true
+            push the checkpoint
+          c=.:
+            decimals prejudiced := true
+            push the checkpoint
+          c=0-9:
+            buffer c
+          c=e/E:
+            exponents prejudiced := true
+            push the checkpoint
+          otherwise:
+            push the buffer
+      </pre>
+
+     </li>
+
+     <li>
+
+      <p>Increment <var title="">index</var> by one.</p>
+
+     </li>
+
+     <li>
+
+      <p>If <var title="">index</var> is greater than the number of characters in <var
+      title="">value</var>, stop repeating these substeps and continue along the overall steps.
+      Otherwise, return to the step labeled <i>top of loop</i>.</p>
+
+     </li>
+
+    </ol>
+
+   </li>
+
+   <li>
+    <p>Let <var title="">numbers</var> be an empty list.</p>
+    <p>Let <var title="">number strings</var> be an empty list.</p>
+    <p>Let <var title="">non-numeric strings</var> be an empty list.</p>
+   </li>
+
+   <li>
+
+    <p>For each even-numbered entry in <var title="">raw strings</var>, in order, starting from the
+    first entry (numbered 0), append an entry to <var title="">non-numeric strings</var> that
+    consists of the result of <span>trimming and collapsing</span> the value of the entry.</p>
+
+   </li>
+
+   <li>
+
+    <p>If <var title="">raw strings</var> has more than one entry, then, for each odd-numbered entry
+    in <var title="">raw strings</var>, in order, starting from the second entry (numbered 1),
+    append an entry to <var title="">number strings</var> that consists of the value of the entry,
+    and append an entry to <var title="">number strings</var> that consists of the result of parsing
+    the value of the entry using the <span>rules for parsing floating-point number
+    values</span>.</p>
+
+   </li>
+
+   <li>
+
+    <p>Return <var title="">numbers</var>, <var title="">number strings</var>, <var
+    title="">non-numeric strings</var>, and <var title="">raw strings</var> respectively.</p>
+
+   </li>
+
+  </ol>
+
+  <p>When the user agent is required by the step above to perform a <dfn>locale-specific string
+  comparison</dfn> of two strings <var title="">a</var> and <var title="">b</var> in the context of
+  an element <var title="">e</var>, the user agent must apply the Unicode Collation Algorithm, using
+  the Default Unicode Collation Element Table as customized for the <span>language</span> of the
+  element <var title="">e</var> in the Common Locale Data Repository, to the strings <var
+  title="">a</var> and <var title="">b</var>, ignoring case. If the result of this algorithm places
+  <var title="">a</var> first, then return "a before b"; if it places <var title="">b</var> first,
+  then return "b before a"; otherwise, if they compare as equal, then return "equal". <a
+  href="#refsUCA">[UCA]</a> <a href="#CLDR">[CLDR]</a></p>
+
+  <p>When the user agent is required by the step above to perform a <dfn>raw string comparison</dfn>
+  of two strings <var title="">a</var> and <var title="">b</var>, the user agent must apply the
+  Unicode Collation Algorithm, using the Default Unicode Collation Element Table without
+  customizations, to the strings <var title="">a</var> and <var title="">b</var>. If the result of
+  this algorithm places <var title="">a</var> first, then return "a before b"; if it places <var
+  title="">b</var> first, then return "b before a"; otherwise, if they compare as equal, then return
+  "equal". <a href="#refsUCA">[UCA]</a></p>
+
+  <p>Where the steps above refer to <dfn>trimming and collapsing</dfn> a string <var
+  title="">value</var>, it means running the following algorithm:</p>
+
+  <ol>
+
+   <li><p><span>Strip leading and trailing whitespace</span> from <var
+   title="">value</var>.</p></li>
+
+   <li><p>Replace any sequence of one or more <span title="space character">space characters</span>
+   in <var title="">value</var> with a single U+0020 SPACE character.</p></li>
+
+  </ol>
+
+  <hr>
+
   <p>When any of the descendants of a <span>sorting-enabled <code>table</code> element</span> change
   in any way (including attributes changing), and when a <code>table</code> element becomes a
   <span>sorting-enabled <code>table</code> element</span>, the <code>table</code> element is said to
@@ -118409,7 +118946,7 @@
    <dd>(Non-normative) <cite><a href="http://www.w3.org/TR/charmod/">Character Model for the World Wide Web 1.0: Fundamentals</a></cite>, M. Dürst, F. Yergeau, R. Ishida, M. Wolf, T. Texin. W3C.</dd>
 
    <dt id="refsCLDR">[CLDR]</dt>
-   <dd>(Non-normative) <cite><a href="http://cldr.unicode.org/">Unicode Common Locale Data Repository</a></cite>. Unicode.</dd>
+   <dd><cite><a href="http://cldr.unicode.org/">Unicode Common Locale Data Repository</a></cite>. Unicode.</dd>
 
    <dt id="refsCOMPUTABLE">[COMPUTABLE]</dt>
    <dd>(Non-normative) <cite><a href="http://www.turingarchive.org/browse.php/B/12">On computable numbers, with an application to the Entscheidungsproblem</a></cite>, A. Turing. In <cite>Proceedings of the London Mathematical Society</cite>, series 2, volume 42, pages 230-265. London Mathematical Society, 1937.</dd>
@@ -118808,6 +119345,9 @@
    <dt id="refsUAAG">[UAAG]</dt>
    <dd>(Non-normative) <cite><a href="http://www.w3.org/TR/UAAG20/">User Agent Accessibility Guidelines (UAAG) 2.0</a></cite>, J. Allan, K. Ford, J. Richards, J. Spellman. W3C.</dd>
 
+   <dt id="refsUCA">[UCA]</dt>
+   <dd><cite><a href="http://www.unicode.org/reports/tr10/">UTR #10: Unicode Collation Algorithm</a></cite>, M. Davis, K. Whistler. Unicode Consortium.</dd>
+
    <dt id="refsUNDO">[UNDO]</dt>
    <dd><cite><a href="http://rniwa.com/editing/undomanager.html">UndoManager and DOM Transaction</a></cite>, R. Niwa.</dd>
 




More information about the Commit-Watchers mailing list