<< September 17, 2003 | Home | September 19, 2003 >>

RELAX NG, jing, trang, ...

Once in a while, a piece of software grabs your attention, and you are irreversibly hooked. And you want to explore it more.

Learning nXML, which is fun in itself, leads me to a sequence of websites, documents, and technologies. Ones you don't hear mentioned in the press.

First, nXML uses RELAX NG Compact Syntax for validation. It looked like this:

element addressBook {
  element card {
    element name { text },
    element email { text }
  }*
}

Then there are the tools jing and trang. The former is a validator for RELAX NG. The latter is a schema converter amongst dtd, rng, rnc, xsd schema languages. Both work with either the JDK or gcj (compile into native executables).

The command

$ trang status.dtd status.rnc
translates status.dtd into RELAX NG Compact (rnc) format. And now I can edit my weekly status report in nXML. The command
$ jing -c status.rnc WeiqiGao-2003-09-13.xml
validates the XML file.

Everything worked, with the minimal amount of fuss. No silly "You have to use Ant to use our tool" requirement. The

$ configure; make; make install
command makes the commands available, just like thousands of other utilities. And they are fast.

Finally there is this very readable tutorial written by James Clark, John Cowan and Murata Makoto. James and Murata are the creators of RELAX NG.

There is hope!