W3C home > Mailing lists > Public > xmlschema-dev@w3.org > February 2007

RE: References to a value of an element in another element?

From: Michael Kay <mike@saxonica.com>
Date: Wed, 7 Feb 2007 09:20:34 -0000
To: <noah_mendelsohn@us.ibm.com>
Cc: "'Boris Kolpackov'" <boris@codesynthesis.com>, <ccodere@ieee.org>, "'Pete Cordell'" <petexmldev@tech-know-ware.com>, <xmlschema-dev@w3.org>
Message-ID: <006f01c74a99$39186420$6401a8c0@turtle>

> Everytime something like this comes up our community winds up 
> rediscovering or rediscussing the same tradeoffs. 

And I think the overall experience of language design over the last 50 years
is that in the end, orthogonality is in everyone's best interests: both
implementors and users, not to mention standardizers. Orthogonality means
that wherever you can use an XPath expression (or a SQL expression or a
boolean expression or an arithmetic expression) you can use any XPath
expression (or SQL, etc).

For the user, othogonality provides predictability: you only have to do the
learning once, you only need one reference book, you can cut and paste code
that works in one place and use it in a different place. If a boolean
constraint works in your XForms interface and you want to apply it at the
database level instead, you just pick it up and move it.

For the vendor, orthogonality provides reuse: if the language is the same
regardless where it appears then you only have to implement it once, and you
can get by with a much smaller number of tests. (But I don't think the
vendor's interests should matter anyway. What's good for the user is good
for the vendor.)

SQL, if I remember right, went through the same agonies 30 years ago.
Initially they tried to do integrity constraints using a very small language
for writing conditional expressions, that didn't even allow arithmetic.
Eventually they ended up allowing you to write integrity constraints using
the full power of the SQL language. Most of the last 30 years, in fact,
they've been trying to make the language more orthogonal. Surely we're not
going to make the same mistakes again?

Michael Kay
Received on Wednesday, 7 February 2007 09:20:48 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:11 UTC