W3C home > Mailing lists > Public > xmlschema-dev@w3.org > July 2006

Re: Xml Schema profile

From: <noah_mendelsohn@us.ibm.com>
Date: Wed, 19 Jul 2006 16:27:21 -0400
To: lists@jeffrafter.com
Cc: "'Michael Kay'" <mike@saxonica.com>, Paul Kiel <paul@hr-xml.org>, xmlschema-dev@w3c.org
Message-ID: <OF4364396B.276F6090-ON852571B0.006FCCD7-852571B0.00705ED3@lotus.com>
Jeff Rafter writes:

> I agree that the feature is a favorite, but the fact is that it confuses 

> a lot of people when approaching XML Schemas from a type hierarchy 
> perspective.

It's interesting to ask why.  I think it's probably because the 
databinding tools are perhaps trying to do something that XML Schema 
itself mostly does not, which is to define some sort of similarly named 
types across schemas.  With the exception of the built in types, which are 
the same everywhere, XML schema carries no implication at all that the 
type  ns:t as used in one validation episode will be the same as in 

Now consider some particular validation (or databinding) episode.  If 
redefine was used to create that schema, then the named component in the 
schema is the one created by the redefine, and the redefined component 
becomes anonymous and serves as its base type.  Now consider a different 
schema that happens to include the same schema document as the first, but 
does not redefined it.  The same named type ns:t may have a very different 
definition.  Working as designed.  Except for the builtins, named types 
are best thought of as pieces of some particular schema, much as named 
variables are best thought of as parts of some particular computer 

That doesn't mean that you might not want to build systems that try to 
impose some discipline that, for some more limited purposes, the type 
named ns:t is given a similar definition across lots of schemas;  it's 
just that the schema language no more requires you to do that then does 
Java require that the variable "i" be an int in all of your programs.

Noah Mendelsohn 
IBM Corporation
One Rogers Street
Cambridge, MA 02142

Jeff Rafter <lists@jeffrafter.com>
Sent by: xmlschema-dev-request@w3.org
07/19/2006 04:09 PM
Please respond to lists
        To:     noah_mendelsohn@us.ibm.com
        cc:     "'Michael Kay'" <mike@saxonica.com>, Paul Kiel 
<paul@hr-xml.org>, xmlschema-dev@w3c.org
        Subject:        Re: Xml Schema profile

> Jeff Rafter writes:
>  > Actually, support for redefine is fairly surprising.
> Hmm.  That can be read a few different ways. 

Heh. Support for redefine is fairly robust and widespread. I would say 
that as recently as a year ago I ran into problems with the redefine 
feature in validators-- more recently however I have found the problems 

In general there is little or no support for redefine in databinding 
tools. My thinking was that they would follow the pattern that Michael 
set forth which is to use the last effective redefine and never redefine 
a used type. It is a simplification, but it is sensible.

I agree that the feature is a favorite, but the fact is that it confuses 
a lot of people when approaching XML Schemas from a type hierarchy 
perspective. It also confuses a lot of validators when you get strange 
naming rules involved in the grammar (e.g. chameleon components). That 
leaves little room in between. That's the space where it makes sense. 
Especially for extending fixed schemas to add components from third 

Received on Wednesday, 19 July 2006 20:27:34 UTC

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