Powered by SmartDoc

RELAX Importer

The RELAX importer reads both RELAX Core and RELAX NG schemas. The use the RELAX importer, the suffixes for the arguments must be one of the following:

Example

List 4.2.1.1[hello.rng] is a sample RELAX NG schema.

hello.rng
<?xml version="1.0" encoding="UTF-8" ?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
         datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
  <start>
    <ref name="greeting"/>
  </start>
  <define name="greeting">
    <element name="greeting">
      <attribute name="date">
        <data type="date"/>
      </attribute>
      <attribute name="from">
        <data type="token"/>
      </attribute>
      <attribute name="to">
        <data type="token"/>
      </attribute>
      <element name="title">
        <data type="token"/>
      </element>
      <element name="message">
        <data type="token"/>
      </element>
    </element>
  </define>
</grammar>

To import a RELAX schema, simply specifies a schema file as follows:

RELAX NG
$ relaxer hello.rng

As a result, Relaxer generates four files, as follows: