| Rank: Advanced Member 
 Joined: 1/23/2016
 Posts: 54
 
 | Hi, 
 I got an error using complex type for base (xs:restriction base=beam:integer ...) :
 
 File ... xsd is not valid.
 Type '{anonymous}' is not a valid restriction of type 'beam:integer'. (see Details)
 Error location: xs:schema / xs:complexType / xs:sequence / xs:element / xs:simpleType
 Details
 cos-st-restricts.1.1: The base type definition 'beam:integer' must be an atomic simple type definition or a built-in primitive data type.
 
 According to http://www.w3schools.com/xml/el_restriction.asp, Example 4 also ComplexType can be used (see below).
 
 What is right ?
 
 Thanks Michel
 
 <xs:sequence>
 <xs:element name="firstname" type="xs:string"/>
 <xs:element name="lastname" type="xs:string"/>
 <xs:element name="country" type="xs:string"/>
 </xs:sequence>
 </xs:complexType>
 
 <xs:complexType name="Norwegian_customer">
 <xs:complexContent>
 <xs:restriction base="customer">
 <xs:sequence>
 <xs:element name="firstname" type="xs:string"/>
 <xs:element name="lastname" type="xs:string"/>
 <xs:element name="country" type="xs:string" fixed="Norway"/>
 </xs:sequence>
 </xs:restriction>
 </xs:complexContent>
 </xs:complexType>
 
 
 
 
 
 
 
 | 
	| Rank: Advanced Member 
 Joined: 12/13/2005
 Posts: 2,856
 Location: Mauritius
 
 | XMLSpy is right |