Re: [xsl] BIDI problem in XSL-FO

Subject: Re: [xsl] BIDI problem in XSL-FO
From: "Tony Graham tgraham@xxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 3 May 2016 18:01:15 -0000
On 03/05/2016 16:42, Michael MC<ller-Hillebrand mmh@xxxxxxxxx wrote:
Unfortunately, in my case the parentheses are likely to be just
regular text and I have no direct way of knowing whether they
surround Arabic or Western text (other than trying to find some
all-purpose magic XPath analyzing basically every text() node). But
the content inside the parentheses is tagged as non-translateable and
I can take advantage of that.

<p>ARABIC <nt>Brand name</nt> (<nt>Former name</nt>) TEXT.</p>

By playing around with the tool (and without proper understanding of
the rules) I find some options that would make the parentheses
correct, but the preceding or following Arabic text will be ordered
in the wrong way.

The utility didn't mirror the ')' from 'Brand name (Former name)', so it may be making a trade-off between showing the sequence of characters and showing the final result.

I have the impression that direction control characters in this
situation do not as well as <fo:bidi-override> would work.

I went down the bidirectional ordering controls route after reading Geert's post. We're at the point that it's the blind leading the blind, but I added the translations of 'Preface' and 'Chapter 1' from the Arabic translation of the UDHR to the text and, to my untutored eye, it came out okay using either the LRM character or fo:unicode-bidi.

BTW: I hope this is still on topic enough. That's why I mentioned

The 'XSL-List Guidelines' posted two days ago still explicitly say that FO is on topic.


Tony Graham. -- Senior Architect XML Division Antenna House, Inc. ---- Skerries, Ireland tgraham@xxxxxxxxxxxxx

<fo:root xmlns:fo="";
xml:lang="ab" writing-mode="rl-tb">
<fo:simple-page-master master-name="a">
<fo:page-sequence master-reference="a">
<fo:flow flow-name="xsl-region-body">
<fo:block>Brand name (Former name)</fo:block>
<fo:block>Brand name (Former name)&#x200E;</fo:block>
<fo:block><fo:bidi-override unicode-bidi="embed">Brand name (Former name)</fo:bidi-override></fo:block>
<fo:block><fo:bidi-override direction="ltr">Brand name (Former name)</fo:bidi-override></fo:block>
X(X'X,X) Brand name (Former name)&#x200E; X'YYX'X/X) 1</fo:block>
X(X'X,X) <fo:bidi-override unicode-bidi="embed">Brand name (Former name)</fo:bidi-override> X'YYX'X/X) 1</fo:block>
X(X'X,X) <fo:bidi-override direction="ltr">Brand name (Former name)</fo:bidi-override> X'YYX'X/X) 1</fo:block>

Current Thread