Page 1 of 1

Removing White Spaces added in text mode

Posted: Tue Jan 26, 2016 6:58 pm
by Boreas
Hello

we are presently trying to automate the publication of our documentation to Confluence. Source files are dita xml created in Oxygen.

When doing the magic to publish our files on Confluence, we have serious line brake issues.


When I look in author mode, all seems fine, but when we look in text mode we notice that several white spaces are added, creating line brakes.


In text mode: we see that white spaces are added in tags.

<?xml version="1.0" ?><!DOCTYPE task PUBLIC '-//OASIS//DTD DITA Task//EN' 'task.dtd'><task id="task_bsz_x2p_dq">
<title>Getting Started</title>
<taskbody>
<steps id="steps_p3q_qny_2q">
<step>
<cmd>Make sure the WAN network interface (either WAN, ETH1, Ethernet, Network or
ETH5 depending on your model) of your Mediatrix unit is connected to the <ph
otherprops="LAN">router/switch to your LAN</ph>
<ph otherprops="Edge">WAN/Internet</ph>.</cmd>
</step>
<step>
<cmd>Make sure the second Ethernet connector (either LAN, ETH2 or Computer depending
on your model) of your Mediatrix unit is connected to the computer.</cmd>
</step>
<step>
<cmd>Log on to the Mediatrix unit Management interface.</cmd>
<info>
<note type="note">If you are using your Mediatrix unit for the first time, refer
to its Mediatrix unit Quick Start guide. </note>
</info>
</step>
</steps>
</taskbody>
</task>



And this is how it comes out in Confluence becasue of these white spaces:

Getting Started
Steps

Make sure the WAN network interface (either WAN, ETH1, Ethernet, Network or
ETH5 depending on your model) of your Mediatrix unit is connected to the

router/switch to your LAN

WAN/Internet

.

Make sure the second Ethernet connector (either LAN, ETH2 or Computer depending
on your model) of your Mediatrix unit is connected to the computer.

Log on to the Mediatrix unit Management interface.

If you are using your Mediatrix unit for the first time, refer to its Mediatrix unit Quick Start guide.



is there a way to remove the white spaces to have something like:

[Codebox=]<?xml version="1.0" ?><!DOCTYPE task PUBLIC '-//OASIS//DTD DITA Task//EN' 'task.dtd'><task id="task_bsz_x2p_dq">
<title>Getting Started</title>
<taskbody>
<steps id="steps_p3q_qny_2q">
<step>
<cmd>Make sure the WAN network interface (either WAN, ETH1, Ethernet, Network or ETH5 depending on your model) of your Mediatrix unit is connected to the <ph otherprops="LAN">router/switch to your LAN</ph><ph otherprops="Edge">WAN/Internet</ph>.</cmd>
</step>
<step>
<cmd>Make sure the second Ethernet connector (either LAN, ETH2 or Computer depending on your model) of your Mediatrix unit is connected to the computer.</cmd>
</step>
<step>
<cmd>Log on to the Mediatrix unit Management interface.</cmd>
<info>
<note type="note">If you are using your Mediatrix unit for the first time, refer to its Mediatrix unit Quick Start guide. </note>
</info>
</step>
</steps>
</taskbody>
</task>

[/Codebox]


Best Regards

Re: Removing White Spaces added in text mode

Posted: Wed Jan 27, 2016 1:39 pm
by Dan
Hello,

When saving from Author editing mode, the content gets formatted according to the rules defined in the options from:

Options/Preferecens/Editor/Format
Options/Preferecens/Editor/Format/XML

To make the Author serialize long lines without breaking them you can use the option:
Compatibility with other tools: Do not break lines, do not indent, and
Format and indent The entire document (optional)
from Options/Preferences/Editor/Edit modes/Author, Serialization options section.

To fix your existing documents, I suggest to:
In Options/Preferecens/Editor/Format
- uncheck Detect indent on open
- set Indent size to zero
- set Line width to something big like 10000 characters

Add the folder with your DITA topics to the project, then invoke the 'Format and Indent Files' action from the contextual menu.

I suggest to set these formatting options at project level, so all the content authors share the same set of formatting options.
https://www.oxygenxml.com/doc/versions/ ... jects.html

Best regards,
Dan