Re: Restriction of complex types by changing minOccurs

Hi Mike,

> Given your comment on the note, I proceeded to explicitly define a
> base and derived type for Container and used these in the
> corresponding Base and Restricted type, but still get the same
> error.

The schema looks fine to me. I might have missed something, but I
suspect that Xerces-J-1.4.1 has a bug. You might try using Xerces-J 2
instead?

> I suspect I still haven't quite understood. Specifically, I didn't
> understand what Eric meant by
>
> "This would limit the recursion to the top level of complex type
> definitions, which seems reasonable..."

I think he meant that when you restrict a complex type, the schema
processor doesn't keep looking down the type/element/type/element
hierarchy, expecting a (restrictive) change in the content of each
element. Instead, you have to explicity specify that an element's type
is a restriction of the base element's type.

> I would have thought that I could be an arbitrary number of element
> definitions deep, but provided the named type I use is a valid
> restriction of the one used in the base definition, I should be ok.

Yes, I think you are correct in that.

Cheers,

Jeni

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

Received on Wednesday, 14 November 2001 06:50:19 UTC