5. Rngvalid command reference

rngvalid ?validate_options? relax_ng_schema ?gen_doc_options? ?xml_doc ... xml_doc?

Checks a RELAX NG schema (supports both XML and compact syntax) for validity. Checks one or more XML documents for validity against a RELAX NG schema.

Note that the <?xxe-relaxng-schema> processing instruction is not supported by rngvalid. Therefore, even when foo.xml contains such processing instruction, it is not possible to simply execute "rngvalid foo.xml".

This command is based on Jing, an OpenSource, industrial strength, streaming validator written by James Clark. The implementation of W3C XML Schema Datatypes used in RELAX NG schemas (e.g. xsd:int) is the work of XMLmind. XMLmind also added support for attribute default values as specified in RELAX NG DTD Compatibility.

Validation options:

-v

Be verbose. Default: be quiet.

-c

Specifies that relax_ng_schema uses the compact syntax.

Default: if file suffix is '.rnc' assume compact syntax otherwise assume XML syntax.

-e rnc_charset

Specifies the character encoding of the schema using the compact syntax.

Default: platform default encoding.

Options of the documentation generator:

-gendoc doc_dir

Generate documentation in directory doc_dir.

Default: do not generate documentation.

-css CSS_URL

Specifies which CSS style sheet to use in the generated HTML.

Default: no CSS.

-charset html_charset

Specifies the character encoding of the generated HTML.

Default: platform default encoding.

-xxe

Add annotations which are useful when the RELAX NG schema is used by XMLmind XML Editor.

Default: don't annotate.

This command is XML catalog aware. This command will use the XML catalogs specified in environment variable XML_CATALOG_FILES. This variable must contain one or several XML catalog file names or URLs separated by a semi-colon (';').

XML catalogs may be used to resolve URLs found in include and externalRef elements. Note that the equivalent notations in the compact syntax are not XML catalog aware.

Examples: