Re: Restricting a substitution group using <choice>

Hi Mark,

> I've encountered a situation where I need to restrict the membership
> of a substitution group in type "ns1:A" and then, in type "ns2:A"
> which extends type "ns1:A", to have the benefit of including new
> substitution group members that are added in ns2.

I think that in these situations, you should make sure that the new
elements that you add are members of the substitution group of the
elements that you allow in the restricted type.

In your example, rather than making ns2:E4 a member of the ns1:E
substitution group, make it a member of the ns1:E1 or ns1:E2
substitution group.

I think that this makes sense logically -- the reason you want to
allow ns2:E4 is presumably because it is similar in some way to either
ns1:E1 or ns1:E2. You should, I think, articulate those similarities
in a substitution group hierarchy if you can.

> I know I could build ns2:A off of ns1:Base and then re-restrict. But
> what if ns1:A contains extensions or restrictions that belong as
> part of ns2:A? Will I have to maintain ns1:A and ns2:A separately
> and remember to replay edits from ns1:A on ns2:A?

What I'd do, I think, is create an adapter schema that redefined
ns1:A, so that the changes that you make to it ripple through to the
restricted and extended types derived from ns1:A in the rest of the
schema for ns1.

Cheers,

Jeni

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

Received on Friday, 15 March 2002 13:40:02 UTC