Oxygen formats content of text elements
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 33
- Joined: Wed Oct 04, 2006 6:25 pm
Oxygen formats content of text elements
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
<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
-
- Posts: 33
- Joined: Wed Oct 04, 2006 6:25 pm
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
-
- Posts: 33
- Joined: Wed Oct 04, 2006 6:25 pm
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>
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
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
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service