Skip to main content
September 22, 2021
Question

Error importing XSD with imported XSD

  • September 22, 2021
  • 0 replies
  • 0 views

Hello,

My coworkers and I have been trying for a while to import an XSD that imports namespaces from other XSDs, something similar to this:

ConnectivityRequest.xsd:

<xsd:schema
    xmlns="./ConnectivityRequest"
    xmlns:xsd="">www.w3.org/.../XMLSchema"
    xmlns:bacui="./UserInformation"
    targetNamespace="./ConnectivityRequest"
    elementFormDefault="qualified"
    attributeFormDefault="unqualified"
    version="1.0.0">

    <xsd:import namespace="./UserInformation"/>

    <xsd:element name="ConnectivityRequest">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element ref="bacui:UserInformation" minOccurs="0"/>
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>
</xsd:schema>
UserInformation.xsd:
<?xml version="1.0" encoding="UTF-8"?>

<xsd:schema
        xmlns="./UserInformation"
        xmlns:xsd="">www.w3.org/.../XMLSchema"
        xmlns:bbc="./BasicComponents" xmlns:sd="">www.w3.org/.../XMLSchema"
        targetNamespace="./UserInformation"
        elementFormDefault="qualified"
        attributeFormDefault="unqualified"
        version="0">

    <xsd:import namespace="./BasicComponents"/>

    <xsd:element name="UserInformation" type="UserInformationType"/>

    <xsd:complexType name="UserInformationType">
        <xsd:sequence>
            <xsd:element name="LegalPerson" minOccurs="0">
                <xsd:complexType>
                    <xsd:complexContent>
                        <xsd:extension base="BasicUserInformationType">
                            <xsd:sequence>
                                <xsd:element name="LegalName" type="bbc:LegalNameType"/>
                                <xsd:element name="Identifier" type="bbc:LegalPersonIdentifierType"/>
                                <xsd:element name="VATRegistration" type="bbc:VATRegistrationType" minOccurs="0"/>
                            </xsd:sequence>
                        </xsd:extension>
                    </xsd:complexContent>
                </xsd:complexType>
            </xsd:element>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="BasicUserInformationType">
        <xsd:sequence>
            <xsd:element ref="bbc:IPAddress" minOccurs="0"/>
            <xsd:element ref="bbc:Email" minOccurs="0"/>
        </xsd:sequence>
    </xsd:complexType>

</xsd:schema>

BasicComponents:

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema
        xmlns="./BasicComponents"
        xmlns:xsd="">www.w3.org/.../XMLSchema"
        targetNamespace="./BasicComponents"
        elementFormDefault="qualified"
        attributeFormDefault="unqualified"
        version="1">

    <!-- Elements -->
    <xsd:element name="Email" type="EmailType"/>

    <xsd:element name="IPAddress" type="IPAddressType"/>

    <xsd:simpleType name="EmailType">
        <xsd:restriction base="xsd:string"/>
    </xsd:simpleType>

    <xsd:simpleType name="IPAddressType">
        <xsd:restriction base="xsd:string"/>
    </xsd:simpleType>

    <xsd:simpleType name="LegalNameType">
        <xsd:restriction base="xsd:string"/>
    </xsd:simpleType>

    <xsd:simpleType name="LegalPersonIdentifierType">
        <xsd:restriction base="xsd:string"/>
    </xsd:simpleType>

    <xsd:simpleType name="VATRegistrationType">
        <xsd:restriction base="xsd:string"/>
    </xsd:simpleType>


</xsd:schema>

Appian is able to read the structure of them and create them but not define their types, any idea why it doesn't create them?