W3C home > Mailing lists > Public > public-html-commits@w3.org > January 2011

html5/spec Overview.html,1.4594,1.4595

From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
Date: Sat, 01 Jan 2011 05:28:46 +0000
To: public-html-commits@w3.org
Message-Id: <E1PYu1G-0007JZ-RY@lionel-hutz.w3.org>
Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv28103

Modified Files:
	Overview.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)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.4594
retrieving revision 1.4595
diff -u -d -r1.4594 -r1.4595
--- Overview.html	31 Dec 2010 07:08:00 -0000	1.4594
+++ Overview.html	1 Jan 2011 05:28:42 -0000	1.4595
@@ -9418,24 +9418,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>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.<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.<div class="example">
+
+   <p>For instance, an <code><a href="#the-ins-element">ins</a></code> element inside a
+   <code><a href="#the-ruby-element">ruby</a></code> element cannot contain an <code><a href="#the-rt-element">rt</a></code>
+   element, because the part of the <code><a href="#the-ruby-element">ruby</a></code> element's
+   content model that allows <code><a href="#the-ins-element">ins</a></code> elements is the part
+   that allows <a href="#phrasing-content">phrasing content</a>, and the <code><a href="#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>&lt;p&gt;Hello &lt;a href="world.html"&gt;&lt;em&gt;wonderful&lt;/em&gt; world&lt;/a&gt;!&lt;/p&gt;</pre>
+   <pre>&lt;p>Hello &lt;a href="world.html">&lt;em>wonderful&lt;/em> world&lt;/a>!&lt;/p></pre>
 
    <p>Its DOM looks like the following:</p>
 
-   <ul class="domTree"><li class="t1"><code><a href="#the-p-element">p</a></code><ul><li class="t3"><code>#text</code>: <span title="">Hello </span><li class="t1"><code><a href="#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="#the-em-element">em</a></code><ul><li class="t3"><code>#text</code>: <span title="">wonderful</span></ul><li class="t3"><code>#text</code>: <span title=""> world</span></ul><li class="t3"><code>#text</code>: <span title="">!</span></ul></ul><p>The content model of the <code><a href="#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="#the-p-element">p</a></code><ul><li class="t3"><code>#text</code>: <span title="">Hello </span><li class="t1"><code><a href="#the-em-element">em</a></code><ul><li class="t3"><code>#text</code>: <span title="">wonderful</span></ul><li class="t3"><code>#text</code>: <span title=""> world</span><li class="t3"><code>#text</code>: <span title="">!</span></ul></ul><p>Since that is conforming, the contents of the <code><a href="#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.<div class="example">
+
+   <p>Consider the following markup fragment:</p>
+
+   <pre>&lt;p&gt;&lt;object&gt;&lt;param&gt;&lt;ins&gt;&lt;map&gt;&lt;a href="/"&gt;Apples&lt;/a&gt;&lt;/map&gt;&lt;/ins&gt;&lt;/object&gt;&lt;/p&gt;</pre>
+
+   <p>To check whether "Apples" is allowed inside the <code><a href="#the-a-element">a</a></code>
+   element, the content models are examined. The <code><a href="#the-a-element">a</a></code>
+   element's content model is transparent, as is the <code><a href="#the-map-element">map</a></code>
+   element's, as is the <code><a href="#the-ins-element">ins</a></code> element's, as is the part of
+   the <code><a href="#the-object-element">object</a></code> element's in which the <code><a href="#the-ins-element">ins</a></code>
+   element is found. The <code><a href="#the-object-element">object</a></code> element is found in the
+   <code><a href="#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
@@ -67618,7 +67661,7 @@
          <a href="#category-submit" title="category-submit">submittable</a>;
          <a href="#form-associated-element" title="Form-associated element">form-associated</a></td>
      <td><a href="#phrasing-content" title="Phrasing content">phrasing</a></td>
-     <td><a href="#phrasing-content">Phrasing content</a>*</td>
+     <td><a href="#phrasing-content" title="Phrasing content">phrasing</a>*</td>
      <td><a href="#global-attributes" title="global attributes">globals</a>;
          <code title="attr-fe-autofocus"><a href="#attr-fe-autofocus">autofocus</a></code>;
          <code title="attr-fe-disabled"><a href="#attr-fe-disabled">disabled</a></code>;
@@ -67763,7 +67806,7 @@
      <td>Legend for corresponding <code><a href="#the-dd-element">dd</a></code> element(s)</td>
      <td>none</td>
      <td><code><a href="#the-dl-element">dl</a></code></td>
-     <td>varies*</td>
+     <td><a href="#phrasing-content" title="Phrasing content">phrasing</a></td>
      <td><a href="#global-attributes" title="global attributes">globals</a></td>
      <td><code><a href="#htmlelement">HTMLElement</a></code></td>
     <tr><th><code><a href="#the-em-element">em</a></code></th>
Received on Saturday, 1 January 2011 05:28:48 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 1 January 2011 05:28:49 GMT