Lists Home |
Date Index |
- From: Matthew Fuchs <email@example.com>
- To: XML-Dev Mailing list <firstname.lastname@example.org>
- Date: Thu, 10 Feb 2000 15:11:23 -0800
This is actually not a simple question and deserves an appropriate answer.
You are not the only person to ask this. An XML schema language _does not_
need both <element> and <type>. SOX , for example, is an XML schema
language that only has one abstraction for both of these at the top level.
However there is _a_ point of view which holds the beginning of Henry's
answer as an axiom and therefore requires, ab initio, that there are two
fundamentally different things. I would compare it, by analogy, to Euclid's
5th axiom, that parallel lines never meet. (I'm tempted to use Copernican
cosmology as my analogy, but that would be inflammatory.)
The Euclidean point of view held sway in the Schema WG. Therefore XML
Schema (note the caps) created a type system with two fundamentally
different kinds of types, <element> and <type> which behave in different
ways. (And don't ever let anyone try to tell you that a global <element>
declaration is not a type definition as you'd understand it from type
theory. It simply is not a <type> definition.) Within that type system,
Henry's answer is a tautology. This decision had other ramifications, such
as allowing as many symbol spaces as can dance on the head of a pin and (I
believe) element equivalence classes. But that's the type system we'll be
using - and it's certainly useable.
I've consoled myself by realizing it's not hard to specify a <metatype>
which unifies both <element> and <type> and therefore leaves open the
possibility of evolving to non-Euclidean markup in the future.
The XML Schema language will soon be moving to Candidate Recommendation
status (we hope). During that time we will be looking for implementation
feedback. If your experience shows that the type system enforced by the
current language is ill-fitted to your requirements, make that known. CR is
when you get to show we're wrong.
> -----Original Message-----
> From: email@example.com [mailto:firstname.lastname@example.org]
> Sent: Thursday, February 10, 2000 5:30 AM
> To: XML-Dev Mailing list
> Subject: Schema concepts (was Re: W3C public lists (was Re:
> The Power of
> Stefan Haustein <email@example.com> writes:
> > If that holds not only for Simon, I would like to ask why XML schema
> > needs both <element> and <type>. It looks like they both correspond
> > to the class concept in OOP. See
> Because several elements may share a type: this is illustrated in the
> lengthy example in chapter 2 in the current PWD . If having looked
> at that you still don't understand, please come back with a question
> based on that example if possible.
>  http://www.w3.org/TR/xmlschema-1/#concepts-types