The schema diagram simplifies the development and understanding of the Relax NG schema files. oXygen offers a side by side presentation of the schema source and diagram. The diagram is synchronized in real time with the source editor: selecting an element in the diagram highlights the corresponding element in the source editor, while moving the caret in the source editor changes the selection in the Diagram view.
The schema diagram renders all the Relax NG components and allows you to quickly navigate to the referred definitions of elements, attributes, types, groups, patterns, etc.
Two types of visual diagram are available for a schema: the Full Model view and the Logical Model view.
The Full Model view provides a one-to-one correspondence between the schema components and the graphical nodes. References to different components can be expanded in place in the diagram (for instance, element or attribute references, base types, or schemas the pattern references).
The Logical Model view displays a more compact diagram obtained by applying the simplification rules.
A list with the defined schema components (elements, attributes, patterns, etc.) presented in the Outline view simplify the navigation through large schemas.
No matter the schema language, the smooth editing and the clear and suggestive rendering make schema editing more fun and easier than ever.
The Visual Relax NG Schema Editor is integrated in the oXygen standalone distribution and the Eclipse IDE plugin. It is activated when opening an RNG (Relax NG XML Syntax) file.
Editing actions are available on the Full Model view allowing the addition of new child or sibling elements on the fly so that the schema remains valid.
You can easily change the font used for the diagram and the diagrams can also be made smaller or larger depending on the zoom settings available in the oXygen Preferences. These settings are taken into account when the diagram is printed.
The Relax NG schema documentation is presented by the new content completion support. The Content Completion Assistant offers additional information for the element and attribute proposals. It will look up the schema annotation and will make the documentation available to the user in a simple and elegant manner.
The Model view provides schema-related information for the document elements and attributes. The content model, the element type, the attributes, the attribute type and constraints are presented in a compact manner giving you the insight of the document schema while editing or browsing the document.
This action allows renaming any named defines. The scope can be set to the current file, all the files in project or the set of files determined by include/import instructions staring with a specified file.
A preview option allows to review and approve the changes that will be made on multiple schemas. The changes are presented in a side by side synchronized view that compares the initial version with what will result after applying the refactoring action.
You can find either declarations or references of Relax NG defines. The search scope can be the current file, the current project or a group of files.
The converter allows you to convert a DTD or Relax NG (full or compact syntax) grammar or a set of XML files to an equivalent XML Schema, DTD or Relax NG (full or compact syntax) grammar. Where perfect equivalence is not possible due to limitations of the target language oXygen will generate an approximation of the source grammar. The conversion functionality is available from Tools / Generate/Convert Schema .
A grammar being edited can be converted with a toolbar button if that grammar can be the subject of a supported conversion. For example, if you press the "Convert to ..." button while editing a DTD document, the following dialog will show up:
You can set the target language of the conversion and the target grammar name.
Advanced options allow the user to customize different conversion parameters.