.XSD issue importing XML schema

0
Same kind of issue as in this forum question. It was fixed with the answer from Erwin. However I have more XSD files and I am trying the trick as mentioned before but now I get an error saying: Error: "The 'complexType' element already exists in the content model." at line 131 column 4 of 'file:///filepath../RateAvailabilityResponse.xsd'. At line 131 it shows the same complextype part which can be changed with the trick. When I change this I get a new error saying:  Error: "The 'http://www.w3.org/2001/XMLSchema:element' element is not supported in this context." at line 131 column 4 of 'file:///filepath../RateAvailabilityResponse.xsd'. Any idea how to make Mendix correctly import this mapping so I can also put this logic to other XSD files I need to import? XSD: <?xml version="1.0" encoding="UTF-8"?> <!-- edited with XMLSpy v2005 rel. 3 U (http://www.altova.com) by Guillermo Dumois (Carnival Cruise Lines MSDP-720n) --> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:include schemaLocation="SharedDataTypes.xsd"/> <xs:element name="RateSailingInformation"> <xs:complexType> <xs:sequence> <xs:element name="GeneralSalesComments" minOccurs="0"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="200"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="MiscChargeAmt" minOccurs="0"> <xs:simpleType> <xs:restriction base="xs:decimal"/> </xs:simpleType> </xs:element> <xs:element name="PortChargeAmt" minOccurs="0"> <xs:simpleType> <xs:restriction base="xs:string"/> </xs:simpleType> </xs:element> <xs:element name="Currency" type="CurrencyType" maxOccurs="unbounded"/> <xs:element name="RequestedCityCode"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="6"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="City" minOccurs="0"> <xs:complexType> <xs:attribute name="Code" use="required"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="6"/> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:attribute name="Name"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="20"/> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:attribute name="Type"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="1"/> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:attribute name="TypeDescription"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="30"/> </xs:restriction> </xs:simpleType> </xs:attribute> </xs:complexType> </xs:element> <xs:element name="Insurance" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:attribute name="AvailableInd" type="Indicator" use="required"/> <xs:attribute name="Type" use="required"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="1"/> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:attribute name="TypeDescription"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="30"/> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:attribute name="Amount" type="xs:decimal"/> </xs:complexType> </xs:element> <xs:element name="Transportation" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:attribute name="Type" use="required"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="1"/> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:attribute name="TypeDescription"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="20"/> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:attribute name="MiscChargeAmt" use="required"> <xs:simpleType> <xs:restriction base="xs:double"> <xs:minInclusive value="0"/> <xs:maxInclusive value="9999999999.99"/> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:attribute name="PortChargeAmt" use="required"> <xs:simpleType> <xs:restriction base="xs:double"> <xs:minInclusive value="0"/> <xs:maxInclusive value="9999999999.99"/> </xs:restriction> </xs:simpleType> </xs:attribute> </xs:complexType> </xs:element> <xs:element name="DiningSeating" type="DiningSeatingType" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="SegmentId" use="required"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:minLength value="6"/> <xs:maxLength value="6"/> <xs:enumeration value="RATSAR"/> </xs:restriction> </xs:simpleType> </xs:attribute> </xs:complexType> <xs:complexType name="RateCodeInformationType"> <xs:sequence> <xs:element name="Rate" type="RateType"/> <xs:element name="Status"> <xs:complexType> <xs:complexContent> <xs:extension base="StatusType"> <xs:attribute name="AvailableInd" type="Indicator" use="required"> <xs:annotation> <xs:documentation>A Y/N value that indicates whether the rate code is available to be booked.</xs:documentation> </xs:annotation> </xs:attribute> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="PastGuestInd" type="Indicator"> <xs:annotation> <xs:documentation>A Y/N value that indicates the rate code is only available to past guests (Y), or to anyone (N).</xs:documentation> </xs:annotation> </xs:element> <xs:element name="BookDates" minOccurs="0"> <xs:complexType> <xs:attribute name="Begin"> <xs:annotation> <xs:documentation>Beginning date that the rate code is available for booking.</xs:documentation> </xs:annotation> <xs:simpleType> <xs:restriction base="xs:string"/> </xs:simpleType> </xs:attribute> <xs:attribute name="End"> <xs:annotation> <xs:documentation>Ending date that the rate code can be booked.</xs:documentation> </xs:annotation> <xs:simpleType> <xs:restriction base="xs:string"/> </xs:simpleType> </xs:attribute> </xs:complexType> </xs:element> <xs:element name="Comments" minOccurs="0"> <xs:annotation> <xs:documentation>Additional text about the rate code</xs:documentation> </xs:annotation> <xs:simpleType> <xs:restriction base="xs:string"> <xs:minLength value="1"/> <xs:maxLength value="200"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="InsuranceAvailableInd" type="Indicator"> <xs:annotation> <xs:documentation>A Yes/No value that indicates whether insurance (or waiver) is available for the rate code.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="ExtraGuests" minOccurs="0"> <xs:complexType> <xs:attribute name="AllowedInd" type="Indicator"> <xs:annotation> <xs:documentation>A Yes/No value that determines whether to allow more than 2 guests in a cabin.</xs:documentation> </xs:annotation> </xs:attribute> <xs:attribute name="RateVariesInd" type="Indicator"> <xs:annotation> <xs:documentation>A Yes-No value that indicates that the 3rd, 4th, and 5th guest rates may be different</xs:documentation> </xs:annotation> </xs:attribute> </xs:complexType> </xs:element> <xs:element name="Currency" type="CurrencyType" minOccurs="0"/> <xs:element name="Guests" minOccurs="0"> <xs:complexType> <xs:attribute name="Maximum"> <xs:annotation> <xs:documentation>Reflects the minimum number of guests that can be booked in a cabin with this rate code.</xs:documentation> </xs:annotation> <xs:simpleType> <xs:restriction base="xs:byte"> <xs:minInclusive value="0"/> <xs:maxInclusive value="99"/> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:attribute name="Minimum"> <xs:annotation> <xs:documentation>Reflects the maximum number of guests that can be booked in a cabin with this rate code.</xs:documentation> </xs:annotation> <xs:simpleType> <xs:restriction base="xs:byte"> <xs:minInclusive value="0"/> <xs:maxInclusive value="99"/> </xs:restriction> </xs:simpleType> </xs:attribute> </xs:complexType> </xs:element> <xs:element name="Transportation" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:attribute name="Type" use="required"> <xs:annotation> <xs:documentation>Represents one type of transportation that can be combined with the rate code. Use the TransportationType constant table to translate the TransportationType.Code. If description information was requested, use the accompanying TransportationType.Description.</xs:documentation> </xs:annotation> <xs:simpleType> <xs:restriction base="xs:string"> <xs:length value="1"/> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:attribute name="Description" use="optional"> <xs:annotation> <xs:documentation>A text value representing the modes of transportation available for this rate code.</xs:documentation> </xs:annotation> <xs:simpleType> <xs:restriction base="xs:string"> <xs:minLength value="1"/> <xs:maxLength value="20"/> </xs:restriction> </xs:simpleType> </xs:attribute> </xs:complexType> </xs:element> <xs:element name="GroupBookNum" minOccurs="0"> <xs:annotation> <xs:documentation>Indicates the rate code is available through a group booking belonging to the requesting agency.</xs:documentation> </xs:annotation> <xs:simpleType> <xs:restriction base="xs:string"> <xs:minLength value="1"/> <xs:maxLength value="14"/> </xs:restriction> </xs:simpleType> </xs:element> </xs:sequence> <xs:attribute name="SegmentId" use="required"> <xs:annotation> <xs:documentation>"“RATAV2” The SegmentId is common to all segments and is used to identify the data within the segment."</xs:documentation> </xs:annotation> <xs:simpleType> <xs:restriction base="xs:string"> <xs:length value="6"/> <xs:enumeration value="RATAV2"/> </xs:restriction> </xs:simpleType> </xs:attribute> </xs:complexType> <xs:complexType name="RateAvailabilityResponseType"> <xs:sequence> <xs:element name="RateSailingInformation" type="RateSailingInformationType"/> <xs:element name="RateCodeInformation" type="RateCodeInformationType" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="SegmentId" use="required"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="RATAVR"/> </xs:restriction> </xs:simpleType> </xs:attribute> </xs:complexType> </xs:element> </xs:schema>  
asked
0 answers