hixie: More useful conformance rules and advice for bidi formatting characters (whatwg r6487)

hixie: More useful conformance rules and advice for bidi formatting
characters (whatwg r6487)

http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.5188&r2=1.5189&f=h
http://html5.org/tools/web-apps-tracker?from=6486&to=6487

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.5188
retrieving revision 1.5189
diff -u -d -r1.5188 -r1.5189
--- Overview.html 17 Aug 2011 05:00:41 -0000 1.5188
+++ Overview.html 17 Aug 2011 19:24:17 -0000 1.5189
@@ -9856,13 +9856,58 @@
   algorithm.<p>The aforementioned restrictions are defined by specifying that
   certain parts of documents form <a href="#bidirectional-algorithm-formatting-character-ranges">bidirectional-algorithm
   formatting character ranges</a>, and then imposing a requirement
-  on such ranges.<p>The string resulting from the concatenation of the data of all of
-  an <a href="#html-elements" title="HTML elements">HTML element</a>'s <a href="#text-node" title="text node">text nodes</a>, if any, is a <a href="#bidirectional-algorithm-formatting-character-ranges" title="bidirectional-algorithm formatting character
-  ranges">bidirectional-algorithm formatting character
-  range</a>.<p>The value of a namespace-less attribute of an <a href="#html-elements" title="HTML
+  on such ranges.<p>The strings resulting from the applying the following algorithm
+  to an <a href="#html-elements" title="HTML elements">HTML element</a> <var title="">element</var> are <a href="#bidirectional-algorithm-formatting-character-ranges">bidirectional-algorithm formatting
+  character ranges</a>:<ol><li><p>Let <var title="">output</var> be an empty list of strings.</li>
+
+   <li><p>Let <var title="">string</var> be an empty string.</li>
+
+   <li><p>Let <var title="">node</var> be the first child node of <var title="">element</var>, if any, or null otherwise.</li>
+
+   
+   <li><p><i>Loop</i>: If <var title="">node</var> is null, jump to
+   the step labeled <i>end</i>.</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 <a href="#text-node">text node</a></dt>
+
+     <dd><p>Append the text data of <var title="">node</var> to <var title="">string</var>.</dd>
+
+
+     <dt>If <var title="">node</var> is an <a href="#html-elements" title="HTML elements">HTML element</a> that is <a href="#flow-content">flow content</a> but that is not also <a href="#phrasing-content">phrasing content</a></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.</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.</li>
+
+   <li><p>Jump to the step labeled <i>loop</i>.</li>
+   
+
+   <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>.</li>
+
+   <li><p>Return <var title="">output</var> as the
+   <a href="#bidirectional-algorithm-formatting-character-ranges">bidirectional-algorithm formatting character
+   ranges</a>.</li>
+
+  </ol><p>The value of a namespace-less attribute of an <a href="#html-elements" title="HTML
   elements">HTML element</a> is a <a href="#bidirectional-algorithm-formatting-character-ranges" title="bidirectional-algorithm formatting character
   ranges">bidirectional-algorithm formatting character
-  range</a>.<p>Any strings that, as described above, are
+  range</a>.</p><p>Any strings that, as described above, are
   <dfn id="bidirectional-algorithm-formatting-character-ranges">bidirectional-algorithm formatting character ranges</dfn> must
   match the <code title="">string</code> production in the following
   ABNF, the character set for which is Unicode. <a href="#refsABNF">[ABNF]</a><pre>string        = *( plaintext ( embedding / override ) ) plaintext
@@ -9874,11 +9919,11 @@
 rlo           = %x202E ; U+202E RIGHT-TO-LEFT OVERRIDE
 pdf           = %x202C ; U+202C POP DIRECTIONAL FORMATTING
 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"><a href="#the-dir-attribute">dir</a></code> attribute, the
-  <code><a href="#the-bdo-element">bdo</a></code> element, and the <code><a href="#the-bdi-element">bdi</a></code> element, rather
-  than maintaining the bidirectional-algorithm formatting characters
-  manually.<h4 id="wai-aria"><span class="secno">3.2.7 </span><dfn>WAI-ARIA</dfn></h4><p>Authors may use the ARIA <code title="attr-aria-role">role</code>
+                ; any string with no bidirectional-algorithm formatting characters</pre><p class="note">Authors are encouraged to use the <code title="attr-dir"><a href="#the-dir-attribute">dir</a></code> attribute, the <code><a href="#the-bdo-element">bdo</a></code> element,
+  and the <code><a href="#the-bdi-element">bdi</a></code> element, rather than maintaining the
+  bidirectional-algorithm formatting characters manually. The
+  bidirectional-algorithm formatting characters interact poorly with
+  CSS.<h4 id="wai-aria"><span class="secno">3.2.7 </span><dfn>WAI-ARIA</dfn></h4><p>Authors may use the ARIA <code title="attr-aria-role">role</code>
   and <code title="attr-aria-*">aria-*</code> attributes on <a href="#html-elements">HTML
   elements</a>, in accordance with the requirements described in
   the ARIA specifications, except where these conflict with the

Received on Wednesday, 17 August 2011 19:24:42 UTC