forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Crossley <>
Subject experiment with RELAX NG
Date Mon, 11 Feb 2002 06:44:33 GMT
In the last thread, after we got frustrated with DTD limitations
once too often, i said that i would start looking at RELAX NG.
A summary follows, providing a quick-start. The thing that
i am not clear on is whether these are the best tools to build
our capability upon. Someone with more Java should look.

I always get a good feel from this fellow's work and am
excited about the possibilities for our projects.

Here is a dot-point summary of a RELAX NG and validation
trial to ascertain potential for use with Forrest/Cocoon.

* started at

* Downloaded two tools from
- DTDinst ... "converting XML DTDs into XML instance format"
- Jing ... "A RELAX NG validator in Java"
Both are covered by BSD-style licence.

* Used DTDinst to convert a well-known DTD into a RELAX NG
grammar. (The DTD is for our geospatial metadata.) As expected,
automation creates a verbose grammar. However, this is
considered OK for our experiment. Our grammar will probably
eventually be rewritten from scratch.

* Reviewed the excellent tutorial at the OASIS site.

* Used Jing to validate an XML instance that we know is valid
according to our DTD ... all is well. This could also be considered
a test that the grammar that was generated by DTDinst is OK.

* Now try using some XML instances that we know are broken.
Yep, Jing says so too.

* There is an Ant task provided, so it would be easy to hook
up Jing for Forrest.

* The bigger question, someone else should investigate.
Is this a suitable base for building a Cocoon component?
It appears so to me.

* Of course the real work is in writing each grammar. Yes,
the DTDinst will help to transform the Forrest DTDs.

--David Crossley

View raw message