html5/markup/src head.html,1.5,1.6 syntax.html,1.57,1.58

Update of /sources/public/html5/markup/src
In directory hutz:/tmp/cvs-serv15972/src

Modified Files:
	head.html syntax.html 
Log Message:
many refinements to h:tml syntax section for clarity and concision


Index: head.html
===================================================================
RCS file: /sources/public/html5/markup/src/head.html,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- head.html	2 May 2009 09:24:22 -0000	1.5
+++ head.html	20 Jul 2009 14:56:54 -0000	1.6
@@ -2,6 +2,6 @@
   xmlns="http://www.w3.org/1999/xhtml">
   <meta charset="utf-8"/><title>HTML 5: The Markup Language</title>
   <link rel="stylesheet" href="style.css" type="text/css"/>
-  <link rel="stylesheet" href="http://www.w3.org/StyleSheets/TR/W3C-ED" type="text/css"/>
+  <link rel="stylesheet" href="W3C-ED.css" type="text/css"/>
   <script src="js/dfn.js"></script>
 </head>

Index: syntax.html
===================================================================
RCS file: /sources/public/html5/markup/src/syntax.html,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -d -r1.57 -r1.58
--- syntax.html	14 Jul 2009 16:30:16 -0000	1.57
+++ syntax.html	20 Jul 2009 14:56:54 -0000	1.58
@@ -14,10 +14,10 @@
     or
     <a href="#doctype.legacy">doctype.legacy</a>
     patterns defined this specification, or must match the
-    definition of a
-    <code class="defined-elsewhere">doctypedecl</code>
-    (<b class="defined-elsewhere">document type declaration</b>)
-    given in the XML specification
+    <a
+      href="http://www.w3.org/TR/2006/REC-xml-20060816/#NT-doctypedecl"
+      ><code class="defined-elsewhere">doctypedecl</code></a>
+    production defined in the XML specification
     <a href="#refsXML">[XML]</a>.</p>
     <p>The <code>doctype</code> pattern is defined as follows:</p>
     <dl class="pattern-def">
@@ -90,7 +90,8 @@
       declaration must be serialized completely within the first
       512 bytes of the document.</li>
     </ul>
-    <p>If the document does not start with a BOM, and if its
+    <p>If the document does not start with a
+    U+FEFF BYTE ORDER MARK (BOM) character, and if its
     encoding is not explicitly given by a
     <code>Content-Type</code> HTTP header, then the character
     encoding used must be an
@@ -152,17 +153,16 @@
     that it contains.
     Attributes and their values are not considered to be the
     “contents” of an element.</p>
-    <p>An element whose <a href="#content-model">content model</a>
+    <p>A
+    <dfn id="void-element" title="void-element">void element</dfn>
+    is an element whose <a href="#content-model">content model</a>
     does not allow it to have
-    <a href="#contents">contents</a>
-    is said to be a
-    <dfn id="void-element" title="void-element">void element</dfn>.
+    <a href="#contents">contents</a>.
     Void elements can have attributes.</p>
-    <p>The following is a complete list of the void elements in
-    HTML.</p>
-    <dl>
-      <dt><dfn id="void-elements">Void elements</dfn></dt>
-      <dd>
+    <p>The following is a complete list of the
+    <dfn id="void-elements">void elements in HTML</dfn>:</p>
+    <ul>
+      <li>
       <code><a href="#area">area</a></code>,
       <code><a href="#base">base</a></code>,
       <code><a href="#br">br</a></code>,
@@ -176,8 +176,8 @@
       <code><a href="#meta">meta</a></code>,
       <code><a href="#param">param</a></code>,
       <code><a href="#source">source</a></code>
-      </dd>
-    </dl>
+      </li>
+    </ul>
     <p id="elements-html-syntax">The following list describes syntax
       rules for the
       <a href="#html-syntax">the HTML syntax</a>.
@@ -197,68 +197,72 @@
     indicate where they end.</li>
     <li><dfn id="tag-name" title="syntax-tag-name">Tag names</dfn>
     are used within element start tags and end tags to 
-    give the element's name. HTML elements all have names that
-    only use characters in the range U+0030 DIGIT ZERO .. U+0039
-    DIGIT NINE, U+0061 LATIN SMALL LETTER A .. U+007A LATIN
-    SMALL LETTER Z, U+0041 LATIN CAPITAL LETTER A .. U+005A
-    LATIN CAPITAL LETTER Z, and U+002D HYPHEN-MINUS
-    (<code>-</code>). Tag names may be written with any mix of
+    give the element’s name. HTML elements all have names that
+    only use characters in the range
+    <code title="U+0030 DIGIT ZERO–U+0039 DIGIT NINE">0–9</code>,
+    <code title="U+0061 LATIN SMALL LETTER A–U+007A LATIN SMALL LETTER Z">a–z</code>,
+    <code title="U+0041 LATIN CAPITAL LETTER A–U+005A LATIN CAPITAL LETTER Z">A–Z</code>,
+    and the character
+    "<code title="U+002D HYPHEN-MINUS">-</code>".
+    Tag names may be written with any mix of
     lowercase and uppercase letters that, when converted to
