IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

restriction base data type Options · View
michel777
Posted: Wednesday, July 27, 2016 5:09:00 PM
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>






vlad
Posted: Thursday, July 28, 2016 9:16:32 PM
Rank: Advanced Member

Joined: 12/13/2005
Posts: 2,856
Location: Mauritius
XMLSpy is right
Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.