Re: Codelists: restricting simpleContent complexTypes

Hi Stefan,

> puh, that's quite complicated. From an implementation perspective I
> prefer to have prohibited attributes explicit and to pass them
> through to derived types.

I think that you could implement it however you want -- as long as you
raise an error when someone tries to extend a type by adding an
attribute that's previously been removed, it doesn't matter what code
causes the error to be raised.

On the other hand, note that "prohibiting" an attribute is something
that goes on at an XML representation level rather than a schema
component level -- at the schema component level, you don't know that
an attribute has been prohibited, only that there's no attribute use
for the attribute on this type whereas on an ancestor type there is.

> But (how I learned today): the type in prohibited attribute
> declarations may (must?) be missing.
>
> Here pops up my next question. Is a type definition in an attribute
> declaration with use="prohibited" simply ignored, is it an error, or
> is it validated to be a subtype? Studying the spec. I found no hint
> that it is forbidden to have a type attribute or an inlined type
> definition for "prohibited" declarations.

I think that it's just ignored. There doesn't seem to be an XML
representation constraint that says that xs:attributes with
use="prohibited" must not have a type attribute or nested
xs:simpleType.

Cheers,

Jeni

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

Received on Wednesday, 16 October 2002 09:28:38 UTC