W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2002

Re: Codelists: restricting simpleContent complexTypes

From: Jeni Tennison <jeni@jenitennison.com>
Date: Wed, 16 Oct 2002 14:28:36 +0100
Message-ID: <126534507441.20021016142836@jenitennison.com>
To: xmlschema-dev@w3.org, Stefan Wachter <Stefan.Wachter@gmx.de>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:34 GMT