<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns="https://www.omg.org/spec/SDMN/20211108/MODEL"
    xmlns:sdmndi="https://www.omg.org/spec/SDMN/20211108/SDMNDI"
    xmlns:sce="https://www.omg.org/spec/SCE/20211108/MODEL"
    xmlns:dmn="https://www.omg.org/spec/DMN/20191111/MODEL/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    elementFormDefault="qualified"
    targetNamespace="https://www.omg.org/spec/SDMN/20211108/MODEL">

    <xsd:import namespace="https://www.omg.org/spec/SCE/20211108/MODEL" schemaLocation="bmi-21-11-25.xsd"/>  
    <xsd:import namespace="https://www.omg.org/spec/DMN/20191111/MODEL/"/>
    <xsd:import namespace="https://www.omg.org/spec/SDMN/20211108/SDMNDI" schemaLocation="bmi-21-11-08.xsd"/>
    <xsd:include schemaLocation="bmi-21-11-07.xsd"/>

    <xsd:element name="SDMNModelPackage" type="tSDMNModelPackage">
        <xsd:annotation>
            <xsd:documentation>
                The SDMNPackage class is the outermost containing object for all SDMN elements. It defines the scope of visibility and the namespace 
                for all contained elements. The interchange of SDMN files will always be through one or more SDMNPackages. Specifically, an XML file 
                for a Shared Data Model usually would be appended with a “.sdmn” label.
            </xsd:documentation>
        </xsd:annotation>        
    </xsd:element>
    <xsd:complexType name="tSDMNModelPackage">
        <xsd:complexContent>
            <xsd:extension base="sce:tSCEModelPackage">
                <xsd:sequence>
                    <xsd:element maxOccurs="1" minOccurs="0" name="model" type="tSDMNModel">
                        <xsd:annotation>
                            <xsd:documentation>
                                This the SDMNModel sub-package contained within a SDMNModelPackage. This redefines the model association of SCEModelPackage. 
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element maxOccurs="1" minOccurs="0" ref="sdmndi:SDMNDI">
                        <xsd:annotation>
                            <xsd:documentation>
                                This attribute contains the Diagram Interchange information contained within this SDMNPackage.
                                This redefines the presentation association of SCEModelPackage.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
                <xsd:attribute name="expressionLanguage" default="https://www.omg.org/spec/DMN/20191111/FEEL/" use="optional" type="xsd:anyURI"/>
                <xsd:attribute name="typeLanguage" default="https://www.omg.org/spec/DMN/20191111/FEEL/" use="optional" type="xsd:anyURI"/>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    
</xsd:schema>