[oXygen-user] Line breaks in DITA source

Oxygen XML Editor Support support at oxygenxml.com
Thu Jan 16 01:01:01 CST 2014


Hi Matt,

White space handling is very important for an XML Editor because of 
cases like yours. A space which is added or removed between two inline 
elements might change the final rendered output.

What Oxygen does in this case is correct. These two XML fragments are 
equivalent when normalized:

> <i>Stenotrophomonas maltophilia</i> <tm tmtype="tm"><tm tmtype="reg" translate="no">ATCC</tm> 17666</tm>

and:

> <i>Stenotrophomonas maltophilia</i>
> <tab><tab><tab><tab><tm tmtype="tm"><tm tmtype="reg" translate="no">ATCC</tm> 17666</tm>

By the way, Oxygen usually does not use tabs for indent, just plain 
spaces so probably it uses plain spaces also in your case.
The translation vendor probably uses a tool which has a bug when 
handling white-spaces correctly and maybe you should also write to them 
about it.

Almost our entire white space handling strategy is described here:

> http://www.oxygenxml.com/doc/ug-oxygen/index.html#topics/author-whitespace-handling.html

Our default behavior when saving content in the Author mode would be 
this one:

1) The elements (paragraphs for example) to which you make no 
modification at all will be preserved exactly on save, the same XML 
content they have initially gets saved to disk, without any format and 
indent.

2) If you make a change in an element and it is not defined as a 
space-preserve element Oxygen will attempt to format and indent it when 
it gets saved on disk.
In the Oxygen Preferences->"Editor / Format" page there is a "Line 
Width" text field where you can set a very large value like "10000". 
Lines will still be broken between block-like elements like paragraphs 
but they will not be broken anymore inside the text content of a 
mixed-content element, which is the case you are interested in.

Regards,
Radu

Radu Coravu
<oXygen/>  XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

On 1/15/2014 8:09 PM, KAATMAN Matthew wrote:
> Hey Guys,
>
> How does Oxygen decide where to add line breaks in the source?
>
> I've got a strange situation where I'll have some content like: (Note the literal space between </i> and <tm)
> <i>Stenotrophomonas maltophilia</i> <tm tmtype="tm"><tm tmtype="reg" translate="no">ATCC</tm> 17666</tm>
>
> Oxygen often formats it like: (Note the lack of a space after </i>)
> <i>Stenotrophomonas maltophilia</i>
> <tab><tab><tab><tab><tm tmtype="tm"><tm tmtype="reg" translate="no">ATCC</tm> 17666</tm>
>
> So far so good. Rendering this to PDF produces a space between the </i> and <tm.
>
> However, when we send these files to our translation vendor (they're using Trados), the content comes back as: (Note lack of space)
> <i>Stenotrophomonas maltophilia</i><tm tmtype="tm"><tm tmtype="reg" translate="no">ATCC</tm> 17666</tm>
>
> One solution (and maybe the best one!) would be for the translation vendor  to preserve whitespace. However, I was curious if there was a way to set rules that define how Oxygen saves the file.
>
> If so, another thing I'd probably do is never break a tag across lines. I see this fairly often too. Which 99.99% of the time is no problem, but we've run into some issues due to complexity we've introduced.
>
> <uicontrol
>> Test</uicontrol>
>
> Thanks!
> Matt
>
> AVIS : Ce courrier et ses pieces jointes sont destines a leur seul destinataire et peuvent contenir des informations confidentielles appartenant a bioMerieux. Si vous n'etes pas destinataire, vous etes informe que toute lecture, divulgation, ou reproduction de ce message et des pieces jointes est strictement interdite. Si vous avez recu ce message par erreur merci d'en prevenir l'expediteur et de le detruire, ainsi que ses pieces jointes.
> NOTICE: This message and attachments are intended only for the use of their addressee and may contain confidential information belonging to bioMerieux. If you are not the intended recipient, you are hereby notified that any reading, dissemination, distribution, or copying of this message, or any attachment, is strictly prohibited. If you have received this message in error, please notify the original sender immediately and delete this message, along with any attachments.
>
>
> _______________________________________________
> oXygen-user mailing list
> oXygen-user at oxygenxml.com
> http://www.oxygenxml.com/mailman/listinfo/oxygen-user
>


More information about the oXygen-user mailing list