HTML5 Tracker

Diff (omit for latest revision)
Filter

Short URL: http://html5.org/r/4125

SVNBugCommentTime (UTC)
4125Try to explain 'transparent' with an example.2009-10-13 09:44
Index: source
===================================================================
--- source	(revision 4124)
+++ source	(revision 4125)
@@ -9060,6 +9060,27 @@
   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>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>p</code><ul><li class="t3"><code>#text</code>: <span title="">Hello </span></li><li class="t1"><code>a</code> <span class="t2"><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>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><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>Since that is conforming, the contents of the <code>a</code> are
+   conforming in the original fragment.</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
   accepting any <span>flow content</span>.</p>

|