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 11:04:17 +0100
Message-ID: <117522249665.20021016110417@jenitennison.com>
To: xmlschema-dev@w3.org, Stefan Wachter <Stefan.Wachter@gmx.de>
CC: Paul Warren <pdw@decisionsoft.com>, Simon.Cox@csiro.au

Hi Stefan,

> I thought that if no type is specified for a restricted attribute
> than the type of the attribute in the base type is used.
> Unfortunately, I could not find a definition in the XML
> specification saying this.

No, I don't think that it does. When you define a new complex type by
restriction, you either inherit the entire attribute use or you don't
inherit it at all (in which case there may be a replacement attribute
use defined in the derived type).

> However, the schema for schemas makes frequent use of this copying
> behaviour. For example in the definition of a local simple type it
> restricts the name attribute by the following declaration:
>
>         <xs:attribute name="name" use="prohibited">

Ah, but that's different. All this is doing is *prohibiting* the
(whole) attribute use, preventing it from being inherited from the
base type and hence omitting it from the derived type.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/
Received on Wednesday, 16 October 2002 06:04:19 GMT

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