Re: [xsl] Bi-Di Algorithm Control

Subject: Re: [xsl] Bi-Di Algorithm Control
From: Tony Graham <Tony.Graham@xxxxxxx>
Date: Tue, 22 Oct 2002 21:33:10 +0100
W. Eliot Kimber wrote at 22 Oct 2002 12:13:09 -0500:
 > 2. It matters to AH whether or not the page number is literal text in 
 > the FO instance or a page-number-citation.

What is the difference, and why?

 > Here is an instance that produces the correct result using XSL Formatter:
 > 
 > <fo:block>
 >    <fo:bidi-override unicode-bidi="embed" direction="rtl"
 >    >惺Ù,FX塤,TX§ English1 1a English2</fo:bidi-override>
 >    <fo:leader leader-length="1em" leader-pattern="space"
 >    /><fo:page-number-citation ref-id="bcdfr234566"/>
 > </fo:block>
 > 
 > I'm still interested to know if there's a control character that changes 
 > the writing direction.

&#x200E;, LEFT-TO-RIGHT MARK
&#x200F;, RIGHT-TO-LEFT MARK
&#x202A;, LEFT-TO-RIGHT EMBEDDING
&#x202B;, RIGHT-TO-LEFT EMBEDDING
&#x202C;, POP DIRECTIONAL FORMATTING
&#x202D;, LEFT-TO-RIGHT OVERRIDE
&#x202E;, RIGHT-TO-LEFT OVERRIDE

See UAX #9, The Bidirectional Algorithm, or Section 3.12,
Bidirectional Behavior, of the Unicode Standard, Version 3.0.  They're
also covered in Chapter 6 of "Unicode: A Primer".

Section 5.8, Unicode BIDI Processing, of the XSL 1.0 Recommendation
describes the behavior of the "direction" and "unicode-bidi"
properties in terms of RLO/LRO and RLE/LRE.

Mixing markup and the formatting control characters is asking for
trouble.  LRM and RLM do what you want -- i.e., they force the
directionality of neighbouring characters, such as numbers, that have
only "weak" inherent directionality.  However, here's what the HTML
4.0 Recommendation says about mixing markup and formatting control
characters:

   If both methods are used, great care should be exercised to insure
   proper nesting of markup and directional embedding or override,
   otherwise, rendering results are undefined.

Regards,


Tony Graham
------------------------------------------------------------------------
XML Technology Center - Dublin                mailto:tony.graham@xxxxxxx
Sun Microsystems Ireland Ltd                       Phone: +353 1 8199708
Hamilton House, East Point Business Park, Dublin 3            x(70)19708

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread