<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="urn:mathworks.dispatcher.registry"
	    xmlns="urn:mathworks.dispatcher.registry" 
	    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	    elementFormDefault="qualified">

    <xsd:simpleType name="MatlabModnameType">
        <xsd:restriction base="xsd:string">
            <xsd:maxLength value="80"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="MatlabNameType">
        <xsd:restriction base="xsd:string">
            <xsd:maxLength value="63"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="MatlabValueType">
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value=":all:"/>
            <xsd:enumeration value="double"/>
            <xsd:enumeration value="single"/>
            <xsd:enumeration value="logical"/>
            <xsd:enumeration value="char"/>
            <xsd:enumeration value="cell"/>
            <xsd:enumeration value="struct"/>
            <xsd:enumeration value="int8"/>
            <xsd:enumeration value="uint8"/>
            <xsd:enumeration value="int16"/>
            <xsd:enumeration value="uint16"/>
            <xsd:enumeration value="int32"/>
            <xsd:enumeration value="uint32"/>
            <xsd:enumeration value="int64"/>
            <xsd:enumeration value="uint64"/>
            <xsd:enumeration value="opaque"/>
            <xsd:enumeration value="function_handle"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="MatrixShapeType">
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="0"/>
            <xsd:enumeration value="R"/>
            <xsd:enumeration value="C"/>
            <xsd:enumeration value="2"/>
            <xsd:enumeration value="3"/>
            <xsd:enumeration value="4"/>
            <xsd:enumeration value="N"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="MatlabDatumWidthType">
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="ptr"/>
            <xsd:enumeration value="8"/>
            <xsd:enumeration value="16"/>
            <xsd:enumeration value="32"/>
            <xsd:enumeration value="64"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:complexType name="FcnRegistrationType">
        <xsd:attribute name="name" type="MatlabNameType"/>
        <xsd:attribute name="type" type="MatlabValueType" use="optional"/>
        <xsd:attribute name="complexity" type="xsd:boolean" use="optional"/>
        <xsd:attribute name="full" type="xsd:boolean" use="optional"/>
        <xsd:attribute name="shape" type="MatrixShapeType" use="optional"/>
        <xsd:attribute name="Mvalue" type="xsd:boolean" use="optional"/>
        <xsd:attribute name="jit_signature" type="xsd:string" use="optional"/>
        <xsd:attribute name="nargin" type="xsd:unsignedInt" use="optional"/>
        <xsd:attribute name="nargout" type="xsd:unsignedInt" use="optional"/>
        <xsd:attribute name="reqin" type="xsd:unsignedInt" use="optional"/>
        <xsd:attribute name="reqout" type="xsd:unsignedInt" use="optional"/>
        <xsd:attribute name="varargin" type="xsd:unsignedInt" use="optional"/>
        <xsd:attribute name="varargout" type="xsd:unsignedInt" use="optional"/>
        <xsd:attribute name="width" type="MatlabDatumWidthType" use="optional"/>
        <xsd:attribute name="signed" type="xsd:boolean" use="optional" default="true"/>
        <xsd:attribute name="toolbox_location" type="xsd:string" use="optional"/>
        <xsd:attribute name="extension" type="xsd:string" use="optional"/>
        <xsd:attribute name="precedence" type="xsd:string" use="optional"/>
        <xsd:attribute name="target" type="xsd:string" use="optional"/>
        <xsd:attribute name="priority" type="xsd:unsignedInt" use="optional"/>
    </xsd:complexType>

    <xsd:complexType name="FcnRegistryType">
        <xsd:sequence>
            <xsd:element name="FcnRegistration" type="FcnRegistrationType" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
        <xsd:attribute name="modname" type="MatlabModnameType" use="optional" />
	<xsd:attribute name="checksum" type="xsd:unsignedInt" use="optional" />
	<xsd:attribute name="creation_time" type="xsd:unsignedInt" use="optional" />
    </xsd:complexType>
    <xsd:element name="FcnRegistry" type="FcnRegistryType" />

</xsd:schema>
