[html5] r2129 - [a] (0) Mention that you can omit the </option> in <option><optgroup> too. Also, [...]
whatwg at whatwg.org
whatwg at whatwg.org
Fri Aug 29 04:05:46 PDT 2008
Author: ianh
Date: 2008-08-29 04:05:44 -0700 (Fri, 29 Aug 2008)
New Revision: 2129
Modified:
index
source
Log:
[a] (0) Mention that you can omit the </option> in <option><optgroup> too. Also, make the text support <optgroup> outside of <select>, but comment it out since it's irrelevant for now.
Modified: index
===================================================================
--- index 2008-08-29 10:38:16 UTC (rev 2128)
+++ index 2008-08-29 11:05:44 UTC (rev 2129)
@@ -45803,18 +45803,34 @@
href="#rp">rp</a></code> element is immediately followed by an <code><a
href="#rt">rt</a></code> or <code><a href="#rp">rp</a></code> element, or
if there is no more content in the parent element.</p>
- <!-- </optgroup> -->
+ <!-- </optgroup> (the text assumes <optgroup> can only be inside a
+ <select>; commented out text below can handle the non-<select> case
+ if we ever allow it) -->
<p>An <code>optgroup</code> element's <span title=syntax-end-tag>end
- tag</span> may be omitted if the <code>optgroup</code> element is
- immediately followed by another <code>optgroup</code> element, or if there
- is no more content in the parent element.</p>
+ tag</span> may be omitted if the <code>optgroup</code> element
+ <!--has an ancestor
+ <code>select</code> element and--> is immediately
+ followed by another <code>optgroup</code> element, or if
+ <!--all of the elements
+ that are ancestors of the <code>optgroup</code> element, up to and
+ including the first ancestor element that is not an
+ <code>optgroup</code> element, have no more content-->
+ there is no more content in the parent element.</p>
+ <!-- so e.g. the max number of </optgroup>s are omitted here:
+ <select><optgroup></select>
+ <p id=x><optgroup></optgroup>x</p>
+ <p id=x><optgroup><optgroup></optgroup></optgroup>x</p>
+ <p><optgroup id=x><optgroup></optgroup>x</p>
+ <p><optgroup><optgroup id=x>x</p>
+ -->
<!-- </option> -->
<p>An <code>option</code> element's <span title=syntax-end-tag>end
tag</span> may be omitted if the <code>option</code> element is
- immediately followed by another <code>option</code> element, or if there
- is no more content in the parent element.</p>
+ immediately followed by another <code>option</code> element, or if it is
+ immediately followed by an <code>optgroup</code> element, or if there is
+ no more content in the parent element.</p>
<!-- <colgroup> -->
<p>A <code><a href="#colgroup">colgroup</a></code> element's <span
@@ -45894,11 +45910,15 @@
<p>For historical reasons, certain elements have extra restrictions beyond
even the restrictions given by their content model.
- <p>An <code>optgroup</code> element must not contain <code>optgroup</code>
- elements, even though these elements are technically allowed to be nested
- according to the content models described in this specification. (If an
- <code>optgroup</code> element is put inside another in the markup, it will
- in fact imply an <code>optgroup</code> end tag before it.)
+ <p>An <code>optgroup</code> element <!--that is a descendant of a
+ <code>select</code> element-->
+ must not contain <code>optgroup</code> elements, even though these
+ elements are technically allowed to be nested according to the content
+ models described in this specification. (If an <code>optgroup</code>
+ element is put inside another <!--<code>optgroup</code> element
+ inside a <code>select</code> element-->
+ in the markup, it will in fact imply an <code>optgroup</code> end tag
+ before it.)
<p>A <code><a href="#table">table</a></code> element must not contain
<code><a href="#tr">tr</a></code> elements, even though these elements are
Modified: source
===================================================================
--- source 2008-08-29 10:38:16 UTC (rev 2128)
+++ source 2008-08-29 11:05:44 UTC (rev 2129)
@@ -43227,18 +43227,32 @@
immediately followed by an <code>rt</code> or <code>rp</code>
element, or if there is no more content in the parent element.</p>
- <!-- </optgroup> -->
+ <!-- </optgroup> (the text assumes <optgroup> can only be inside a
+ <select>; commented out text below can handle the non-<select> case
+ if we ever allow it) -->
<p>An <code>optgroup</code> element's <span
title="syntax-end-tag">end tag</span> may be omitted if the
- <code>optgroup</code> element is immediately followed by another
- <code>optgroup</code> element, or if there is no more content in the
- parent element.</p>
+ <code>optgroup</code> element <!--has an ancestor
+ <code>select</code> element and--> is immediately followed by
+ another <code>optgroup</code> element, or if <!--all of the elements
+ that are ancestors of the <code>optgroup</code> element, up to and
+ including the first ancestor element that is not an
+ <code>optgroup</code> element, have no more content--> there is no
+ more content in the parent element.</p>
+ <!-- so e.g. the max number of </optgroup>s are omitted here:
+ <select><optgroup></select>
+ <p id=x><optgroup></optgroup>x</p>
+ <p id=x><optgroup><optgroup></optgroup></optgroup>x</p>
+ <p><optgroup id=x><optgroup></optgroup>x</p>
+ <p><optgroup><optgroup id=x>x</p>
+ -->
<!-- </option> -->
<p>An <code>option</code> element's <span title="syntax-end-tag">end
tag</span> may be omitted if the <code>option</code> element is
immediately followed by another <code>option</code> element, or if
- there is no more content in the parent element.</p>
+ it is immediately followed by an <code>optgroup</code> element, or
+ if there is no more content in the parent element.</p>
<!-- <colgroup> -->
<p>A <code>colgroup</code> element's <span
@@ -43309,12 +43323,14 @@
<p>For historical reasons, certain elements have extra restrictions
beyond even the restrictions given by their content model.</p>
- <p>An <code>optgroup</code> element must not contain
+ <p>An <code>optgroup</code> element <!--that is a descendant of a
+ <code>select</code> element--> must not contain
<code>optgroup</code> elements, even though these elements are
technically allowed to be nested according to the content models
described in this specification. (If an <code>optgroup</code>
- element is put inside another in the markup, it will in fact imply
- an <code>optgroup</code> end tag before it.)</p>
+ element is put inside another <!--<code>optgroup</code> element
+ inside a <code>select</code> element--> in the markup, it will in
+ fact imply an <code>optgroup</code> end tag before it.)</p>
<p>A <code>table</code> element must not contain <code>tr</code>
elements, even though these elements are technically allowed inside
More information about the Commit-Watchers
mailing list