- From: Michael Smith via cvs-syncmail <cvsmail@w3.org>
- Date: Sat, 01 Jan 2011 05:46:41 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/spec In directory hutz:/tmp/cvs-serv29064 Modified Files: content-models.html index.html spec.html Log Message: Rewrite the rules for 'transparent' so that you can't put a <param> in an <ins> in an <object> (or similar things). (whatwg r5732) [updated by splitter] Index: content-models.html =================================================================== RCS file: /sources/public/html5/spec/content-models.html,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- content-models.html 14 Dec 2010 02:46:41 -0000 1.42 +++ content-models.html 1 Jan 2011 05:46:39 -0000 1.43 @@ -777,24 +777,67 @@ fired by the steps above leading up to this point.</p> </div><h5 id="transparent-content-models"><span class="secno">3.2.5.2 </span>Transparent content models</h5><p>Some elements are described as <dfn id="transparent">transparent</dfn>; they have - "transparent" in the description of their content model.</p><p>When a content model includes a part that is "transparent", those - parts must not contain content that would not be conformant if all - transparent elements in the tree were replaced, in their parent - element, by the children in the "transparent" part of their content - model, retaining order.</p><div class="example"> + "transparent" in the description of their content model. The content + model of a <a href="#transparent">transparent</a> element is derived from the + content model of its parent element: the elements required in the + part of the content model that is "transparent" are the same + elements as required in the part of the content model of the parent + of the transparent element in which the transparent element finds + itself.</p><div class="example"> + + <p>For instance, an <code><a href="edits.html#the-ins-element">ins</a></code> element inside a + <code><a href="text-level-semantics.html#the-ruby-element">ruby</a></code> element cannot contain an <code><a href="text-level-semantics.html#the-rt-element">rt</a></code> + element, because the part of the <code><a href="text-level-semantics.html#the-ruby-element">ruby</a></code> element's + content model that allows <code><a href="edits.html#the-ins-element">ins</a></code> elements is the part + that allows <a href="#phrasing-content">phrasing content</a>, and the <code><a href="text-level-semantics.html#the-rt-element">rt</a></code> + element is not <a href="#phrasing-content">phrasing content</a>.</p> + + </div><!--(as far as I can tell, there's no way to violate this requirement + without first violating the earlier requirement) + <p>Furthermore, when a content model includes a part that is + "transparent", those parts must not contain content that would not + be conformant if all transparent elements in the tree were replaced, + in their parent element, by the children in the "transparent" part + of their content model, retaining order.</p> + + <div class="example"> <p>Consider the following markup fragment:</p> - <pre><p>Hello <a href="world.html"><em>wonderful</em> world</a>!</p></pre> + <pre><p>Hello <a href="world.html"><em>wonderful</em> world</a>!</p></pre> <p>Its DOM looks like the following:</p> - <ul class="domTree"><li class="t1"><code><a href="grouping-content.html#the-p-element">p</a></code><ul><li class="t3"><code>#text</code>: <span title="">Hello </span></li><li class="t1"><code><a href="text-level-semantics.html#the-a-element">a</a></code> <span class="t2" title=""><code class="attribute name">href</code>="<code class="attribute value">world.html</code>"</span><ul><li class="t1"><code><a href="text-level-semantics.html#the-em-element">em</a></code><ul><li class="t3"><code>#text</code>: <span title="">wonderful</span></li></ul></li><li class="t3"><code>#text</code>: <span title=""> world</span></li></ul></li><li class="t3"><code>#text</code>: <span title="">!</span></li></ul></li></ul><p>The content model of the <code><a href="text-level-semantics.html#the-a-element">a</a></code> element is - <a href="#transparent">transparent</a>. To see if its contents are conforming, + <ul class="domTree"><li class="t1"><code>p</code><ul><li class="t3"><code>#text</code>: <span title="">Hello </span></li><li class="t1"><code>a</code> <span class="t2" title=""><code class="attribute name">href</code>="<code class="attribute value">world.html</code>"</span><ul><li class="t1"><code>em</code><ul><li class="t3"><code>#text</code>: <span title="">wonderful</span></li></ul></li><li class="t3"><code>#text</code>: <span title=""> world</span></li></ul></li><li class="t3"><code>#text</code>: <span title="">!</span></li></ul></li></ul> + + <p>The content model of the <code>a</code> element is + <span>transparent</span>. To see if its contents are conforming, therefore, the element is replaced by its contents:</p> - <ul class="domTree"><li class="t1"><code><a href="grouping-content.html#the-p-element">p</a></code><ul><li class="t3"><code>#text</code>: <span title="">Hello </span></li><li class="t1"><code><a href="text-level-semantics.html#the-em-element">em</a></code><ul><li class="t3"><code>#text</code>: <span title="">wonderful</span></li></ul></li><li class="t3"><code>#text</code>: <span title=""> world</span></li><li class="t3"><code>#text</code>: <span title="">!</span></li></ul></li></ul><p>Since that is conforming, the contents of the <code><a href="text-level-semantics.html#the-a-element">a</a></code> are - conforming in the original fragment.</p> + <ul class="domTree"><li class="t1"><code>p</code><ul><li class="t3"><code>#text</code>: <span title="">Hello </span></li><li class="t1"><code>em</code><ul><li class="t3"><code>#text</code>: <span title="">wonderful</span></li></ul></li><li class="t3"><code>#text</code>: <span title=""> world</span></li><li class="t3"><code>#text</code>: <span title="">!</span></li></ul></li></ul> + + <p>Since that is conforming, the contents of the <code>a</code> are + conforming in the original fragment (there is no complication + regarding the various parts of the <code>p</code> element's content + model, since that element's content model has only one part).</p> + + </div> +--><p class="note">In some cases, where transparent elements are nested + in each other, the process has to be applied iteratively.</p><div class="example"> + + <p>Consider the following markup fragment:</p> + + <pre><p><object><param><ins><map><a href="/">Apples</a></map></ins></object></p></pre> + + <p>To check whether "Apples" is allowed inside the <code><a href="text-level-semantics.html#the-a-element">a</a></code> + element, the content models are examined. The <code><a href="text-level-semantics.html#the-a-element">a</a></code> + element's content model is transparent, as is the <code><a href="the-map-element.html#the-map-element">map</a></code> + element's, as is the <code><a href="edits.html#the-ins-element">ins</a></code> element's, as is the part of + the <code><a href="the-iframe-element.html#the-object-element">object</a></code> element's in which the <code><a href="edits.html#the-ins-element">ins</a></code> + element is found. The <code><a href="the-iframe-element.html#the-object-element">object</a></code> element is found in the + <code><a href="grouping-content.html#the-p-element">p</a></code> element, whose content model is <a href="#phrasing-content">phrasing + content</a>. Thus, "Apples" is allowed, as text is phrasing + content.</p> </div><p>When a transparent element has no parent, then the part of its content model that is "transparent" must instead be treated as Index: index.html =================================================================== RCS file: /sources/public/html5/spec/index.html,v retrieving revision 1.1030 retrieving revision 1.1031 diff -u -d -r1.1030 -r1.1031 --- index.html 25 Dec 2010 07:46:41 -0000 1.1030 +++ index.html 1 Jan 2011 05:46:39 -0000 1.1031 @@ -556,7 +556,7 @@ <a href="forms.html#category-submit" title="category-submit">submittable</a>; <a href="forms.html#form-associated-element" title="Form-associated element">form-associated</a></td> <td><a href="content-models.html#phrasing-content" title="Phrasing content">phrasing</a></td> - <td><a href="content-models.html#phrasing-content">Phrasing content</a>*</td> + <td><a href="content-models.html#phrasing-content" title="Phrasing content">phrasing</a>*</td> <td><a href="elements.html#global-attributes" title="global attributes">globals</a>; <code title="attr-fe-autofocus"><a href="association-of-controls-and-forms.html#attr-fe-autofocus">autofocus</a></code>; <code title="attr-fe-disabled"><a href="association-of-controls-and-forms.html#attr-fe-disabled">disabled</a></code>; @@ -701,7 +701,7 @@ <td>Legend for corresponding <code><a href="grouping-content.html#the-dd-element">dd</a></code> element(s)</td> <td>none</td> <td><code><a href="grouping-content.html#the-dl-element">dl</a></code></td> - <td>varies*</td> + <td><a href="content-models.html#phrasing-content" title="Phrasing content">phrasing</a></td> <td><a href="elements.html#global-attributes" title="global attributes">globals</a></td> <td><code><a href="elements.html#htmlelement">HTMLElement</a></code></td> </tr><tr><th><code><a href="text-level-semantics.html#the-em-element">em</a></code></th> Index: spec.html =================================================================== RCS file: /sources/public/html5/spec/spec.html,v retrieving revision 1.1360 retrieving revision 1.1361 diff -u -d -r1.1360 -r1.1361 --- spec.html 31 Dec 2010 07:46:39 -0000 1.1360 +++ spec.html 1 Jan 2011 05:46:39 -0000 1.1361 @@ -388,7 +388,7 @@ <a href="Overview.html">single page HTML</a>, <a href="spec.html">multipage HTML</a>, <a href="author/">web developer edition</a>. -This is revision 1.4594. +This is revision 1.4595. </p> <p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2010 <a href="http://www.w3.org/"><abbr title="World Wide
Received on Saturday, 1 January 2011 05:46:43 UTC