Author: Multilingual Hebrew with in-word elements has strang

Having trouble installing Oxygen? Got a bug to report? Post it all here.
emylonas
Posts: 10
Joined: Sat Feb 16, 2013 3:04 am

Author: Multilingual Hebrew with in-word elements has strang

Post by emylonas »

I am creating an Author template that some information in English, and also may have some paragraphs with rtl text in Hebrew.

The document is highly structured, and I will know the places where Hebrew can appear. Hebrew paragraphs generally contain only Hebrew text, which can have lots of tags within and around words. Sometimes there will be some mixed RTL and LTR text, usually on separate lines.

Before we tried using Author, we would enter Hebrew in Editor by putting every new start or end tag on a new line. It was important in this model that white space be preserved, since inter word spaces might be indicated by a space at the rightmost position in line.

It looked like this:

Image

Now I can enter it in Author mode like this [not the same text, I am just typing and def in Hebrew characters:
Image

which looks fine. However, when I open the file in a text editor, or in Editor for that matter, I get this:
Image

You see can see that the two components are switched - the section that is to the right of the <supplied> is now to its left. If I try to process this with xsl, it will come out backwards. The Hebrew strings are in the correct order, but the chunks are reversed.

I think I must be doing something wrong. - I seem to be getting the same results when I put in @dir="rtl" and when I try the two letter "he" language code.

Not sure what else I should try.

We could go back to the old method of entering Hebrew text, but that would mean leaving Author mode, which defeats the purpose.
Radu
Posts: 9041
Joined: Fri Jul 09, 2004 5:18 pm

Re: Author: Multilingual Hebrew with in-word elements has st

Post by Radu »

Hello Elli,

Right now we consider that the Author editing mode should have superior bidirectional editing capabilities to the Text editing mode. The Text editing modes contains the tag names as content characters and as they usually are based on English names the direction of the text content is not properly computed there.

You mentioned:
If I try to process this with xsl, it will come out backwards.
Have you tried that?
We made a test XML example:

Code: Select all

<root>
<block dir="rlo">
المتواجدة
<inline>فى</inline>
</block>
</root>
with a small CSS attached:

Code: Select all

block {
display:block;
}

inline {
font-weight:bold;
}
then created a simple XSL which just outputs the entire text content:

Code: Select all

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs"
version="2.0">
</xsl:stylesheet>
and it seems to produce the proper output, meaning that it outputs text which when rendered has the same visual order as you see it in the Author mode.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply