[html5] r953 - /

whatwg at whatwg.org whatwg at whatwg.org
Thu Jun 21 23:31:59 PDT 2007


Author: ianh
Date: 2007-06-21 23:29:25 -0700 (Thu, 21 Jun 2007)
New Revision: 953

Modified:
   index
   source
Log:
[a] (1) Write the restrictions on the contents for CDATA and RCDATA sections. Again. This time hopefully it'll stick.

Modified: index
===================================================================
--- index	2007-06-22 05:51:14 UTC (rev 952)
+++ index	2007-06-22 06:29:25 UTC (rev 953)
@@ -1443,8 +1443,12 @@
          <li><a href="#optional"><span class=secno>8.1.2.4. </span>Optional
           tags</a>
 
-         <li><a href="#restrictions"><span class=secno>8.1.2.5.
+         <li><a href="#element-restrictions"><span class=secno>8.1.2.5.
           </span>Restrictions on content models</a>
+
+         <li><a href="#cdata-rcdata-restrictions"><span class=secno>8.1.2.6.
+          </span>Restrictions on the contents of CDATA and RCDATA
+          elements</a>
         </ul>
 
        <li><a href="#text"><span class=secno>8.1.3. </span>Text</a>
@@ -32273,51 +32277,28 @@
   <p>Void elements can't have any contents (since there's no end tag, no
    content can be put between the start tag and the end tag.)
 
-  <p>CDATA elements can have <a href="#text1" title=syntax-text>text</a>.
+  <p>CDATA elements can have <a href="#text1" title=syntax-text>text</a>,
+   though it has <a href="#cdata-rcdata-restrictions">restrictions</a>
+   described below.
 
   <p>RCDATA elements can have <a href="#text1" title=syntax-text>text</a> and
    <a href="#character0" title=syntax-entities>character entity
    references</a>, but the text must not contain an <a href="#ambiguous"
-   title=syntax-ambiguous-ampersand>ambiguous ampersand</a>.
+   title=syntax-ambiguous-ampersand>ambiguous ampersand</a>. There are also
+   <a href="#cdata-rcdata-restrictions">further restrictions</a> described
+   below.
 
-  <p>The <a href="#text1" title=syntax-text>text</a> in CDATA and RCDATA
-   elements have two further restrictions:
-
-  <ol>
-   <li>
-    <p>The last occurrence of the four character sequence "<code
-     title=""><!--</code>" (U+003C LESS-THAN SIGN, U+0021 EXCLAMATION
-     MARK, U+002D HYPHEN-MINUS, U+002D HYPHEN-MINUS) in the text, if any,
-     must have a corresponding three-character sequence "<code
-     title="">--></code>" (U+002D HYPHEN-MINUS, U+002D HYPHEN-MINUS,
-     U+003E GREATER-THAN SIGN) whose U+003E GREATER-THAN SIGN (>)
-     character occurs later in the text than the U+003C LESS-THAN SIGN (<)
-     character of the "<code title=""><!--</code>" sequence.</p>
-
-    <p class=note>The hyphens from the "<code title=""><!--</code>" part
-     can overlap those in the "<code title="">--></code>" part, as in
-     "<code title="">&lt!--></code>".</p>
-
-   <li>
-    <p>There must not be any occurences of the string "<code
-     title=""></</code>" (U+003C LESS-THAN SIGN, U+002F SOLIDUS) followed
-     by characters that case-insensitively<!--ASCII--> match the tag name of
-     the element followed by one of U+0009 CHARACTER TABULATION, U+000A LINE
-     FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), U+0020 SPACE,
-     U+003E GREATER-THAN SIGN (>), or U+002F SOLIDUS (/).</p>
-  </ol>
-
   <p>Normal elements can have <a href="#text1" title=syntax-text>text</a>, <a
    href="#character0" title=syntax-entities>character entity references</a>,
    other <a href="#elements2" title=syntax-elements>elements</a>, and <a
    href="#comments0" title=syntax-comments>comments</a>, but the text must
    not contain the character U+003C LESS-THAN SIGN (<code><</code>) or an
    <a href="#ambiguous" title=syntax-ambiguous-ampersand>ambiguous
