TEI P5 to DOCX has the right-to-left text direction between words

Having trouble installing Oxygen? Got a bug to report? Post it all here.
Dotno
Posts: 5
Joined: Thu Apr 14, 2022 1:05 am

TEI P5 to DOCX has the right-to-left text direction between words

Post by Dotno »

I am exporting my TEI P5 xml file to DOCX using Oxygen's transformation. The resulting Word file cannot be edited effectively because anything new I type in it are appearing in a very strange text direction. Like all the punctuations and spaces will appear in the left of the text characters (letters and numbers) until another text character is typed.
Am I doing something wrong?
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: TEI P5 to DOCX has the right-to-left text direction between words

Post by Radu »

Hi,

I cannot reproduce this problem using a small TEI P5 sample file bundled with Oxygen (OXYGEN_INSTALL_DIR/samples/tei/TEI-P5.xml). I do not know any specifics about how the TEI to DOCX transformation works, maybe someone from the TEI community will help further with this.
Do you use in the TEI document any Arabic or Hebrew characters or any xml:lang attribute with a value which may suggest to the Word processor that the document has right to left orientation?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Dotno
Posts: 5
Joined: Thu Apr 14, 2022 1:05 am

Re: TEI P5 to DOCX has the right-to-left text direction between words

Post by Dotno »

Hello Radu!
Thanks for the quick response! I had xml:lang="mn" in one of the two <title> elements only, nowhere else. I am transforming my standard TEI xml into an intermediate document (xml to xml) in order to make sure the critical apparatus appear in the footnote, etc., I am trying to upload both, but this forum would not let me. It says the "ERROR: Invalid file extension: Orig.xml"...

After the docx appears, try typing in line several words, maybe a sentence, and it would be very weird.

Thanks!
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: TEI P5 to DOCX has the right-to-left text direction between words

Post by Radu »

Hi,

Maybe you can zip the resources and see if they can get uploaded like this on our forum. Also try to reduce your XML file to a minimum content with which the problem can be reproduced, this might also help you determine what the problem is.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Dotno
Posts: 5
Joined: Thu Apr 14, 2022 1:05 am

Re: TEI P5 to DOCX has the right-to-left text direction between words

Post by Dotno »

Thanks!
Ah, I think zipping worked!
In any case, to get the formatting of the DOCX right, in the XML output of my XSLT, I have to Find/Replace All the string

Code: Select all

 xmlns=""
(including the one leading space). However, this is not necessary to recreate the problem. I've typed in a comment in-line in the DOCX.
TEI DOCX problem.zip
(36.11 KiB) Downloaded 96 times
Last edited by Dotno on Fri Apr 15, 2022 3:41 am, edited 2 times in total.
Post Reply