Re: simpleContent and restriction

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,
mick.

Received on Wednesday, 31 January 2001 19:00:16 UTC