-   ampersand</a>. Some normal elements also have <a href="#have-extra"
-   title=syntax-element-restrictions>yet more restrictions</a> on what
-   content they are allowed to hold, beyond the restrictions imposed by the
-   content model and those described in this paragraph. Those restrictions
-   are described below.
+   ampersand</a>. Some normal elements also have <a
+   href="#element-restrictions">yet more restrictions</a> on what content
+   they are allowed to hold, beyond the restrictions imposed by the content
+   model and those described in this paragraph. Those restrictions are
+   described below.
 
   <p>Tags contain a <dfn id=tag-name title=syntax-tag-name>tag name</dfn>,
    giving the element's name. HTML elements all have names that only use
@@ -32680,11 +32661,10 @@
   <p><strong>However</strong>, a <span title=syntax-start-tag>start
    tag</span> must never be omitted if it has any attributes.
 
-  <h5 id=restrictions><span class=secno>8.1.2.5. </span>Restrictions on
-   content models</h5>
+  <h5 id=element-restrictions><span class=secno>8.1.2.5. </span>Restrictions
+   on content models</h5>
 
-  <p>For historical reasons, certain elements <dfn id=have-extra
-   title=syntax-element-restrictions>have extra restrictions</dfn> beyond
+  <p>For historical reasons, certain elements have extra restrictions beyond
    even the restrictions given by their content model.
 
   <p>A <code><a href="#p">p</a></code> element must not contain <code><a
@@ -32730,6 +32710,48 @@
    <pre><pre><br>Hello</pre></pre>
   </div>
 
+  <h5 id=cdata-rcdata-restrictions><span class=secno>8.1.2.6.
+   </span>Restrictions on the contents of CDATA and RCDATA elements</h5>
+
+  <p>The text in CDATA and RCDATA elements must not contain any occurences of
+   the string "<code title=""></</code>" (U+003C LESS-THAN SIGN, U+002F
+   SOLIDUS) followed by characters that case-insensitively<!--ASCII--> match
+   the tag name of the element followed by one of U+0009 CHARACTER
+   TABULATION, U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM
+   FEED (FF), U+0020 SPACE, U+003E GREATER-THAN SIGN (>), or U+002F SOLIDUS
+   (/), unless that string is part of an <a href="#escaped"
+   title=syntax-escape>escaped text span</a>.
+
+  <p>An <dfn id=escaped title=syntax-escape>escaped text span</dfn> is a span
+   of <a href="#text1" title=syntax-text>text</a> (in CDATA and RCDATA
+   elements) and <a href="#character0" title=syntax-entities>character entity
+   references</a> (in RCDATA elements) that starts with an <a
+   href="#escaping" title=syntax-escape-start>escaping text span start</a>
+   that is not itself in an <a href="#escaped" title=syntax-escape>escaped
+   text span</a>, and ends at the next <a href="#escaping0"
+   title=syntax-escape-end>escaping text span end</a>.
+
+  <p>An <dfn id=escaping title=syntax-escape-start>escaping text span start
+   is a part of <span title=syntax-text>text</span> that consists of the four
+   character sequence "<code title=""><!--</code>" (U+003C LESS-THAN SIGN,
+   U+0021 EXCLAMATION MARK, U+002D HYPHEN-MINUS, U+002D HYPHEN-MINUS).</dfn>
+
+  <p>An <dfn id=escaping0 title=syntax-escape-end>escaping text span end is a
+   part of <span title=syntax-text>text</span> that consists of the three
+   character sequence "<code title="">--></code>" (U+002D HYPHEN-MINUS,
+   U+002D HYPHEN-MINUS, U+003E GREATER-THAN SIGN) whose U+003E GREATER-THAN
+   SIGN (>).</dfn>
+
+  <p>An <a href="#escaping" title=syntax-escape-start>escaping text span
+   start</a> may share its U+002D HYPHEN-MINUS characters with its
+   corresponding <a href="#escaping0" title=syntax-escape-end>escaping text
+   span end</a>.
+
+  <p>The text in CDATA and RCDATA elements must not have an <a
+   href="#escaping" title=syntax-escape-start>escaping comment start</a> that
+   is not followed by an <a href="#escaping0"
+   title=syntax-escape-end>escaping comment end</a>.
+
   <h4 id=text><span class=secno>8.1.3. </span>Text</h4>
 
   <p><dfn id=text1 title=syntax-text>Text</dfn> is allowed inside elements,

