[Home] [By Thread] [By Date] [Recent Entries]


Andrew Kuchling wrote:


> But is a DTD-less XML still good for writing up novels and recipes?
> DTDs provide just about the right level of strictness for textual
> data, where ordering of elements is often all that you need and the
> readability of the schema matters.  I'm a bit concerned that dropping
> DTDs will mean the end of such applications.  If you take away DTDs,
> what is there to replace them? 


<rave>
The RELAX NG schema language is a very suitable substitute for
DTDs in such applications.

RNG provides a much richer degree of structural validation:
it can easily handle things like "either an attribute or a child
element, but not both", or multiple content models for elements
depending on their context of occurrence, and it resuscitates the SGML
"&" connector in a new and greatly improved flavor.  RNG uses a "plug-in
datatypes" metamodel for applications that care about datatypes.

There are in practice three surface syntaxes for RNG: the official one,
which is a quite readable XML instance; an informal BNF-like one, which
is even easier for humans to read and write; and XML DTD syntax :-).
The last two syntaxes are supported by open-source converters to
the official syntax.

More at http://www.relaxng.org .  Read the tutorial, not the
specification, unless you enjoy formalisms.
</rave>

-- 
Not to perambulate             || John Cowan <jcowan@r...>
    the corridors               || http://www.reutershealth.com
during the hours of repose     || http://www.ccil.org/~cowan
    in the boots of ascension.  \\ Sign in Austrian ski-resort hotel


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member