HTML Standard Tracker

Diff (omit for latest revision)
Filter

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

File a bug

SVNBugCommentTime (UTC)
648711234[Conformance Checkers] More useful conformance rules and advice for bidi formatting characters2011-08-17 19:23
Index: source
===================================================================
--- source	(revision 6486)
+++ source	(revision 6487)
@@ -12415,18 +12415,79 @@
   formatting character ranges</span>, and then imposing a requirement
   on such ranges.</p>
 
-  <p>The string resulting from the concatenation of the data of all of
-  an <span title="HTML elements">HTML element</span>'s <span
-  title="text node">text nodes</span>, if any, is a <span
+  <p>The strings resulting from the applying the following algorithm
+  to an <span title="HTML elements">HTML element</span> <var
+  title="">element</var> are <span>bidirectional-algorithm formatting
+  character ranges</span>:</p>
+
+  <ol>
+
+   <li><p>Let <var title="">output</var> be an empty list of strings.</p></li>
+
+   <li><p>Let <var title="">string</var> be an empty string.</p></li>
+
+   <li><p>Let <var title="">node</var> be the first child node of <var
+   title="">element</var>, if any, or null otherwise.</p></li>
+
+   <!-- while node != null do -->
+   <li><p><i>Loop</i>: If <var title="">node</var> is null, jump to
+   the step labeled <i>end</i>.</p></li>
+
+   <li>
+
+    <p>Process <var title="">node</var> according to the first
+    matching step from the following list:</p>
+
+    <dl class="switch">
+
+     <dt>If <var title="">node</var> is a <span>text node</span></dt>
+
+     <dd><p>Append the text data of <var title="">node</var> to <var title="">string</var>.</p></dd>
+
+
+     <dt>If <var title="">node</var> is an <span title="HTML elements">HTML element</span> that is <span>flow content</span> but that is not also <span>phrasing content</span></dt>
+
+     <dd><p>If <var title="">string</var> is not the empty string,
+     push <var title="">string</var> onto <var title="">output</var>,
+     and let <var title="">string</var> be empty string.</p></dd>
+
+
+     <dt>Otherwise</dt>
+
+     <dd>Do nothing.</dd>
+
+    </dl>
+
+   </li>
+
+   <li><p>Let <var title="">node</var> be <var title="">node</var>'s
+   next sibling, if any, or null otherwise.</p></li>
+
+   <li><p>Jump to the step labeled <i>loop</i>.</p></li>
+   <!-- end while -->
+
+   <li><p><i>End</i>: If <var title="">string</var> is not the empty
+   string, push <var title="">string</var> onto <var
+   title="">output</var>.</p></li>
+
+   <li><p>Return <var title="">output</var> as the
+   <span>bidirectional-algorithm formatting character
+   ranges</span>.</p></li>
+
+  </ol>
+
+  <p>The value of a namespace-less attribute of an <span title="HTML
+  elements">HTML element</span> is a <span
   title="bidirectional-algorithm formatting character
   ranges">bidirectional-algorithm formatting character
   range</span>.</p>
 
-  <p>The value of a namespace-less attribute of an <span title="HTML
-  elements">HTML element</span> is a <span
+<!--(this is unnecessarily pedantic)
+  <p>The text data of a comment node is a <span
   title="bidirectional-algorithm formatting character
   ranges">bidirectional-algorithm formatting character
   range</span>.</p>
+-->
 
   <p>Any strings that, as described above, are
   <dfn>bidirectional-algorithm formatting character ranges</dfn> must
@@ -12445,11 +12506,12 @@
 plaintext     = *( %x0000-2029 / %x202F-10FFFF )
                 ; any string with no bidirectional-algorithm formatting characters</pre>
 
-  <p class="note">For convenience, where possible authors will likely
-  prefer to use the <code title="attr-dir">dir</code> attribute, the
-  <code>bdo</code> element, and the <code>bdi</code> element, rather
-  than maintaining the bidirectional-algorithm formatting characters
-  manually.</p>
+  <p class="note">Authors are encouraged to use the <code
+  title="attr-dir">dir</code> attribute, the <code>bdo</code> element,
+  and the <code>bdi</code> element, rather than maintaining the
+  bidirectional-algorithm formatting characters manually. The
+  bidirectional-algorithm formatting characters interact poorly with
+  CSS.</p>
 
 
 

|