- From: Mark Feblowitz <mfeblowitz@frictionless.com>
- Date: Wed, 10 Jul 2002 09:20:27 -0400
- 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. Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/
Received on Wednesday, 10 July 2002 09:21:09 UTC