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 referenced definition of elements, attributes, types, groups, or patterns.
Two types of visual diagrams 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 within the diagram (for instance, element or attribute references, base types, or schemas that the pattern references).
The Logical Model view displays a more compact diagram obtained by applying the simplification rules.
A list of the defined schema components (elements, attributes, patterns, etc.), presented in the Outline view, simplifies the navigation through large schemas.
Regardless of 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 in 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 you can also make the diagrams smaller or larger, depending on the zoom settings available in Options / Preferences / Editor / Edit modes / Schema Design. These settings are used 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. The documentation for the schema annotations is displayed in a simple and elegant manner.
The Model view provides schema-related information for the document elements and attributes. The content model, element type, attributes, 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 you to rename any defined names. The scope can be set to the current file, all the files in project, or the set of files determined by include/import instructions starting with a specified file.
A preview option allows you 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 components. 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 exact 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 appear:
You can set the target language of the conversion and the target grammar name.
Advanced options allow the user to customize various conversion parameters.