Saving map from DITA Maps Mgr removes blank lines

Having trouble installing Oxygen? Got a bug to report? Post it all here.
Erlend L
Posts: 13
Joined: Mon Mar 14, 2011 3:15 am

Saving map from DITA Maps Mgr removes blank lines

Post by Erlend L »

I like having some "air" in my maps, so I separate sections of the maps with blank lines and comments, like this:

Code: Select all


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd">
<map id="vdd" outputclass="topic-numbering draft">
<title>Version Description Document</title>

<!-- generic topics -->
<topicref href="vdd/meta/toc-introduction.dita">
<topicref href="vdd/concept/background.dita"/>
</topicref>

<!-- generic topics -->
<topicref href="poc/concept/poc-main.dita"/>

<!-- conref resources -->
<keydef href="resource/windows.dita" keys="windows" type="topic"/>
<keydef href="resource/virt.dita" keys="virt" type="concept"/>
<keydef href="release/gen075/resource/release-conrefsrc.dita" keys="release" type="topic"/>
<keydef href="release/gen075/resource/release-conrefsrc.g.dita" keys="release.g" type="topic"/>

<!-- keydef resources -->
<topicref href="release/gen075/resource/release-keydefsrc.ditamap" format="ditamap"/>
<topicref href="release/gen075/resource/release-keydefsrc.g.ditamap" format="ditamap"/>

</map>
I used Eclipse Juno SR 1 (20121004-1855) with oXygen XML Author 14.1.0.v2012121012. I have selected Preferences, Author>Editor>Format>XML, Select Preserve empty lines, so that when I use Ctrl-Shift-F on the map above in the editor (Text view), the Format and Indent operation will leave the blank lines in there. So far so good.

However, if I open the map and edit it in the DITA Maps Manager (for example by dragging a new topic into the map) and then save it from the Maps Manager, the blank lines are removed and I end up with this solid block of text:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd">
<map id="vdd" outputclass="topic-numbering draft">
<title>Version Description Document</title>
<!-- generic topics -->
<topicref href="vdd/meta/toc-introduction.dita">
<topicref href="vdd/concept/background.dita"/>
</topicref>
<!-- generic topics -->
<topicref href="poc/concept/poc-main.dita"/>
<!-- conref resources -->
<keydef href="resource/windows.dita" keys="windows" type="topic"/>
<keydef href="resource/virt.dita" keys="virt" type="concept"/>
<keydef href="release/gen075/resource/release-conrefsrc.dita" keys="release" type="topic"/>
<keydef href="release/gen075/resource/release-conrefsrc.g.dita" keys="release.g" type="topic"/>
<!-- keydef resources -->
<topicref href="release/gen075/resource/release-keydefsrc.ditamap" format="ditamap"/>
<topicref href="release/gen075/resource/release-keydefsrc.g.ditamap" format="ditamap"/>
</map>
How can I prevent DITA Maps Manager from removing the blank lines?
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Saving map from DITA Maps Mgr removes blank lines

Post by Radu »

Hi Erlend,

You are right and we'll try to fix this on our side.
I'll update the thread when we do.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Erlend L
Posts: 13
Joined: Mon Mar 14, 2011 3:15 am

Re: Saving map from DITA Maps Mgr removes blank lines

Post by Erlend L »

Thanks Radu; merely a nuisance, but nice the get fixed; it is so much easier to use the DITA Maps Manager when restructuring a document compared to moving text around.

- Erlend
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Saving map from DITA Maps Mgr removes blank lines

Post by Radu »

Hi Erlend,

In the Oxygen plugin Preferences there is an "Author" page.
That page contains a radio control called "Format and indent" which by default indents only the modified content.
The setting was disregarded in the DITA Maps Manager editor which formatted the entire file and this will be fixed.

About the Preserve empty lines setting you mentioned previously, it is disregarded when working in the Author mode or in the DITA Maps manager because the original XML content is normalized in order to be presented without extra white spaces and the original line break information is lost.

But because of fixing the first setting I mentioned, the line breaks will be preserved in all nodes which are not modified in the DITA Maps Manager editor.

So the behavior will be better but not perfect.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Saving map from DITA Maps Mgr removes blank lines

Post by Radu »

Hi Erlend,

We released Oxygen 15.0 and it should do a better job of perfectly preserving the unmodified parts of the DITA Map on save.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply