cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Colin Paul Adams <>
Subject RELAXNG grammar for sitemap
Date Thu, 24 Oct 2002 16:52:08 GMT
I have used the rng tool to generate a grammar for sitemap.xmap, from
sitemap-v04.dtd (patched version). I did this just to see how
difficult it was. As expected, it did not work automatically - I had
the same problem with dtd2xsd when trying to generate a WXS grammar.

The problem is the DTD effectively has two namespaces - the map:
namespace and the global namespace. I guess as DTDs do not support
namespaces, the conversion tools do not attempt to cope with this.

Still, I was able to systematically correct the grammar, so I could
automate the process with an emacs macro or some such.

The generated grammar is equivalent to the DTD grammar, and as such
fairly loose. I could go on to express the rules better now
(e.g. map:components should have at most one child of each type, but
in any order). Then perhaps write an ant validation task, or maybe
runtime validation through an coccon.xcong option?
Colin Paul Adams
Preston Lancashire

To unsubscribe, e-mail:
For additional commands, email:

View raw message