Child pages
  • RELAX-NG Support

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: v1.2.1

...

Overview

RELAX-NG is an emerging alternative to W3C XML Schema, which is said to be very complex and hard learn/use/maintain.

...

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.

Noteinfo

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.

Noteinfo

This is currently still in an experimental stage. The marker sometimes have their own opinion when to appear (smile)

...

Note

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.

Configuration

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.

Noteinfo

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.

...

Note

Currently this requires an explicit xmlns="" declaration to make IDEA recognize the association with the empty namespace. See IDEAIDEADEV-1651623808.

Anchor
background
background

...

  • Display overridden/overrides markers for named patterns
  • Initialize output path for schema conversion, ask to overwrite existing files
  • Bugfixes

Version 1.2.1 (2007-12-13)

  • Fixed some caching issues (changes in schema were not picked up)
  • Suppress duplicate errors from Tools | Validate