W3C home > Mailing lists > Public > xmlschema-dev@w3.org > January 2001

Re: simpleContent and restriction

From: Michael Anderson <michael@research.canon.com.au>
Date: Thu, 01 Feb 2001 11:00:04 +1100
Message-ID: <3A78A704.13BCE128@research.canon.com.au>
To: Arnaud Blandin <blandin@intalio.com>
Cc: xmlschema-dev@w3.org

Arnaud Blandin wrote:

> Hi,
> I have a basic question and I can't find an answer in the XML Schema Specs
> nor in the the list archive:
> given the following
> <complexType>
>         <simpleContent>
>                 <restriction base="type">
>                         <attribute name="foo2" type="something"/>
>                 </restriction>
>         </simpleContent>
> </complexType>
> <complexType name="type">
>         <simpleContent>
>                 <extension base="string">
>                         <attribute name="foo" type="somethingelse"/>
>                 </extension>
>         </simpleContent>
> </complexType>
> this seems to be allowed and I don't think it should be because
> the first 'restriction' acts as an 'extension'.
> I am sure I am missing something, could you please help me?
> Thanks
> Arnaud

Try looking in 4.3.3 of Structures.  The {content type} property of a "Complex
Type Definition with simple content Schema Component" talks about a simple
content that restricts a complex Type that also has a simpleContent.  IMO,
clause 1 says you can only restrict the facets that are among the facets of
the restricted type, thus not allowing you to add an attribute.
Hope this helps a bit,
Received on Wednesday, 31 January 2001 19:00:16 GMT

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