Modified: source
===================================================================
--- source	2007-06-22 05:51:14 UTC (rev 952)
+++ source	2007-06-22 06:29:25 UTC (rev 953)
@@ -29734,63 +29734,28 @@
   tag, no content can be put between the start tag and the end
   tag.)</p>
 
-  <p>CDATA elements can have <span
-  title="syntax-text">text</span>.</p>
+  <p>CDATA elements can have <span title="syntax-text">text</span>,
+  though it has <a href="#cdata-rcdata-restrictions">restrictions</a>
+  described below.</p>
 
   <p>RCDATA elements can have <span title="syntax-text">text</span>
   and <span title="syntax-entities">character entity
   references</span>, but the text must not contain an <span
-  title="syntax-ambiguous-ampersand">ambiguous ampersand</span>.</p>
+  title="syntax-ambiguous-ampersand">ambiguous ampersand</span>.
+  There are also <a href="#cdata-rcdata-restrictions">further
+  restrictions</a> described below.</p>
 
-  <p>The <span title="syntax-text">text</span> in CDATA and RCDATA
-  elements have two further restrictions:</p>
-
-  <ol>
-
-   <li>
-
-    <p>The last occurrence of the four character sequence "<code
-    title=""><!--</code>" (U+003C LESS-THAN SIGN, U+0021
-    EXCLAMATION MARK, U+002D HYPHEN-MINUS, U+002D HYPHEN-MINUS) in the
-    text, if any, must have a corresponding three-character sequence
-    "<code title="">--></code>" (U+002D HYPHEN-MINUS, U+002D
-    HYPHEN-MINUS, U+003E GREATER-THAN SIGN) whose U+003E GREATER-THAN
-    SIGN (>) character occurs later in the text than the U+003C
-    LESS-THAN SIGN (<) character of the "<code
-    title=""><!--</code>" sequence.</p>
-
-    <p class="note">The hyphens from the "<code
-    title=""><!--</code>" part can overlap those in the "<code
-    title="">--></code>" part, as in "<code
-    title="">&lt!--></code>".</p>
-
-   </li>
-
-   <li>
-
-    <p>There must not be any occurences of the string "<code
-    title=""></</code>" (U+003C LESS-THAN SIGN, U+002F SOLIDUS)
-    followed by characters that case-insensitively<!--ASCII--> match
-    the tag name of the element followed by one of U+0009 CHARACTER
-    TABULATION, U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C
-    FORM FEED (FF), U+0020 SPACE, U+003E GREATER-THAN SIGN (>), or
-    U+002F SOLIDUS (/).</p>
-
-   </li>
-
-  </ol>
-
   <p>Normal elements can have <span title="syntax-text">text</span>,
   <span title="syntax-entities">character entity references</span>,
   other <span title="syntax-elements">elements</span>, and <span
   title="syntax-comments">comments</span>, but the text must not
   contain the character U+003C LESS-THAN SIGN (<code><</code>) or
   an <span title="syntax-ambiguous-ampersand">ambiguous
