html5/spec Overview.html,1.4539,1.4540

Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv32680

Modified Files:
	Overview.html 
Log Message:
An example of dir=auto. Since I don't speak Arabic and am relying on Wikipedia, a close review by Arabic speakers would be even more welcome than usual. (whatwg r5673)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.4539
retrieving revision 1.4540
diff -u -d -r1.4539 -r1.4540
--- Overview.html	9 Nov 2010 00:58:06 -0000	1.4539
+++ Overview.html	9 Nov 2010 02:14:17 -0000	1.4540
@@ -8541,7 +8541,6 @@
    </dd>
 
 
-
    <dt>If the element is a <a href="#root-element">root element</a> and the <code title="attr-dir"><a href="#the-dir-attribute">dir</a></code> attribute is not in a defined state
    (i.e. it is not present or has an invalid value)</dt>
 
@@ -8584,7 +8583,47 @@
   </div><p class="note">Authors are strongly encouraged to use the <code title="attr-dir"><a href="#the-dir-attribute">dir</a></code> attribute to indicate text direction
   rather than using CSS, since that way their documents will continue
   to render correctly even in the absence of CSS (e.g. as interpreted
-  by search engines).<h5 id="classes"><span class="secno">3.2.3.6 </span>The <dfn title="attr-class"><code>class</code></dfn> attribute</h5><p>Every <a href="#html-elements" title="HTML elements">HTML element</a> may have a
+  by search engines).<div class="example">
+
+   <p>This markup fragment is of an IM conversation.</p>
+
+   <pre>&lt;p dir=auto class="u1"&gt;&lt;b&gt;&lt;bdi&gt;Student&lt;/bdi&gt;:&lt;/b&gt; How do you write "What's your name?" in Arabic?&lt;/p&gt;
+&lt;p dir=auto class="u2"&gt;&lt;b&gt;&lt;bdi&gt;Teacher&lt;/bdi&gt;:&lt;/b&gt; &#1605;&#1575; &#1575;&#1587;&#1605;&#1603;&#1567;&lt;/p&gt;
+&lt;p dir=auto class="u1"&gt;&lt;b&gt;&lt;bdi&gt;Student&lt;/bdi&gt;:&lt;/b&gt; Thanks.&lt;/p&gt;
+&lt;p dir=auto class="u2"&gt;&lt;b&gt;&lt;bdi&gt;Teacher&lt;/bdi&gt;:&lt;/b&gt; That's written "&#1588;&#1603;&#1585;&#1611;&#1575;".&lt;/p&gt;
+&lt;p dir=auto class="u2"&gt;&lt;b&gt;&lt;bdi&gt;Teacher&lt;/bdi&gt;:&lt;/b&gt; Do you know how to write "Please"?&lt;/p&gt;
+&lt;p dir=auto class="u1"&gt;&lt;b&gt;&lt;bdi&gt;Student&lt;/bdi&gt;:&lt;/b&gt; "&#1605;&#1606; &#1601;&#1590;&#1604;&#1603;", right?&lt;/p&gt;</pre>
+
+<!--
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<style type="text/css">
+ div { border: groove #FFFF99; padding: 0.25em; width: 22em; background: #FFFFEE; color: black; }
+ p { margin: 0.25em 0; font: 1em/1 InaiMathi; color: purple; }
+ .u1 { color: teal; }
+</style>
+<div>
+<p dir=ltr class="u1"><b><bdi>Student</bdi>:</b> How do you write "What's your name?" in Arabic?</p>
+<p dir=rtl class="u2"><b><bdi>Teacher</bdi>:</b> &#x645;&#x627; &#x627;&#x633;&#x645;&#x643;&#x61f;</p>
+<p dir=ltr class="u1"><b><bdi>Student</bdi>:</b> Thanks.</p>
+<p dir=ltr class="u2"><b><bdi>Teacher</bdi>:</b> That's written "&#x634;&#x643;&#x631;&#x64b;&#x627;".</p>
+<p dir=ltr class="u2"><b><bdi>Teacher</bdi>:</b> Do you know how to write "Please"?</p>
+<p dir=rtl class="u1"><b><bdi>Student</bdi>:</b> "&#x645;&#x646; &#x641;&#x636;&#x644;&#x643;", right?</p>
+-->
+
+   <p>Given a suitable style sheet and the default alignment styles
+   for the <code><a href="#the-p-element">p</a></code> element, namely to align the text to the
+   <i>start edge</i> of the paragraph, the resulting rendering could
+   be as follows:</p>
+
+   <p><img alt="Each paragraph rendered as a separate block, with the paragraphs left-aligned except the second paragraph and the last one, which would  be right aligned, with the usernames ('Student' and 'Teacher' in this example) flush right, with a colon to their left, and the text first to the left of that." src="http://dev.w3.org/html5/spec/images/im.png"></p>
+
+   <p>As noted earlier, the <code title="attr-dir-auto"><a href="#attr-dir-auto">auto</a></code>
+   value is not a panacea. The final paragraph in this example is
+   misinterpreted as being right-to-left text, since it begins with an
+   Arabic character, which causes the "right?" to be to the left of
+   the Arabic text.</p>
+
+  </div><h5 id="classes"><span class="secno">3.2.3.6 </span>The <dfn title="attr-class"><code>class</code></dfn> attribute</h5><p>Every <a href="#html-elements" title="HTML elements">HTML element</a> may have a
   <code title="attr-class"><a href="#classes">class</a></code> attribute specified.<p>The attribute, if specified, must have a value that is a
   <a href="#set-of-space-separated-tokens">set of space-separated tokens</a> representing the various
   classes that the element belongs to.<div class="impl">

Received on Tuesday, 9 November 2010 02:14:23 UTC