Page 1 of 1
TEI P5 to DOCX has the right-to-left text direction between words
Posted: Thu Apr 14, 2022 1:32 am
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?
Re: TEI P5 to DOCX has the right-to-left text direction between words
Posted: Thu Apr 14, 2022 7:16 am
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
Re: TEI P5 to DOCX has the right-to-left text direction between words
Posted: Thu Apr 14, 2022 11:45 am
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!
Re: TEI P5 to DOCX has the right-to-left text direction between words
Posted: Thu Apr 14, 2022 1:46 pm
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
Re: TEI P5 to DOCX has the right-to-left text direction between words
Posted: Fri Apr 15, 2022 3:38 am
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
(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