Re: Choice

Jeni Tenison writes (regarding possible support of Schematron):

>> I'd hope so, personally, because I don't think there's
>> any way for XML Schema to articulate everything 
>> about a markup language without supporting a rules-based 
>> approach. 

I'd be a little careful about implying that we might somehow create a 
language that would "articulate everything".  The only way we would come 
close would be to include a Turing complete programming language.   The 
results would be imperative rather than declarative, and would have a 
variety of drawbacks.  Even with Schematron, there are all sorts of 
constraints you can't express.  A favorite from our WG discussions:  "the 
contents of this field must be a prime number."   A basic, extraordinarily 
useful constraint for a mathematician.  Easy to express in languages such 
as Java, C, etc., but unlikely to be achievable in declarative languages 
(unless handled as a built in special case.)  People doing business don't 
want just to know that something looks like a credit card number, they 
want to check a database to make sure it's not stolen.   Or maybe we're 
describing a rectangle and the number of child elements should be no more 
than the product of a width and a height attribute (I suspect Schematron 
can indeed to do this.) 

The point is that, as we say in the rec, the purpose of the schema 
language is to capture a useful set of constraints;  we can't possibly 
capture "every" useful constraint.  What's useful is a value judgement.  I 
agree completely that co-occurrence constraints are important, that the 
set we currently handle aren't sufficiently powerful for many purposes, 
and that XPath based systems such as Schematron are among those that point 
the way for doing better.  I hope we consider such enhancements to XML 
Schema for a possible version 2.0.  When we do we'll have to consider a 
variety of issues including expressive power, performance, ability to 
support streaming, integration with our type system, etc.  I did want to 
make the point that, when we're done, almost no matter what we do, we'll 
still be having discussions on this mailing list about all the useful 
constraints that we still can't model.

------------------------------------------------------------------
Noah Mendelsohn                              Voice: 1-617-693-4036
IBM Corporation                                Fax: 1-617-693-8676
One Rogers Street
Cambridge, MA 02142
------------------------------------------------------------------

Received on Friday, 8 March 2002 11:22:45 UTC