<oXygen/> provides a special type of editor for Relax NG schemas. This editor presents the usual text view of an XML document synchronized in real time with an outline view. The outline view has two display modes: the standard outline mode and the components mode.
<oXygen/> provides a simple, expressive and easy to read Schema Diagram View for Relax NG schemas.
With this new feature you can easily develop complex schemas, print them on multiple pages or save them as JPEG, PNG and BMP images. It helps both schema authors in developing the schema and content authors that are using the schema to understand it.
<oXygen/> is the only XML Editor to provide a side by side source and diagram presentation and have them synchronized in real-time:
the changes you make in the Editor will immediately be visible in the Diagram (no background parsing).
changing the selected element in the diagram will select the underlaying code in the source editor.
When you create a new schema document or open an existing one the Editor Panel is divided in two sections: one containing the Schema Diagram and the second the source code. The Diagram View has two tabbed panes offering a Full Model View and a Logical Model View.
The following references can be expanded in place: patterns, includes and external references. This coupled with the synchronization support makes the schema navigation easy.
All the element and attribute names are editable: double-click on any name to start editing it.
The Full Model View renders all the Relax NG Schema patterns with intuitive symbols:
a define pattern with the name attribute having the value equal to the string from the rectangle
a define pattern with the combine attribute having the value interleave and the name attribute having the value equal to the string from the rectangle
a define pattern with the combine attribute having the value choice and the name attribute having the value equal to the string from the rectangle
an element pattern with the name attribute having the value equal to the string from the rectangle
an attribute pattern with the name attribute having the value equal to the string from the rectangle
a ref pattern with the name attribute having the value equal to the string from the rectangle
a oneOrMore pattern
a zeroOrMore pattern
an optional pattern
a choice pattern
a value pattern, used for example inside a choice pattern
a group pattern
a pattern from the Relax NG Annotations namespace (http://relaxng.org/ns/compatibility/annotations/1.0) which is treated as a documentation element in a Relax NG schema
a text pattern
an empty pattern
The Logical Model View presents the compiled schema which is a single pattern. The patterns that form the element content are defined as a top level pattern with a generated name. The name is generated depending of the name class of the elements.
The contextual menu offers some actions:
Append child Append a child to the selected component.
Insert Before Insert a component before the selected component.
Insert After Insert a component after the selected component.
Edit attributes Edit the attributes of the selected component.
Remove Remove the selected component
Show only the selected component Depending on its state(selected/not selected), the selected component is the single component shown in the diagram or all the diagram components are shown.
Show Annotations Depending on its state (selected/not selected), the documentation nodes are shown or hidden.
Auto expand to references This option controls how the schema diagram is automatically expanded. For instance if you select it and then edit a top level element or you make a refresh, the diagram will be expanded until it reaches referred components. If this is left unchecked, only the first level of the diagram is expanded, showing the top level elements.
For large schemas, the editor disables this option automatically.
Collapse Children Collapse the children of the selected view
Expand Children Expand the children of the selected view.
Print Selection... Print the selected view.
Save Selection as Image... Save the current selection as JPEG, BMP or PNG Image.
Refresh Refreshes the Schema Diagram according to the changes in your code (changes in your imported documents or those that are not reflected automatically in the compiled schema).
If the schema is not valid you will see an error message in the Logical Model View instead of the diagram.
The Relax NG Outline View presents a list with the patterns that appear in the
diagram in both the Full Model View and Logical Model View cases. It allows a quick
access to a component by knowing its name. It can be opened from
standard
outline by pressing the
button.