XSD not being interpreted correctly

1
I am trying to use the following xsd as to create an XML schema that I am using as a domain to xml mapping. Mendix does not seem to be picking up the attribute group "UniqueIDGroup" as it is not appearing in the preview window of the XML Schema. I have used LiquidXML to parse the xsd and LiquidXML shows the full structure of UniqueIDGroup see the xml produced by LiquidXML at the end. Mendix only shows RequestorID.MessagePassword attribute. <?xml version = '1.0' encoding = 'UTF-8'?> <xs:schema xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.opentravel.org/OTA/2003/05" elementFormDefault="qualified" version="1.009" id="OTA2008A"> <xs:element name="OTA_HotelDescriptiveInfoRQ"> <xs:complexType> <xs:sequence> <xs:element name="POS" type="POS_Type" minOccurs="0"> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:simpleType name="OTA_CodeType"> <xs:restriction base="xs:string"> <xs:pattern value="[0-9A-Z]{1,3}(\.[A-Z]{3}(\.X){0,1}){0,1}"/> </xs:restriction> </xs:simpleType> <!-- OTA_CommonTypes.xsd --> <xs:complexType name="POS_Type"> <xs:sequence> <xs:element name="Source" type="SourceType" maxOccurs="10"> </xs:element> </xs:sequence> </xs:complexType> <xs:complexType name="SourceType"> <xs:sequence> <xs:element name="RequestorID" minOccurs="0"> <xs:annotation> <xs:documentation xml:lang="en">An identifier of the entity making the request (e.g. ATA/IATA/ID number, Electronic Reservation Service Provider (ERSP), Association of British Travel Agents (ABTA)). </xs:documentation> </xs:annotation> <xs:complexType> <xs:complexContent> <xs:extension base="UniqueID_Type"> <xs:attribute name="MessagePassword" type="xs:string" use="optional"> </xs:attribute> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> <xs:complexType name="UniqueID_Type"> <xs:sequence> <xs:element name="CompanyName" type="xs:string" minOccurs="0"> </xs:element> </xs:sequence> <xs:attributeGroup ref="UniqueID_Group"/> </xs:complexType> <xs:attributeGroup name="UniqueID_Group"> <xs:attribute name="URL" type="xs:string"> </xs:attribute> <xs:attribute name="Type" type="OTA_CodeType" use="required"> </xs:attribute> <xs:attribute name="Instance" type="xs:string"> </xs:attribute> <xs:attributeGroup ref="ID_Group"> </xs:attributeGroup> <xs:attribute name="ID_Context" type="xs:string" use="optional"> </xs:attribute> </xs:attributeGroup> <xs:attributeGroup name="ID_Group"> <xs:attribute name="ID" type="xs:string" use="required"> </xs:attribute> </xs:attributeGroup> </xs:schema> LiquidXML XML created from XSD. <?xml version="1.0" encoding="utf-8"?> <!-- Created with Liquid XML 2014 Designer Edition (Trial) 12.2.7.5382 (http://www.liquid-technologies.com) --> <ns:OTA_HotelDescriptiveInfoRQ xmlns:ns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05 E:\cattoa\Documents\al.xsd"> <ns:POS> <ns:Source /> <ns:Source> <ns:RequestorID URL="string" Type="string" Instance="string" ID="string" /> </ns:Source> <ns:Source /> <ns:Source /> </ns:POS> </ns:ota_hoteldescriptiveinforq>
asked
1 answers
3

Allistair, The Mendix Platform doesn't support the usage of 'attributeGroup' at this time. No matter where you use the attribute group it will not show the reference attributes.

Please enter a ticket at support.mendix.com containing the same information you have provided here. (The xsd, xml, and what exactly you are missing). Our Support and R&D team will evaluate your request and schedule this for a future release.


In the mean time you could move forward and make a few tweaks to the XSD. Since the attribute group is basically an XML snippet that can be reused throught the XSD. You could replace all attribute groups by the attributes it is referencing. This will at least allow you to move forward. Your UniqueID_Type would look like this:

    <xs:complexType name="UniqueID_Type">
    <xs:sequence>
        <xs:element name="CompanyName" type="xs:string" minOccurs="0">
        </xs:element>
    </xs:sequence>
    <xs:attribute name="URL" type="xs:string">
    </xs:attribute>
    <xs:attribute name="Type" type="OTA_CodeType" use="required">
    </xs:attribute>
    <xs:attribute name="Instance" type="xs:string">
    </xs:attribute>
    <xs:attribute name="ID" type="xs:string" use="required">
    </xs:attribute>
    <xs:attribute name="ID_Context" type="xs:string" use="optional">
    </xs:attribute>
</xs:complexType>
answered