RE: Extending a choice model group in the derived type

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 UTC