[ANN] RELAX-NG Support 0.9

It has taken a bit longer than originally planned, but I'm proud to release the first public version
of the RELAX-NG (http://www.relax-ng.org) support plugin for IntelliJ IDEA 7.0.x. The plugin can be
installed through IDEA's plugin manager and is also available here:

  • Features

The plugin provides IDEA with the capability to edit RELAX-NG schemas, with on-the-fly error
checking, quick fixes & completion - both for schemas using the XML syntax as well as the compact

It also provides validation and code completion for XML instance documents. This works just like
IDEA's built-in support for XML Schema that uses the schema file that is associated with a certain
namespace URI for the validation & completion of elements in this namespace.

Using and setting up a RELAX-NG schema is just as easy as using an XML Schema, either by
automatically downloading it with the "Fetch external resource" intention or by setting up a mapping
via Settings -> Resources.

While the plugin provides IDEA with some basic knowledge of which elements/attributes are possibly
allowed at a certain point, it delegates the full-blown validation against the schema to the popular
RELAX-NG validator "Jing" (http://www.thaiopensource.com/relaxng/jing.html) and maps its output into
IDEA's editor. This assures high-quality validation results.

A more complete feature overview will be posted soon.

  • Some background: RELAX-NG vs. XML Schema

Well, there's been a lot of criticism about XML Schema recently, namely it's said to be overly
complex, hard to learn, read & write and it's even inconsistent in certain aspects, e.g. regarding
the treatment of elements and attributes.

RELAX-NG is significantly easier to learn, read & write even for a casual user while at the same
time it is more powerful than XML Schema in certain aspects.

Many more compelling reasons to use RELAX-NG can be found here:

  • Known Issues

- Using Tools -> Validate from the Main Menu does not work currently because it is hard-coded to do
an XML Schema validation and obviously Xerces does not understand any RELAX-NG and will produce a
bunch of errors (http://www.jetbrains.net/jira/browse/IDEA-15388).

- Especially the compact syntax editors may occasionally show semantically duplicate error messages.
This can happen due to IDEA showing both the plugin's parse errors as well as the ones from the
external parser.

- There are some caching issues regarding the highlighting updates when a schema changes which would
make an instance document valid/invalid.

  • Feedback

Please let me know about any bugs you encounter or if there's anything you think should be improved
or added. And of course messages like "It's been about time IDEA gets RELAX-NG support" are
appreciated as well ;)

Happy RELAXing,


Please sign in to leave a comment.