Once the structure of an XML document and the required restrictions on its elements and their attributes are defined with an XML schema, the editing of the document becomes easier in a WYSIWYG-style editor in which the XML markup is not visible.
This type of tagless editor is available in Oxygen XML Editor as the Author mode. To enter this mode, click the Author button at the bottom of the editing area. 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.
The tagless rendering of an 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. Some CSS 3 features, such as namespaces and custom extensions, of the CSS specification are also supported. Oxygen XML Editor also supports stylesheets coded with the LESS dynamic stylesheet language.
<?xml-stylesheet type="text/css" href="test.css"?>
<?xml-stylesheet type="text/css" href="test.less"?>
<link href="/style/screen.css" rel="stylesheet" type="text/css"/>
Associate XSLT/CSS
Stylesheet action that is available on the toolbar or in the
menu.
New button to add a new CSS or LESS
file.You can read more about associating a CSS to a document in the section about customizing the CSS of a document type.
If a document has no CSS association or the referenced stylesheet files cannot be loaded, a default one is used. A warning message is also displayed at the beginning of the document, presenting the reason why the CSS cannot be loaded.
Oxygen XML Editor provides a Styles drop-down menu on the Author Styles toolbar that allows you to select one main (non-alternate) CSS style and multiple alternate CSS styles. An option in the preferences can be enabled to allow the alternate styles to behave like layers and be combined with the main CSS style. This makes it easy to change the look of the document.
You can select a main CSS stylesheet that styles the whole document and then apply alternate styles, as layers, to specific parts of the document. In the subsequent figure, a DITA document has the Century style selected for the main CSS and the alternate styles Full width, Show table column specification, Hints, and Inline actions are combined for additive styling to specific parts of the document.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 for the content authors. A content author does not need to have advanced knowledge about XML tags, operations such as validation of XML documents, or applying an XPath expression to an XML document. The content author just uses the framework set-up by the developer in the application and starts editing the content of XML documents without editing the XML tags directly.
The framework set-up by the developer is also called document type association and defines a type of XML document by specifying all the details needed for editing the content of XML documents in tagless mode.
The framework details that are created and customized by the developer include:
The tagless editor comes with some ready-to-use predefined document types for XML frameworks such as DocBook, DITA, TEI, and XHTML.
To watch our video demonstration about the basic functionality of the Author mode, go to http://oxygenxml.com/demo/WYSIWYG_XML_Editing.html.