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



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

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:58 UTC