Authoring XML Documents Without the XML Tags

Once the structure of the XML document and the required restrictions on the elements and attributes are fixed with an XML schema the editing of the document is easier in a WYSIWYG (what-you-see-is-what-you-get) editor in which the XML markup is not visible.

This tagless editor is available as the Author mode of the XML editor. The Author mode is activated by pressing the Author button at the bottom of the editing area where the mode switches of the XML editor are available: Text, Grid, and Author. The Author mode renders the content of the XML document visually based on a CSS stylesheet associated with the document. Many of the actions and features available in Text mode are also available in Author mode.

Author editing mode

The tagless rendering of the XML document in the Author mode is driven by a CSS stylesheet which conforms to the version 2.1 of the CSS specification from the W3C consortium. Also some CSS 3 features like namespaces and custom extensions of the CSS specification are supported.

The CSS specification is convenient for driving the tagless rendering of XML documents as it is an open standard maintained by the W3C consortium. A stylesheet conforming to this specification is easy to develop and edit in Oxygen XML Author as it is a plain text file with a simple syntax.

The association of such a stylesheet with an XML document is also straightforward: an xml-stylesheet XML processing instruction with the attribute type="text/css" must be inserted at the beginning of the XML document. If it is an XHTML document, that is the root element is an html element, there is a second method for the association of a CSS stylesheet: an element link with the href and type attributes in the head child element of the html element as specified in the CSS specification.

There are two main types of users of the Author mode: framework developers and content authors. A framework developer is a technical person with advanced XML knowledge who defines the framework for authoring XML documents in the tagless editor. Once the framework is created or edited by the developer, it is distributed as a deliverable component ready to plug into the application to the content authors. A content author does not need to have advanced knowledge about XML tags or operations like validation of XML documents or applying an XPath expression to an XML document. The author just plugs the framework set-up by the developer into the application and starts editing the content of XML documents without editing the XML tags directly.

The framework set-up by the developer is called document type and defines a type of XML documents by specifying all the details needed for editing the content of XML documents in tagless mode:

The tagless editor comes with some ready to use predefined document types for XML frameworks largely used today like DocBook, DITA, TEI, XHTML.