-  ampersand</span>. Some normal elements also have <span
-  title="syntax-element-restrictions">yet more restrictions</span> on
-  what content they are allowed to hold, beyond the restrictions
-  imposed by the content model and those described in this
-  paragraph. Those restrictions are described below.</p>
+  ampersand</span>. Some normal elements also have <a
+  href="#element-restrictions">yet more restrictions</a> on what
+  content they are allowed to hold, beyond the restrictions imposed by
+  the content model and those described in this paragraph. Those
+  restrictions are described below.</p>
 
   <p>Tags contain a <dfn title="syntax-tag-name">tag name</dfn>,
   giving the element's name. HTML elements all have names that only
@@ -30168,10 +30133,9 @@
   tag</span> must never be omitted if it has any attributes.</p>
 
 
-  <h5>Restrictions on content models</h5>
+  <h5 id="element-restrictions">Restrictions on content models</h5>
 
-  <p>For historical reasons, certain elements <dfn
-  title="syntax-element-restrictions">have extra restrictions</dfn>
+  <p>For historical reasons, certain elements have extra restrictions
   beyond even the restrictions given by their content model.</p>
 
   <p>A <code>p</code> element must not contain
@@ -30213,7 +30177,50 @@
   </div>
 
 
+  <h5 id="cdata-rcdata-restrictions">Restrictions on the contents of CDATA and RCDATA elements</h5>
 
+  <p>The text in CDATA and RCDATA elements must not contain any
+  occurences of the string "<code title=""></</code>" (U+003C
+  LESS-THAN SIGN, U+002F SOLIDUS) followed by characters that
+  case-insensitively<!--ASCII--> match the tag name of the element
+  followed by one of U+0009 CHARACTER TABULATION, U+000A LINE FEED
+  (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), U+0020 SPACE,
+  U+003E GREATER-THAN SIGN (>), or U+002F SOLIDUS (/), unless that
+  string is part of an <span title="syntax-escape">escaped text
+  span</span>.</p>
+
+  <p>An <dfn title="syntax-escape">escaped text span</dfn> is a span
+  of <span title="syntax-text">text</span> (in CDATA and RCDATA
+  elements) and <span title="syntax-entities">character entity
+  references</span> (in RCDATA elements) that starts with an <span
+  title="syntax-escape-start">escaping text span start</span> that is
+  not itself in an <span title="syntax-escape">escaped text
+  span</span>, and ends at the next <span
+  title="syntax-escape-end">escaping text span end</span>.</p>
+
+  <p>An <dfn title="syntax-escape-start">escaping text span
+  start</span> is a part of <span title="syntax-text">text</span> that
+  consists of the four character sequence "<code
+  title=""><!--</code>" (U+003C LESS-THAN SIGN, U+0021 EXCLAMATION
+  MARK, U+002D HYPHEN-MINUS, U+002D HYPHEN-MINUS).</p>
+
+  <p>An <dfn title="syntax-escape-end">escaping text span end</span>
+  is a part of <span title="syntax-text">text</span> that consists of
+  the three character sequence "<code title="">--></code>" (U+002D
+  HYPHEN-MINUS, U+002D HYPHEN-MINUS, U+003E GREATER-THAN SIGN) whose
+  U+003E GREATER-THAN SIGN (>).</p>
+
+  <p>An <span title="syntax-escape-start">escaping text span
+  start</span> may share its U+002D HYPHEN-MINUS characters with its
+  corresponding <span title="syntax-escape-end">escaping text span
+  end</span>.</p>
+
+  <p>The text in CDATA and RCDATA elements must not have an <span
+  title="syntax-escape-start">escaping comment start</span> that is
+  not followed by an <span title="syntax-escape-end">escaping comment
+  end</span>.</p>
+
+
   <h4>Text</h4>
 
   <p><dfn title="syntax-text">Text</dfn> is allowed inside elements,




More information about the Commit-Watchers mailing list