I've got an Xliff file that has elements like:
<trans-unit id="283395" resname="CAPI" translate="yes" reformat="yes" xml:space="default" approved="no">
<source xml:lang="en">I would like to start with some general questions.
Can you please tell me in which year you were born?</source>
After I open it in Oxygen it looks like:
<trans-unit id="283395" resname="CAPI" translate="yes" reformat="yes"
xml:space="default" approved="no">
<source xml:lang="en">I would like to start with some general questions. Can you
please tell me in which year you were born?</source>
It's been indented and hard-wrapped (some line breaks have been inserted).
This spoils the internal structure of the text contained in those segments and should be avoided.
I've been trying several options in the Preferences, but to no avail.
Any suggestion?
Thanks a lot, Manuel
Oxygen formats content of text elements
Re: Oxygen formats content of text elements
I found the answer myself
Preferences | Editor | Format | Format and indent the document on open
However, I still have one doubt. Is it possible somehow to either indent tags but not text contained in one element?
Thanks, xinelo

Preferences | Editor | Format | Format and indent the document on open
However, I still have one doubt. Is it possible somehow to either indent tags but not text contained in one element?
Thanks, xinelo
Re: Oxygen formats content of text elements
I've just realized the format is not clearly kept in my excerpts of code above. I paste them again as code:
My document had:
and oxygen converted it to:
My document had:
Code: Select all
<trans-unit id="283395" resname="CAPI" translate="yes" reformat="yes" xml:space="default" approved="no">
<source xml:lang="en">I would like to start with some general questions.
Can you please tell me in which year you were born?</source>
Code: Select all
<trans-unit id="283395" resname="CAPI" translate="yes" reformat="yes"
xml:space="default" approved="no">
<source xml:lang="en">I would like to start with some general questions. Can you
please tell me in which year you were born?</source>
Re: Oxygen formats content of text elements
Hello,
I see you have xml:space="default" set on the "trans-unit" element. If you want to preserve your indents and line breaks you should change it to xml:space="preserve". Oxygen's Format and Indent feature recognizes this attribute and preserves the whitespaces.
Otherwise, if you can't or don't want to modify the document, you can set for what elements should whitespaces be preserved in the options: Options -> Preferences -> Editor -> Format -> XML. Add a new element to the "Preserve space" list. You may also want to have a look at the other options from that option page, they control various formatting features/restrictions.
Regards,
Adrian
I see you have xml:space="default" set on the "trans-unit" element. If you want to preserve your indents and line breaks you should change it to xml:space="preserve". Oxygen's Format and Indent feature recognizes this attribute and preserves the whitespaces.
Otherwise, if you can't or don't want to modify the document, you can set for what elements should whitespaces be preserved in the options: Options -> Preferences -> Editor -> Format -> XML. Add a new element to the "Preserve space" list. You may also want to have a look at the other options from that option page, they control various formatting features/restrictions.
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Re: Oxygen formats content of text elements
Hi Adrian,
Your answer was great, I learnt a new very important thing. Thanks a lot!
Cheers, Manuel
Your answer was great, I learnt a new very important thing. Thanks a lot!
Cheers, Manuel