Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Xml Schema profile

From: noah_mendelsohn@--.---.---
To: lists@----------.---
Date: 7/19/2006 12:27:00 PM
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 
another.

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 
program. 

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
1-617-693-4036
--------------------------------------








Jeff Rafter <lists@j...>
Sent by: xmlschema-dev-request@w...
07/19/2006 04:09 PM
Please respond to lists
 
        To:     noah_mendelsohn@u...
        cc:     "'Michael Kay'" <mike@s...>, Paul Kiel 
<paul@h...>, xmlschema-dev@w...
        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 
gone.

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 
parties.

Cheers,
Jeff




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent