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

RE: Extending a choice model group in the derived type

From: Mark Feblowitz <mfeblowitz@frictionless.com>
Date: Thu, 22 Aug 2002 14:07:57 -0400
Message-ID: <4DBDB4044ABED31183C000508BA0E97F040ABF28@fcpostal.frictionless.com>
To: "'Dare Obasanjo'" <dareo@microsoft.com>, XMLSCHEMA-DEV@w3c.org

Substitution groups would indeed be one way to go. You'd have "x" and "y" be
in some substitution group with abstract head element "head", and then add
"z" to that substitution group. They'd all have to be of the same type as
"head", or some derivation. 

Unfortunately, when you do this, you end up converting x, y, and z to being
global elements. If that's not a problem, then you're fine. But if they are
not globally unique, you buy the problem of having to come up with globally
unique names, and thus make your content model a bit less readable and a bit
more arcane.

Things get messy, too, when you want anything other than simple cardinality
(one and only one). If, e.g., you wanted all things of type D to have one or
more of an x, a y or a z, but not an intermixing x's, y's, and z's, I
believe you're out of luck.

-----Original Message-----
From: Dare Obasanjo [mailto:dareo@microsoft.com]
Sent: Thursday, August 22, 2002 1:39 PM
To: XMLSCHEMA-DEV@w3c.org
Subject: Extending a choice model group in the derived type


If I have a base type B with the following content mode

B = (x | y)

is there a way to create a derived type D with content model

D = (x |y |z)



I thought of extension but at best I can create

D = (x|y) z

Restriction similarly doesn't work. Perhaps there is some clever way to do
this with substitution groups I haven't thought of.
Received on Thursday, 22 August 2002 14:08:31 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:34 GMT