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.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/

Received on Wednesday, 10 July 2002 03:58:08 UTC