Re: Small errors in HTML4.0 spec. . .

bayoan@caribe.net wrote:
> 
> Hello, I am one of the Spanish translators.  I am currently reading the
> spec, and I've found two minor glitches.
> 
> Section 6.6 (Lengths) on the second line, which is denominated "1.
> Pixels:"  Says that "The value (...) is integer".  I beleive it should
> read "The value (...) is an integer".

Yes, thank you.
 
> Section 8.2.3 (Setting the direction of embedded text).  If it makes it
> any easier, the errror is approximately on the fifth (5th) paragraph of
> page 76 of the PDF version.  It is the line that describes "two embedded
> direction changes", the line reads:
> 
> <!-- english1 <span dir="RTL">HEBREW2 english3 HEBREW4</span> english5
> HEBREW6 --> **Comment containers added by me**
> 
> I think the line should read:
> 
> <!-- english1 <span dir="RTL">HEBREW2 <span dir="LTR">english3</span>
> HEBREW4</span> english5 HEBREW6 --> **Comment containers added by me**
> 
> In other words, I think one of the 'directionality' changes is missing.
> If this last 'error' is actually a misunderstanding on my part, I would
> greatly appreciate it if one of you three gentlemen would let me know.
> I am an electrical engineering undergraduate senior and I would feel
> much better knowing that I really understand the bidirectional
> algorithm.

Sure. There is no need for the span you suggest because the english3
text is already unambiguously left-to-right, according to the
Unicode algorithm, which assigns directionality
to characters. [I'm not at all an expert on the Unicode bidi algorithm,
but I understand the current question.] Remember this: if you have
only one directionality change in a block of text (e.g., an English
quote in a Hebrew block), you (generally) don't need to make
the direction change explicit because Unicode will already do
the right thing. In fact, if you were to try to change the
direction of the english3 text above by saying "dir=rtl", you would
not cause the English text to be right-to-left -- Unicode won't
do that. That's why the BDO element exists: it lets you override
the Unicode algorithm when you would *really* want to force
the English text to be right to left (the spec gives a few
scenarios when this would be useful).

So basically:

1) If you have one level of embedding, you don't need to
use the "dir" attribute for the direction change; it will (generally)
be handled by the Unicode algorithm. I believe you still have to
establish
a base directionality for the surrounding block of text, however.

2) You must use "dir" for more than one level of embedding, or
   to "parenthesize" embeddings at the same level that might
   be interpreted in two or more ways. For instance, a sequence such as
   (H = Hebrew, E = English):

        H E H E H E

   might have several interpretations. For instance:

        (H (E (H E H) E))
 
   or:
        
        (H (E (H) (E) (H) E))

   and you would use <span dir=...> to create the desired effect.

I hope this helps. I am a little jet lagged today...

Ian
           
-- 
Ian Jacobs / 401 Second Ave. #19G / New York, NY 10010 USA
Tel/Fax: (212) 684-1814          Email: jacobs@w3.org

Received on Wednesday, 11 March 1998 20:41:56 UTC