.xsd not showing mapping using XML schema

0
I received a ton of .xsd files to be able to set up an API in Mendix. However, when using the XML schema to import the .xsd files, I can select a xsd file but it doesn't do anything. I put the xsd file content below. Anyone any idea why it's not working? --- Example: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <!-- edited with XMLSpy v2005 rel. 3 U (http://www.altova.com) by Guillermo Dumois (Carnival Cruise Lines MSDP-720n) --> <!--W3C Schema generated by XMLSpy v2005 rel. 3 U (http://www.altova.com)--> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">     <xs:include schemaLocation="SharedDataTypes.xsd"/>     <xs:complexType name="BookingHistoryRequestType">         <xs:sequence>             <xs:element name="ActivityType" minOccurs="0">                 <xs:simpleType>                     <xs:restriction base="xs:string">                         <xs:maxLength value="4"/>                     </xs:restriction>                 </xs:simpleType>             </xs:element>             <xs:element name="HistorySeqNumber" minOccurs="0">                 <xs:simpleType>                     <xs:restriction base="xs:nonNegativeInteger">                         <xs:minInclusive value="0"/>                         <xs:maxInclusive value="99999999"/>                     </xs:restriction>                 </xs:simpleType>             </xs:element>         </xs:sequence>         <xs:attribute name="SegmentId" use="required">             <xs:simpleType>                 <xs:restriction base="xs:string">                     <xs:length value="6"/>                     <xs:enumeration value="HSTBK1"/>                 </xs:restriction>             </xs:simpleType>         </xs:attribute>     </xs:complexType> </xs:schema>  
asked
1 answers
2

It seems that Mendix need to have an element as first tag in the definition.

If you rewrite the xsd as follows:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<!-- edited with XMLSpy v2005 rel. 3 U (http://www.altova.com) by Guillermo Dumois (Carnival Cruise Lines MSDP-720n) -->

<!--W3C Schema generated by XMLSpy v2005 rel. 3 U (http://www.altova.com)-->

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:include schemaLocation="SharedDataTypes.xsd"/>
	<xs:element name="BookingHistoryRequestType">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="ActivityType" minOccurs="0">
					<xs:simpleType>
						<xs:restriction base="xs:string">
							<xs:maxLength value="4"/>
						</xs:restriction>
					</xs:simpleType>
				</xs:element>
				<xs:element name="HistorySeqNumber" minOccurs="0">
					<xs:simpleType>
						<xs:restriction base="xs:nonNegativeInteger">
							<xs:minInclusive value="0"/>
							<xs:maxInclusive value="99999999"/>
						</xs:restriction>
					</xs:simpleType>
				</xs:element>
			</xs:sequence>
			<xs:attribute name="SegmentId" use="required">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:length value="6"/>
						<xs:enumeration value="HSTBK1"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
		</xs:complexType>
	</xs:element>
</xs:schema>

Where the complex type is defined with the element the xml schema will show the object and the attributes correctly.

See here for some more background: https://www.tutorialspoint.com/xsd/xsd_complex_types.htm

answered