Lists Home |
Date Index |
> -----Original Message-----
> From: John Cowan [mailto:firstname.lastname@example.org]
> Sent: Thursday, May 23, 2002 11:25 AM
> To: "Bullard, Claude L (Len)"
> Cc: email@example.com
> Subject: Re: [xml-dev] DTDs, W3C Schemas, RELAX NG, Schematron?
> "Bullard, Claude L (Len)" scripsit:
> > Please elaborate on how RELAX is more powerful than XSD.
> 5) RNG allows a (simple) datatype to be restricted not only by facet,
> but by explicit extension and exception. One can write 'xsd:integer -
> "0"' to mean a nonzero integer (although unfortunately "00" will still
> validate), or 'xsd:integer | "Inf" | "+Inf" | "-Inf"' when a value may
> be integral or infinite.
Wow! I was knocked out by this one. What good are datatypes if one can
work in terms of the value space of the type rather than the lexical
As imperfect as XML Schemas may or may not be, I believe the distinction
between lexical and value spaces is critically important, which is why
the constraining facets defined in Part II work in terms of value space,
not lexical space (with pattern being the unique hybrid).
In general, I think the focus on syntax and specific features of the
schema languages themselves is a bit of a red herring.
I've found that the most important difference between RNG and XML
Schemas is wrt the underlying type model.
Specifically, XML Schema uses named types to implicitly convey intention
as well as structure (a la Java, C++, C#). Anonymous types are 2nd class
citizens in XML Schema (they're type-equivalent with nothing).
Relax NG has a much looser model (a la Perl) in which two things are
compatible if they share structure independent of a common, named type
Each approach appeals to its own community of users in very deep ways.
This explains the almost rabid hyperbole from both sides, especially
when someone makes an off-the-cuff Star Trek-TNG reference during a
keynote talk ;-)