Inlined simle type in complex restriction derivation with simple content

Dear all,

The complex type derivation with a simple content restriction allows an
inlined simple type:

<xs:complexType name="D">
   <xs:simpleContent>
     <xs:restriction base="B">
       <xs:simpleType>
         <xs:restriction base="xs:string"/>
       </xs:simpleType>
     </xs:restriction>
   </xs:simpleContent>
</xs:complexType>

In this situation the derived type D has two "base types": 1. The type B,
that must be a complex type with simple content and 2. the built-in string
type. Admittedly, "string" is not the base type of D but the base type of the
content type of the derived type.

In order that every valid instance of type D is also a valid instance of
type B it must be ensured that the content type of D is a restriction of the
content type of D. This is very difficult to check (think about pattern
constraints!).

In addition, there seems to be no mandatory reason why an inlined simple
type definition is allowed in simple content restrictions. The simple 
content of
the derived complex type can be restricted by facets in the usual way.

Therefore I propose to cancel this feature, i.e. not to allow inlined simple
types in simple content restrictions.

Thanks for your attention,
--Stefan

Received on Thursday, 15 August 2002 21:21:37 UTC