-    all-lowercase, matches the element's tag name; tag names are
+    all-lowercase, matches the element’s tag name; tag names are
     case-insensitive.</li>
       <li>
       <dfn id="syntax-start-tags">Start tags</dfn>
       must have the following format:
-
       <ol>
-        <li>The first character of a start tag must be a U+003C
-        LESS-THAN SIGN (<code>&lt;</code>).</li>
+        <li>The first character of a start tag must be a
+        "<code title="U+003C LESS-THAN SIGN">&lt;</code>"
+        character.</li>
         <li>The next
-        few characters of a start tag must be the element's
+        few characters of a start tag must be the element’s
         <a href="#tag-name" title="syntax-tag-name">tag name</a>.</li>
         <li>If there are to be any attributes in the next step,
         there must first be one or more
         <a href="#space"
           title="space character">space characters</a>.</li>
         <li>Then, the start tag may have
-        a number of attributes, the
-        <a href="#attribute"
-          title="syntax-attributes">syntax for which</a> is
-        described below. Attributes may be separated from each
-        other by one or more
-        <a href="#space"
-          title="space character">space characters</a>.</li>
-        <li>After the attributes, the start tag may have one or more
-        <a href="#space"
-          title="space character">space characters</a>. (Some
-        attributes are required to be followed by a space. See the
-        <a href="#attribute"
-          title="syntax-attributes">attributes section</a>
-        below.)</li>
-        <li>Start tags must be closed by a U+003E GREATER-THAN
-        SIGN (<code>&gt;</code>) character.</li>
+        a number of
+        <a href="#attribute">attributes</a>,
+        which may be separated from each other by one or more
+        <a href="#space">space characters</a>.</li>
+        <li>After any
+        <a href="#attribute">attributes</a>,
+        the start tag may have one or more
+        <a href="#space">space characters</a>.
+        (Note that some
+        <a href="#attribute">attributes</a>
+        are <em>required</em> to be followed by a space.</li>
+        <li>A start tag must be closed by a
+        "<code title="U+003E GREATER-THAN SIGN">&gt;</code>"
+        character.
+        <a href="#void-element">Void elements</a>
+        may have a single
+        "<code title="U+002F SOLIDUS">/</code>"
+        character before the closing
+        "<code title="U+003E GREATER-THAN SIGN">&gt;</code>"
+         character.</li>
       </ol>
       </li>
       <li>
       <dfn id="syntax-end-tags">End tags</dfn>
       must have the following format:
       <ol>
-        <li>The first character of an end tag must be a U+003C
-        LESS-THAN SIGN (<code>&lt;</code>).</li>
-        <li>The second character of an end tag must be a U+002F
-        SOLIDUS (<code>/</code>).</li>
+        <li>The first character of an end tag must be a
+        "<code title="U+003C LESS-THAN SIGN">&lt;</code>"
+        character.</li>
+        <li>The second character of an end tag must be a
+        "<code title="U+002F SOLIDUS">/</code>"
+        character</li>
         <li>The next few characters of an end tag must be the
-        element's
+        element’s
         <a href="#tag-name" title="syntax-tag-name">tag name</a>.</li>
         <li>After the tag name, there may be one or more
         <a href="#space" title="space character">space characters</a>.</li>
-      <li>Finally, end tags must be closed by a U+003E
-        GREATER-THAN SIGN (<code>&gt;</code>) character.
-        If an element is a
-        <a href="#void-element">void element</a>,
-        then it may have a single U+002F SOLIDUS
-        (<code>/</code>) character before the closing U+003E
-        GREATER-THAN SIGN (<code>&gt;</code>) character.</li>
+        <li>An end tag must be closed by a
+        "<code title="U+003E GREATER-THAN SIGN">&gt;</code>"
+          character.</li>
       </ol>
       </li>
     <li><a href="#void-element">Void elements</a> only have a
@@ -289,7 +293,10 @@
       <p>
       <dfn id="attribute" title="syntax-attributes">Attributes</dfn>
       for an element are expressed inside the element’s start
-      tag. Attributes have a name and a value.</p>
+      tag. Attributes have a
+      <a href="#attribute-name">name</a>
+      and a
+      <a href="#syntax-attribute-value">value</a>.</p>
       <p>There must never be two or more attributes on the same
       start tag whose names are an
       <a href="#ascii-case-insensitive">ASCII case-insensitive</a>
@@ -307,22 +314,26 @@
           title="syntax-attribute-name">Attribute names</dfn>
       must consist of one or more characters other than the
       <a href="#space">space characters</a>,
-      U+0000 NULL, U+0022 QUOTATION MARK ("), U+0027 APOSTROPHE
-      ('), U+003E GREATER-THAN SIGN (&gt;), U+002F SOLIDUS (/),
-      and U+003D EQUALS SIGN (=) characters, the control
-      characters, and any characters that are not defined by
-      Unicode. Attribute names may be
-      written with any mix of lowercase and uppercase letters that
-      are an
+      U+0000 NULL,
+      "<code title="U+0022 QUOTATION MARK">"</code>",
+      "<code title="U+0027 APOSTROPHE">'</code>",
+      "<code title="U+003E GREATER-THAN SIGN">&gt;</code>",
+      "<code title="U+002F SOLIDUS">/</code>",
+      "<code title="U+003D EQUALS SIGN">=</code>",
+      the control characters,
+      and any characters that are not defined by Unicode.
+      Attribute names may be written with any mix of lowercase and
+      uppercase letters that are an
       <a href="#ascii-case-insensitive">ASCII case-insensitive</a>
       match for the attribute’s name.</li>
       <li><dfn id="xml-compatible">XML-compatible</dfn>
       attribute names are those that match the
-      <a href="http://www.w3.org/TR/REC-xml/#NT-Name"><code>Name</code></a>
-      production defined in
+      <a href="http://www.w3.org/TR/REC-xml/#NT-Name"
+        ><code>Name</code></a> production defined in
       the XML specification <a href="#refsXML">[XML]</a>
-      and that contain no U+003A COLON (:) characters, and whose first
-      three characters are not an
+      and that contain no
+      "<code title="U+003A COLON">:</code>"
+      characters, and whose first three characters are not an
       <a href="#ascii-case-insensitive">ASCII case-insensitive</a>
       match for the string "<code>xml</code>".</li>
       <li>
@@ -351,10 +362,10 @@
             <pre>&lt;input <em>disabled</em>&gt;</pre>
           </div>
           <p>If an attribute using the empty attribute syntax is
-          to be followed by another attribute, then there must
-          be a
+          followed by another attribute, then there must be at
+          least one
           <a href="#space">space character</a>
-          separating the two.</p>
+          between the value and the other attribute.</p>
         </dd>
         <dt><dfn id="syntax-attr-unquoted"
           title="syntax-attr-unquoted"
@@ -364,22 +375,27 @@
           the <a href="#attribute-name">attribute name</a>,
           followed by zero or more
           <a href="#space">space characters</a>,
-          followed by a single U+003D EQUALS SIGN character,
-          followed by zero or more
+          followed by a single
+          "<code title="U+003D EQUALS SIGN">=</code>"
+          character, followed by zero or more
           <a href="#space">space characters</a>,
           followed by the
           <a href="#syntax-attribute-value" >attribute value</a>.</p>
           <p>In addition to the general requirements given above for
           attribute values, an 
           <dfn id="attr-value-unquoted"
-            title="attr-value-unquoted">unquoted attribute value</dfn>
-          must not contain any literal
-          <a href="#space">space characters</a>,
-          any U+0022 QUOTATION MARK (<code>"</code>) characters,
-          U+0027 APOSTROPHE (<code>'</code>) characters, U+003D
-          EQUALS SIGN (<code>=</code>) characters, or U+003E
-          GREATER-THAN SIGN (<code>&gt;</code>) characters, and
-          must not be the empty string.</p>
+            title="attr-value-unquoted">unquoted attribute value</dfn>:</p>
+          <ul>
+            <li>must not contain any literal
+            <a href="#space">space characters</a></li>
+            <li>must not contain any
+            "<code title="U+0022 QUOTATION MARK">"</code>",
+            "<code title="U+0027 APOSTROPHE">'</code>",
+            "<code title="U+003E GREATER-THAN SIGN">&gt;</code>",
+            "<code title="U+003D EQUALS SIGN">=</code>",
+            characters</li>
+            <li>must not be the empty string</li>
+          </ul>
           <div class="example">
             <p>In the following example, the
             <code title="attr-input-value">value</code>
@@ -387,14 +403,19 @@
             syntax:</p>
             <pre>&lt;input <em>value=yes</em>&gt;</pre>
           </div>
-          <p>If an attribute using the unquoted attribute syntax
-            is to be followed by another attribute or by one of
-            the optional U+002F SOLIDUS (<code>/</code>)
-            characters allowed in step 6 of the
-            <span title="syntax-start-tag">start tag</span> syntax
-            above, then there must be a
-            <a href="#space">space character</a> separating the
-            two.</p>
+          <p>If the value an attribute using the unquoted
+            attribute syntax is followed by another attribute,
+            then there must be at least one
+            <a href="#space">space character</a>
+            between the value and the other attribute.</p>
+          <p>If the value of an attribute using the unquoted
+            attribute syntax is followed by a
+            "<code title="U+002F SOLIDUS">/</code>"
+            character, then there must be at least one
+            <a href="#space">space character</a>
+            after the value and before the
+            "<code title="U+002F SOLIDUS">/</code>"
+            character.</p>
         </dd>
         <dt><dfn id="syntax-attr-single-quoted">Single-quoted attribute-value syntax</dfn></dt>
         <dd>
@@ -403,21 +424,25 @@
           <a href="#attribute-name">attribute name</a>,
           followed by zero or more
           <a href="#space">space characters</a>,
-          followed by a single U+003D EQUALS SIGN character,
-          followed by zero or more
+          followed by a single
+          "<code title="U+003D EQUALS SIGN">=</code>"
+          character, followed by zero or more
           <a href="#space">space characters</a>,
-          followed by a single U+0027 APOSTROPHE (<code>'</code>)
+          followed by a single
+          "<code title="U+0027 APOSTROPHE">'</code>"
           character, followed by the
           <a href="#syntax-attribute-value">attribute value</a>,
-          and finally followed by a matching single U+0027
-          APOSTROPHE (<code>'</code>) character.</p>
+          followed by a single
+          "<code title="U+0027 APOSTROPHE">'</code>"
+          character.</p>
           <p>In addition to the general requirements given above
           for attribute values, a
           <dfn id="attr-value-single-quoted"
             title="attr-value-single-quoted"
             >single-quoted attribute value</dfn>
-          must not contain any literal U+0027
-          APOSTROPHE (<code>'</code>) characters.</p>
+          must not contain any literal
+          "<code title="U+0027 APOSTROPHE">'</code>"
+          characters.</p>
           <div class="example">
             <p>In the following example, the
             <code title="attr-input-type">type</code> attribute
@@ -425,10 +450,11 @@
             syntax:</p>
             <pre>&lt;input <em>type='checkbox'</em>&gt;</pre>
           </div>
-          <p>If an attribute using the single-quoted attribute
-            syntax is to be followed by another attribute, then
-            there must be a <a href="#space">space character</a>
-            separating the two.</p>
+          <p>If the value of an attribute using the single-quoted
+          attribute syntax is followed by another attribute, then
+          there must be at least one
+          <a href="#space">space character</a>
+          after the value and before the other attribute.</p>
         </dd>
         <dt><dfn id="syntax-attr-double-quoted">Double-quoted attribute-value syntax</dfn></dt>
         <dd>
@@ -437,32 +463,36 @@
           <a href="#attribute-name">attribute name</a>,
           followed by zero or more
           <a href="#space">space characters</a>,
-          followed by a single U+003D EQUALS SIGN character,
-          followed by zero or more
+          followed by a single
+          "<code title="U+003D EQUALS SIGN character">=</code>"
+          character, followed by zero or more
           <a href="#space">space characters</a>,
-          followed by a single U+0022 QUOTATION MARK
-          (<code>"</code>) character, followed by the
+          followed by a single
+          "<code title="U+0022 QUOTATION MARK">"</code>" character,
+          followed by the
           <a href="#syntax-attribute-value">attribute value</a>,
-          and finally followed by a matching double U+0022 QUOTATION
-          MARK (<code>"</code>) character.</p>
+          and followed by a
+          "<code title="double U+0022 QUOTATION MARK">"</code>"
+          character.</p>
           <p>In addition to the general requirements given above for
-          attribute values, an
+          attribute values, a
           <dfn id="attr-value-double-quoted"
             title="attr-value-double-quoted"
             >double-quoted attribute value</dfn>
-          must not
-          contain any literal U+0022 QUOTATION MARK (<code>"</code>)
+          must not contain any literal
+          "<code title="U+0022 QUOTATION MARK">"</code>"
           characters.</p>
           <div class="example">
             <p>In the following example, the
-            <code title="attr-input-name">name</code> attribute is
+            <code>title</code> attribute is
             given with the double-quoted attribute value syntax:</p>
-            <pre>&lt;input <em>name="be evil"</em>&gt;</pre>
+            <pre>&lt;code title="U+003C LESS-THAN SIGN">&amp;lt;&lt;/code></pre>
           </div>
-          <p>If an attribute using the double-quoted attribute
-            syntax is to be followed by another attribute, then
-            there must be a <a href="#space">space character</a>
-            separating the two.</p>
+          <p>If the value of attribute using the double-quoted
+          attribute syntax is followed by another attribute, then
+          there must be at least one
+          <a href="#space">space character</a>
+          after the value and before the other attribute.</p>
         </dd>
       </dl>
     </section>
@@ -483,10 +513,12 @@
       <li>must not contain control characters other than
         <a href="#space">space characters</a></li>
     </ul>
-    <p class="note">There is a special type of
+    <p class="note">There are two special types of
     <a href="#syntax-text">text</a>,
-    known as an
-    <a href="#syntax-escape">escaping text span</a>,
+    known as
+    <a href="#syntax-escape-start">escaping text span starts</a>
+    and
+    <a href="#syntax-escape-end">escaping text span ends</a>,
     that can occur within certain elements.</p>
     <p><dfn
       id="character-data"
@@ -550,17 +582,22 @@
           <li>must not contain any
           <a href="#syntax-ambiguous-ampersand">ambiguous ampersands</a></li>
           <li>must not contain any occurrences of the string
-          "<code>&lt;/</code>" (U+003C LESS-THAN SIGN,
-          U+002F SOLIDUS) followed by characters that
+          "<code title="U+003C LESS-THAN SIGN, U+002F SOLIDUS">&lt;/</code>"
+          followed by characters that
           case-insensitively match the tag name of the
           element containing the replaceable character data
-          (for example, "<code>&lt;/title</code>" or
+          (for example,
+          "<code>&lt;/title</code>" or
           "<code>&lt;/textarea</code>"),
-          followed by one of U+0009 CHARACTER TABULATION,
-          U+000A LINE FEED (LF), U+000C FORM FEED (FF),
-          U+0020 SPACE, U+003E GREATER-THAN SIGN (&gt;), or
-          U+002F SOLIDUS (/), unless that string is part of
-          an
+          followed by one of
+          U+0009 CHARACTER TABULATION,
+          U+000A LINE FEED (LF),
+          U+000C FORM FEED (FF),
+          U+0020 SPACE,
+          "<code title="U+003E GREATER-THAN SIGN">&gt;</code>",
+          or
+          "<code title="U+002F SOLIDUS">/</code>",
+          unless that string is part of an
           <a href="#syntax-escape">escaping text span</a>.</li>
         </ul>
         <p class="note">Replaceable character data,
@@ -600,17 +637,21 @@
         <ul>
           <li>must not contain <a href="#syntax-charref">character references</a></li>
           <li>must not contain any occurrences of the string
-          "<code>&lt;/</code>" (U+003C LESS-THAN SIGN,
-          U+002F SOLIDUS) followed by characters that
-          case-insensitively match the tag name of the
-          element containing the replaceable character data
-          (for example, "<code>&lt;/script</code>" or
+          "<code title="U+003C LESS-THAN SIGN, U+002F SOLIDUS">&lt;/</code>",
+          followed by characters that case-insensitively match the
+          tag name of the element containing the replaceable
+          character data (for example,
+          "<code>&lt;/script</code>" or
           "<code>&lt;/style</code>"),
-          followed by one of U+0009 CHARACTER TABULATION,
-          U+000A LINE FEED (LF), U+000C FORM FEED (FF),
-          U+0020 SPACE, U+003E GREATER-THAN SIGN (&gt;), or
-          U+002F SOLIDUS (/), unless that string is part of
-          an
+          followed by one of
+          U+0009 CHARACTER TABULATION,
+          U+000A LINE FEED (LF),
+          U+000C FORM FEED (FF),
+          U+0020 SPACE,
+          "<code title="U+003E GREATER-THAN SIGN">&gt;</code>",
+          or
+          "<code title="U+002F SOLIDUS">/</code>",
+          unless that string is part of an
           <a href="#syntax-escape">escaping text span</a>.</li>
         </ul>
         <p class="note">Non-replaceable character data,
@@ -629,65 +670,128 @@
   <section id="character-references">
     <h2>Character references</h2>
     <p><dfn id="syntax-charref">Character references</dfn> are a form
-    of markup for representing individual characters.
-    Character references must start with a U+0026 AMPERSAND
-    (<code>&amp;</code>). Following that, there are three possible
-    kinds of character references:</p>
+    of markup for representing single individual characters. There
+    are three types of character references:</p>
+    <ul>
+      <li><a href="#named-charref">named character references</a></li>
+      <li><a href="#dec-charref">decimal numeric character references</a></li>
+      <li><a href="#hex-charref">hexadecimal numeric character references</a></li>
+    </ul>
     <dl>
       <dt><dfn id="named-charref">Named character reference</dfn></dt>
-      <dd>The ampersand must be followed by one of the entity
-        names defined in <cite>XML Entity definitions
-          for Characters</cite> <a
-          href="#refsEntities">[Entities]</a>, using the same
-        case, terminated by a U+003B SEMICOLON (<code
-          title="">;</code>) character.</dd>
+      <dd><p>A named character reference is an
+        "<code title="U+0026 AMPERSAND">&amp;</code>"
+        character followed by one of the entity names defined in
+        <cite>XML Entity definitions for Characters</cite>
+        <a href="#refsEntities">[Entities]</a>,
+        using the same case, followed by a
+        "<code title="U+003B SEMICOLON">;</code>"
+        character.</p>
+        <div class="example">
+          <p>The following is an example of a named character
+          reference for the character
+          "<code title="U+2020 DAGGER">&#x2020;</code>"
+          (U+2020 DAGGER).</p>
+          <pre>&amp;dagger;</pre>
+        </div>
+      </dd>
       <dt><dfn id="dec-charref">Decimal numeric character reference</dfn></dt>
-      <dd>The ampersand must be followed by a U+0023 NUMBER SIGN
-      (<code>#</code>) character, followed by one or more digits in
-      the range U+0030 DIGIT ZERO .. U+0039 DIGIT NINE, representing
-      a base-ten integer that itself is a Unicode code point that is
-      not U+0000, U+000D, in the range U+0080 .. U+009F, or in the
-      range 0xD800 .. 0xDFFF (surrogates).  The digits must then be
-      followed by a U+003B SEMICOLON character
-      (<code title="">;</code>).</dd>
+      <dd><p>A decimal numerical character reference is an
+        "<code title="U+0026 AMPERSAND">&amp;</code>"
+        character, followed by a 
+        "<code title="U+0023 NUMBER SIGN">#</code>"
+        character, followed by one or more digits in the range
+        <code title="U+0030 DIGIT ZERO–U+0039 DIGIT NINE">0–9</code>,
+        representing a base-ten integer that itself is a Unicode
+        code point that is not
+        U+0000,
+        U+000D,
+        in the range U+0080–U+009F,
+        or in the range 0xD8000–0xDFFF (surrogates).
+        The digits must then be followed by a
+        "<code title="U+003B SEMICOLON">;</code>" character.</p>
+        <div class="example">
+          <p>The following is an example of a decimal numeric
+          character reference for the character
+          "<code title="U+2020 DAGGER">&#x2020;</code>"
+          (U+2020 DAGGER).</p>
+          <pre>&amp;#8224;</pre>
+        </div>
+      </dd>
       <dt><dfn id="hex-charref">Hexadecimal numeric character reference</dfn></dt>
-      <dd>The ampersand must be followed by a U+0023 NUMBER SIGN
-      (<code>#</code>) character, which must be followed by
-      either a U+0078 LATIN SMALL LETTER X or a U+0058 LATIN
-      CAPITAL LETTER X character, which must then be followed by
-      one or more digits in the range U+0030 DIGIT ZERO ..
-      U+0039 DIGIT NINE, U+0061 LATIN SMALL LETTER A .. U+0066
-      LATIN SMALL LETTER F, and U+0041 LATIN CAPITAL LETTER A ..
-      U+0046 LATIN CAPITAL LETTER F, representing a base-sixteen
-      integer that itself is a Unicode code point that is not
-      U+0000, U+000D, in the range U+0080 .. U+009F, or in the
-      range 0xD800 .. 0xDFFF (surrogates). The digits must then
-      be followed by a U+003B SEMICOLON character
-      (<code title="">;</code>).</dd>
+      <dd><p>A hexadecimal numeric character reference is an
+        "<code title="U+0026 AMPERSAND">&amp;</code>"
+        character, followed by a 
+        "<code title="U+0023 NUMBER SIGN">#</code>"
+      character, followed by either a
+      "<code title="U+0078 LATIN SMALL LETTER X">x</code>"
+      character
+      or a
+      "<code title="U+0058 LATIN CAPITAL LETTER X">X</code>"
+      character, followed by
+      one or more digits in the range
+      <code title="U+0030 DIGIT ZERO–U+0039 DIGIT NINE">0–9</code>,
+      <code title="U+0061 LATIN SMALL LETTER A–U+0066 LATIN SMALL LETTER F">a–f</code>,
+      and
+      <code title="U+0041 LATIN CAPITAL LETTER A–U+0046 LATIN CAPITAL LETTER F">A–F</code>,
+      representing a base-sixteen integer that itself is a Unicode
+      code point that is not
+      U+0000,
+      U+000D,
+      in the range U+0080–U+009F,
+      or in the range 0xD800–0xDFFF (surrogates).
+      The digits must then be followed by a 
+      "<code title="U+003B SEMICOLON">;</code>"
+      character.</p>
+        <div class="example">
+          <p>The following is an example of a hexadecimal numeric
+          character reference for the character
+          "<code title="U+2020 DAGGER">&#x2020;</code>"
+          (U+2020 DAGGER).</p>
+          <pre>&amp;#x2020;</pre>
+        </div>
+      </dd>
     </dl>
+    <p class="note">
+    <a href="#syntax-charref">Character references</a>
+    are not themselves
+    <a href="#syntax-text">text</a>,
+    and no part of a character reference is
+    <a href="#syntax-text">text</a>.</p>
     <p>An
     <dfn id="syntax-ambiguous-ampersand">ambiguous ampersand</dfn>
-    is a U+0026 AMPERSAND (<code>&amp;</code>) character that is
-    followed by some
-    <a href="#syntax-text" title="syntax-text">text</a> other than a
-    <a href="#space">space character</a>, a U+003C LESS-THAN
-    SIGN character ('&lt;'), or another U+0026 AMPERSAND
-    (<code>&amp;</code>) character.</p>
+    is an
+    "<code title="U+0026 AMPERSAND">&amp;</code>"
+    character that is followed by some
+    <a href="#syntax-text" title="syntax-text">text</a>
+    other than a
+    <a href="#space">space character</a>,
+    a
+    "<code title="U+003C LESS-THAN SIGN">&lt;</code>",
+    character, or another
+    "<code title="U+0026 AMPERSAND">&amp;</code>"
+    character.</p>
   </section>
   <section id="comments">
     <h2>Comments</h2>
     <p>
     <dfn id="syntax-comments" title="syntax-comments">Comments</dfn>
-    consist of the following three parts, in exactly the following
+    consist of the following parts, in exactly the following
     order:</p>
     <ol>
-      <li>the string
+      <li>the
+      <dfn
+        id="comment-start-delimiter"
+        title="comment-start-delimiter">comment start delimiter</dfn>
       "<code
         title="U+003C LESS-THAN SIGN, U+0021 EXCLAMATION MARK, U+002D HYPHEN-MINUS, U+002D HYPHEN-MINUS"
         >&lt;!--</code>"
       </li>
       <li><a href="#syntax-text">text</a></li>
-      <li>the string
+      <li>the
+      <dfn
+        id="comment-end-delimiter"
+        title="comment-end-delimiter">comment end delimiter</dfn>
       "<code
         title="U+002D HYPHEN-MINUS, U+002D HYPHEN-MINUS, U+003E GREATER-THAN SIGN"
         >--&gt;</code>"
@@ -742,23 +846,42 @@
       <a href="#syntax-charref">character references</a>.</p>
     <p>An
       <dfn id="syntax-escape-start">escaping text span start</dfn>
-      is a part of <a href="#syntax-text" title="syntax-text">text</a> that
-      consists of the four character sequence
-      "<code title="">&lt;!--</code>" (U+003C LESS-THAN SIGN,
-      U+0021 EXCLAMATION MARK, U+002D HYPHEN-MINUS, U+002D
-      HYPHEN-MINUS).</p>
+      is the
+      <a href="#syntax-text" title="syntax-text">text</a>
+      string
+      "<code title="U+003C LESS-THAN SIGN, U+0021 EXCLAMATION MARK, U+002D HYPHEN-MINUS, U+002D HYPHEN-MINUS">&lt;!--</code>".</p>
      <p>An
      <dfn id="syntax-escape-end">escaping text span end</dfn>
-     is a part of
-     <a href="#syntax-text" title="syntax-text">text</a> that
-     consists of the three character sequence
-     "<code title="">--&gt;</code>" (U+002D HYPHEN-MINUS,
-     U+002D HYPHEN-MINUS, U+003E GREATER-THAN SIGN) whose
-     U+003E GREATER-THAN SIGN (&gt;).</p>
-     <p>An <a href="#syntax-escape-start">escaping text span
-       start</a> may share its U+002D HYPHEN-MINUS characters with its
-     corresponding <a href="#syntax-escape-end">escaping text
-       span end</a>.</p>
+     is the
+     <a href="#syntax-text" title="syntax-text">text</a>
+     string
+     "<code title="U+002D HYPHEN-MINUS, U+002D HYPHEN-MINUS, U+003E GREATER-THAN SIGN">--&gt;</code>".</p>
+     <div class="note">
+       <ul>
+         <li>An
+         <a href="#syntax-escape">escaping text span</a>
+         is not a
+         <a href="#syntax-comments">comment</a>.</li>
+         <li>An
+         <a href="#syntax-escape-start">escaping text span start</a>
+         is
+         <a href="#syntax-text">text</a>;
+         it is not a
+         <a href="#comment-start-delimiter">comment start delimiter</a>.</li>
+         <li>An
+         <a href="#syntax-escape-end">escaping text span end</a>
+         is
+         <a href="#syntax-text">text</a>;
+         it is not a
+         <a href="#comment-end-delimiter">comment end delimiter</a>.</li>
+       </ul>
+     </div>
+     <p>An
+     <a href="#syntax-escape-start">escaping text span start</a>
+     may share its
+     "<code title="U+002D HYPHEN-MINUS">-</code>"
+     characters with its corresponding
+     <a href="#syntax-escape-end">escaping text span end</a>.</p>
     <p>The text in <a href="#style">style</a>, <a
       href="#script">script</a>, <a href="#title">title</a>, and
     <a href="#textarea">textarea</a>
@@ -766,6 +889,17 @@
      <a href="#syntax-escape-start">escaping text span start</a>
      that is not followed by an
      <a href="#syntax-escape-end">escaping text span end</a>.</p>
+    <div class="example">
+    <p>The following is an example of an
+    <a href="#syntax-escape">escaping text span</a>
+    within a
+    <a href="#style" class="element">style</a> element.</p>
+    <pre>&lt;style>
+&lt;!--
+dfn { font-weight: bold; color: brown; }
+-->
+&lt;/style></pre>
+    </div>
  </section>
  <section id="svg-mathml">
    <h2>SVG and MathML elements in HTML documents</h2>
@@ -784,14 +918,16 @@
    are defined in the XML specification
    <a href="#refsXML">[XML]</a>.
    The following list describes additional syntax rules
-   that specifically apply only to SVG and MathML elements in
+   that specifically apply to SVG and MathML elements in
    <a href="#syntax-document-html">documents in the HTML syntax</a>.
    </p>
    <ul>
      <li>SVG and MathML elements whose start tags
-     have a single U+002F SOLIDUS (<code>/</code>) character
-     before the closing U+003E GREATER-THAN SIGN
-     (<code>></code>) character are said to be
+     have a single
+     "<code title="U+002F SOLIDUS">/</code>"
+     character before the closing
+     "<code title="U+003E GREATER-THAN SIGN">></code>"
+     character are said to be
      <dfn id="syntax-self-closing">marked as self-closing</dfn>.</li>
      <li>SVG and MathML elements must either have a
      <a href="#syntax-start-tags">start tag</a>
@@ -803,19 +939,19 @@
      <li>SVG and MathML elements whose start tag is
      <a href="#syntax-self-closing">marked as self-closing</a>,
      can’t have any contents.</li>
-     <li>The contents of an SVG or MathML element whose start tag
-     is <em>not</em>
+     <li>The contents of an SVG or MathML element whose start tag is not
      <a href="#syntax-self-closing">marked as self-closing</a>
      are any
      <a href="#syntax-elements">elements</a>,
+     <a href="#character-data">character data</a>,
      <a href="#syntax-comments">comments</a>,
-     <a href="#syntax-cdata-sections">CDATA sections</a>,
-     <a href="#syntax-charref">character references</a>,
-     or
-     <a href="#syntax-text">text</a> that it contains;
-     but the text must not contain the character U+003C
-     LESS-THAN SIGN (<code>&lt;</code>) or an
-     <a href="#syntax-ambiguous-ampersand">ambiguous ampersand</a>.</li>
+     and
+     <a href="#syntax-cdata-sections">CDATA sections</a>
+     that it contains, with the restriction
+     that any 
+     <a href="#character-data">character data</a>
+     it contains must be
+     <a href="#normal-character-data">normal character data</a>.</li>
    </ul>
  </section>
  <section id="cdata-sections">
@@ -823,26 +959,30 @@
    <p>
    <dfn
      id="syntax-cdata-sections"
-     title="syntax-cdata-sections">CDATA sections in MathML and SVG contents</dfn>
+     title="syntax-cdata-sections">CDATA sections in SVG and MathML contents</dfn>
    in 
    <a href="#syntax-document-html">documents in the HTML syntax</a>
-   must start with the character sequence U+003C LESS-THAN
-   SIGN, U+0021 EXCLAMATION MARK, U+005B LEFT SQUARE BRACKET,
-   U+0043 LATIN CAPITAL LETTER C, U+0044 LATIN CAPITAL LETTER
-   D, U+0041 LATIN CAPITAL LETTER A, U+0054 LATIN CAPITAL
-   LETTER T, U+0041 LATIN CAPITAL LETTER A, U+005B LEFT SQUARE
-   BRACKET (<code title="">&lt;![CDATA[</code>). Following that
-   sequence, the CDATA section may have
-   <a href="#syntax-text" title="syntax-text">text</a>, with the
-   additional restriction that the text must not contain the
-   three character sequence U+005D RIGHT SQUARE BRACKET, U+005D
-   RIGHT SQUARE BRACKET, U+003E GREATER-THAN SIGN
-   (<code title="">]]&gt;</code>). Finally, the CDATA section must
-   be ended by the three character sequence U+005D RIGHT SQUARE
-   BRACKET, U+005D RIGHT SQUARE BRACKET, U+003E GREATER-THAN
-   SIGN (<code title="">]]&gt;</code>).</p>
+   consist of the following parts, in exactly the following
+   order:</p>
+   <ol>
+     <li>the
+     <dfn
+       id="cdata-start-delimiter"
+       title="cdata-start-delimiter">CDATA start delimiter</dfn>
+     "<code title="U+003C LESS-THAN SIGN, U+0021 EXCLAMATION MARK, U+005B LEFT SQUARE BRACKET, U+0043 LATIN CAPITAL LETTER C, U+0044 LATIN CAPITAL LETTER D, U+0041 LATIN CAPITAL LETTER A, U+0054 LATIN CAPITAL LETTER T, U+0041 LATIN CAPITAL LETTER A, U+005B LEFT SQUARE BRACKET"
+       >&lt;![CDATA[</code>"</li>
+     <li><a href="#syntax-text" title="syntax-text">text</a>, with the
+     additional restriction that the text must not contain the
+     string
+     "<code title="U+005D RIGHT SQUARE BRACKET, U+005D RIGHT SQUARE BRACKET, U+003E GREATER-THAN SIGN">]]&gt;</code>“</li>
+     <li>the 
+     <dfn
+       id="cdata-end-delimiter"
+       title="cdata-end-delimiter">CDATA end delimiter</dfn>
+     "<code title="U+005D RIGHT SQUARE BRACKET, U+005D RIGHT SQUARE BRACKET, U+003E GREATER-THAN SIGN">]]&gt;</code>"</li>
+   </ol>
    <p>CDATA sections are allowed only in the contents of elements
-   from the MathML namespace.</p>
+   from the SVG and MathML namespaces.</p>
    <div class="example">
      <p>The following shows an example of a CDATA section.</p>
      <pre>

Received on Monday, 20 July 2009 14:57:06 UTC