Tod Olson wrote:
> Along these lines, it is interesting that both TEI and DocBook are
> migrating their DTD implementations to RelaxNG. While they focus on
> document encoding rather than metadata, they are complex and
> well-established markup schemes. What I've not seen is an account of
> why those projects have chosen to migrate to RelaxNG over XSD.
Norm Walsh has blogged on the DocBook NG development process, which
includes some stuff on RNG (particularly the third one):
http://norman.walsh.name/2003/05/21/docbook
http://norman.walsh.name/2003/05/29/moredocbook
http://norman.walsh.name/2004/01/01/absinthe
http://norman.walsh.name/2003/06/11/oneNSorMany
And Sebastian Rahtz on RNG and TEI:
http://www.xmluk.org/slides/RAL_2004/RAL-2004-Rahtz.pdf
Both projects will (using Trang) provide DTD and XSD versions of their
next generation NG schemas, but have settled on RNG as the source
language because--quite frankly--it is better. It's really that simple.
1. It is easier to use and maintain.
2. It can express more powerful constaints then either XSD or DTD.
3. Tools that are the basic stuff of many developers' toolbox (emacs,
libxml, etc.) support RNG but not XSD. Ruby's built-in XML parser now
has RNG support.
4. Trang allows one to easily generate XSD and DTD versions.
OpenOffice is another really large project that has settled on using RNG
to develop the schema, and using Trang to automatically generate
alternative representations.
http://www.oreillynet.com/pub/wlg/4658
Finally, there's Atom. If you read the spec, you will note it has very
practical requirements spelled out in plain English (like "This
specification assigns no significance to the order of appearance of the
child elements of atom:head."). RNG is the only language that can fully
represent the spec.
See Eric van der Vlist's book on RELAX NG:
http://books.xmlschemata.org/relaxng/page2.html
... and in particular:
http://books.xmlschemata.org/relaxng/ch03s06.html
He's also written a book on XML Schema, so is well-qualified to compare
the two languages. Guess which he prefers.
My basic point is that the move to a schema library can provide the
basis to rethink development a bit. The LoC should not be providing its
schemas in only a single (poorly-designed) language, no matter what
industry backing is behind it.
More broadly, I think it would be valuable to step back and think about
the goals of these schemas totally apart from implementation approach
and technology. Too much of MODS/MADS is structured on the limitations
of XSD.
Bruce
|