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

RE: What good is Restriction?

From: Mark Feblowitz <mfeblowitz@frictionless.com>
Date: Wed, 10 Jul 2002 09:20:27 -0400
Message-ID: <4DBDB4044ABED31183C000508BA0E97F040ABD53@fcpostal.frictionless.com>
To: "'Jeni Tennison'" <jeni@jenitennison.com>, xmlschema-dev@w3.org

We do make heavy use of substitution groups, but for other purposes. The
main trouble with using them as you suggest is the maintenance burden of
supporting what ought to be a fairly routine operation: derivation of a
thing in one namespace that reflects the structure of a thing in another
namespace. A substitution chain for each and every component part must be
maintained and, even worse, must have a globally unique name.

Mark Feblowitz                                   	
XML Architect
       [t]   617.715.7231                                     	
       [f]   617.495.0188
Frictionless Commerce Incorporated 	
       [e]  mfeblowitz@frictionless.com
       [w] http://www.frictionless.com
       [m] 400 Technology Square, 9th Floor
             Cambridge, MA 02139 
Open Applications Group Incorporated
       [e]  mfeblowitz@openapplications.org
       [w] http://www.openapplications.org 

 -----Original Message-----
From: 	Jeni Tennison [mailto:jeni@jenitennison.com] 
Sent:	Wednesday, July 10, 2002 3:58 AM
To:	xmlschema-dev@w3.org
Cc:	Mark Feblowitz
Subject:	Re: What good is Restriction?

Mark Feblowitz wrote:
> Furthermore, derivation by restriction creates a nearly impossible
> situation when crossing namespace boundaries. When the content is
> replicated across namespace boundaries, the new content takes on a
> different namespace and thus is no longer recognized as being
> derived. So if I have an oa:DateOfBirth as a child element of
> oa:Person and I restrict oa:Person in myns:Person, replication of
> the child would require that oa:DateOfBirth would become
> myns:DateOfBirth. With "different names," schema validators don't
> recognize these as being related in any way. They all see this as
> having removed oa:DateOfBirth (a legal restriction only if the
> minOccurs of oa:DateOfBirth is 0) and having added a
> myns:DateOfBirth element (an extension, which is illegal in a
> derivation by restriction).

Just to point out that sometimes you might be able to use substitution
groups here. If myns:DateOfBirth was a member of oa:DateOrBirth's
substitution group, the derivation by restriction would be legal. But
that brings its own problems with it, because all the elements that
you want to be the heads of or members of substitution groups have to
be declared globally.



Jeni Tennison
Received on Wednesday, 10 July 2002 09:21:09 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:04 UTC