Edit online

When you edit a document in Author mode, Oxygen XML Editor must serialize the resulting document as XML. Oxygen XML Editor serializes the document when you save it or switch to another editing mode. When the document is serialized, Oxygen XML Editor formats and indents the XML document according to the current format and indent settings.

Minimizing Whitespace Differences Between Versions

When serializing a document to XML, Author mode will only format and indent those elements of the document that have been edited. Any element that has not been edited will be serialized exactly as it was loaded from disk. This is useful when your content is managed in a version control systems, as it avoids introducing insignificant whitespace differences between version, which in turn makes diff output easier to read.

Entering Whitespace in Author Mode

Oxygen XML Editor controls the entry of whitespace characters in Author mode according the XML whitespace rules, which means it will not let you insert insignificant whitespace. This means that it will not let you insert extra line-breaks or spaces inside a typical paragraph element, for instance. (Any such whitespace would be normalized away when the document was serialized to XML, so Oxygen XML Editor is saving you from any surprises when this happens.)

Of course, you will legitimately want to enter additional spaces and returns in some cases, such as code samples. Oxygen XML Editor will allow this in elements that are configured as preserve space elements according to the XML whitespace rules. For all of its built-in document types, Oxygen XML Editor is correctly configured to recognize preserve space elements and to allow you to enter additional spaces in them.

If you are using a built-in document type and you are unable to enter additional whitespace, make sure that you are using an element from that document type that is intended to be a preserve-space element.

If you are using a custom document type, make sure that it is configured correctly so that Oxygen XML Editor recognizes that the current element is a preserve-space element.

Serialization Options for Author Mode

The Author preferences page (open the Preferences dialog box (Options > Preferences) and go to Editor > Edit modes > Author) includes a Serialization section that contains some options that control how the formatting and indenting is applied when a document is saved in Author mode or when switching from Author to Text mode. It also includes a Compatibility with other tools option that controls how line breaks are handled when a document is serialized to help obtain better compatibility with other applications.