There are several major aspects of white-space handling in the <oXygen/> Author editor when opening documents or switching to Author mode, saving documents or switching from Author mode to another one and editing documents.
When deciding if the white-spaces from a text node are to be preserved, normalized or stripped, the following rules apply:
If the text node is inside an element context where the xml:space="preserve" is set then the white-spaces are preserved.
If the CSS property white-space is set to "pre" for the node style then the white-spaces are preserved.
If the text node contains other non-white-space characters then the white-spaces are normalized.
If the text node contains only white-spaces:
If the node has a parent element with the CSS display property set to inline then the white-spaces are normalized.
If the left or right sibling is an element with the CSS display property set to inline then the white-spaces are normalized.
If one of its ancestors is an element with the CSS display property set to table then the white-spaces are striped.
Otherwise the white-spaces are ignored.
The Author editor will try to format and indent the document while following the white-space handling rules:
If text nodes are inside an element context where the xml:space="preserve" is set then the white-spaces are written without modifications.
If the CSS property white-space is set to "pre" for the node style then the white-spaces are written without any changes.
In other cases the text nodes are wrapped.
Also, when formatting and indenting an element that is not in a space-preserve context, additional Line Separators and white-spaces are added as follows:
Before a text node that starts with a white-space.
After a text node that ends with a white-space.
Before and after CSS block nodes.
If the current node has an ancestor that is a CSS table element.
You can insert space characters in any text nodes. Line breaks are permitted only in space-preserve elements. Tabs are marked in the space-preserve elements with a little marker.
CDATA sections, comments, processing instructions have by default the white-space CSS property set to "pre" unless overridden in the CSS file you are using. Also they are considered to be block nodes.
The number of differences between versions of the same file saved by different content authors on different computers can be minimized by imposing the same set of formatting options when saving the file, for all the content authors. An example for a procedure that minimizes the differences is:
Create an <oXygen/> project file that will be shared by all content authors.
Set your own preferences in the following panels of the Preferences dialog: Editor / Format and Editor / Format / XML.
Save the preferences of these two panels in the <oXygen/> project by selecting the button Project Options in these two panels.
Save the project and commit the project file to your versioning system so all the content authors can use it.
Make sure the project is opened in the Project view and open your XML files in the Author mode and save them.
Commit the saved XML files to your versioning system.
When other content authors will change the files only the changed lines will be displayed in your diff tool instead of one big change that does not allow to see the changes between two versions of the file.