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

Re: What good is Restriction?

From: Jeni Tennison <jeni@jenitennison.com>
Date: Wed, 10 Jul 2002 08:58:05 +0100
Message-ID: <86332037384.20020710085805@jenitennison.com>
To: xmlschema-dev@w3.org
CC: Mark Feblowitz <mfeblowitz@frictionless.com>

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 03:58:08 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:57 UTC