Re: Schema Question (abstract/enforce)

Hi Shyam,

> Thanks for the response. I was thinking more like an abstract local
> element (Just to ensure that the derived type does have this
> element). The content is not known in the base type.

I think that we might be misunderstanding each other due to
terminology here. An abstract local element (by which I take it you
mean a local element declaration whose abstract attribute is set to
true) essentially makes the content model unworkable - the element
can't have any instances itself, and it can't be the head of a
substitution group (i.e. have other elements swapped in) because it
isn't a global element.

Perhaps you mean a local element with an abstract type? If so, then
yes, you can do that - make the abstract type a global type. You can
then either use xsi:type to point to the derived type that you want to
use for the content of the element in the instance document; or you
can derive (by restriction) other types from the type containing the
element, each declaring a different content for that element (as long
as the derivations from the abstract type were restrictions).

Cheers,

Jeni

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

Received on Tuesday, 22 January 2002 07:14:00 UTC