Table of Contents
- Background: Why RELAX-NG?
- Version History
RELAX-NG is an emerging alternative to W3C XML Schema, which is said to be very complex and hard learn/use/maintain.
The following sections list some of the main features, like on-the-fly error highlighting, code completion and refactoring. For a quick start, please see the section |#Configuration.
Error Highlighting for RELAX-NG Files
Not quite an error, but just like IDEA highlights other unused symbols, the plugin provides an inspection that looks for named patterns that aren't used anywhere and can be removed. This helps to create and maintain schemas that don't contain any unnecessary overhead.
The Unused Define Inspection is not enabled by default. It can be enabled in Settings | Errors | RELAX-NG
For any pattern-definition that overrides a definition from an included file, an "overrides" marker will be displayed. For the overridden definition, an "is overridden" marker is displayed, both with the possibility to navigate to the respective target when clicking the gutter-icon.
This is currently still in an experimental stage. The marker sometimes have their own opinion when to appear
The line and column numbers that are displayed in the messages toolwindow are off by one. This is an open IDEA bug: IDEADEV-23382. This is said to be fixed in IDEA 7.0.3.
There's really not much to configure to make use of the plugin's support for working with RELAX-NG. Schemas in XML syntax are automatically recognized in any XML file by their namespace URI. Additionally, the extension "rng" is, if not already done, automatically registered with the XML file type. Compact Syntax files are recognized in files with the extension "rnc" by default, but this can be customized via
Settings | File Types by mapping any other extension to the "RELAX NG Compact Syntax" file type.
To get the full support when editing XML documents, the document's root tag namespace should be mapped to a RELAX-NG schema that describes the document. This can be done either by using IDEA's automatic download (the "Fetch External Resource" Quick Fix) in case the namespace URI directly references a RELAX-NG file or by manually setting up such a mapping via
Settings | External Resources.
To ensure the association between the XML and the RELAX-NG schema works correctly, one of the target namespace URI(s) of the schema must match the URI it is registered for.
- Display overridden/overrides markers for named patterns
- Initialize output path for schema conversion, ask to overwrite existing files
Version 1.2.1 (2007-12-13)
- Fixed some caching issues (changes in schema were not picked up)
- Suppress duplicate errors from Tools | Validate
Version 1.2.2 (2008-01-22)
- Fixed path issue in JARs on non-Windows systems
- Support for IDEA 8.x
Version 1.5.3 (2009-03-16)
- Correct attribute value validation for token datatype
Version 1.5.4 (2010-04-13)
- Support for IDEA 9.x