HTML Standard Tracker

Diff (omit for latest revision)
Filter

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

File a bug

SVNBugCommentTime (UTC)
575411234[Authors] [Conformance Checkers] Define conformance criteria around bidi formatting characters2011-01-10 09:55
Index: source
===================================================================
--- source	(revision 5753)
+++ source	(revision 5754)
@@ -1,4 +1,4 @@
-a<!-- EDITOR NOTES
+<!-- EDITOR NOTES
  !
  !   Adding a new element involves editing the following sections:
  !    - description of the element's categories
@@ -11093,6 +11093,7 @@
   character">space characters</span>).</p>
 
 
+
   <h6>Embedded content</h6>
 
   <p><dfn>Embedded content</dfn> is content that imports another
@@ -11518,6 +11519,65 @@
 
 
 
+  <h4>Requirements relating to bidirectional-algorithm formatting
+  characters</h4>
+
+  <p><span>Text content</span> in <span>HTML elements</span> with
+  child <span title="text node">text nodes</span>, and text in
+  attributes of <span>HTML elements</span> that allow free-form text,
+  may contain characters in the range U+202A to U+202E (the
+  bidirectional-algorithm formatting characters). However, the use of
+  these characters is restricted so that any embedding or overrides
+  generated by these characters do not start and end with different
+  parent elements, and so that all such embeddings and overrides are
+  explicitly terminated by a U+202C POP DIRECTIONAL FORMATTING
+  character. This helps reduces incidences of text being reused in a
+  manner that has unforseen effects on the bidirectional
+  algorithm.</p>
+
+  <p>The aforementioned restrictions are defined by specifying that
+  certain parts of documents form <span>bidirectional-algorithm
+  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
+  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
+  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
+  match the <code title="">string</code> production in the following
+  ABNF, the character set for which is Unicode. <a
+  href="#refsABNF">[ABNF]</a></p>
+
+  <pre>string        = *( plaintext ( embedding / override ) ) plaintext
+embedding     = ( lre / rle ) string pdf
+override      = ( lro / rlo ) string pdf
+lre           = %x202A ; U+202A LEFT-TO-RIGHT EMBEDDING
+rle           = %x202B ; U+202B RIGHT-TO-LEFT EMBEDDING
+lro           = %x202D ; U+202D LEFT-TO-RIGHT OVERRIDE
+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">dir</code> attribute, the
+  <code>bdo</code> element, and the <code>bdi</code> element, rather
+  than maintaining the bidirectional-algorithm formatting characters
+  manually.</p>
+
+
+
   <h4><dfn>Annotations for assistive technology products</dfn> (ARIA)</h4>
 
   <p>Authors may use the ARIA <code title="attr-aria-role">role</code>
@@ -16415,9 +16475,9 @@
 
   <h5><dfn title="script content restrictions">Restrictions for contents of <code>script</code> elements</dfn></h5>
 
-  <p>The <code>textContent</code> of a <code>script</code> element must match the
-  <code title="">script</code> production in the following ABNF, the
-  character set for which is Unicode. <a
+  <p>The <code>textContent</code> of a <code>script</code> element
+  must match the <code title="">script</code> production in the
+  following ABNF, the character set for which is Unicode. <a
   href="#refsABNF">[ABNF]</a></p>
 
   <pre>script        = data1 *( escape [ script-start data3 ] "-->" data1 ) [ escape ]

|