<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:annotation>
        <xs:documentation>Schema for SCDP API documentation</xs:documentation>
    </xs:annotation>
    <xs:element name="class" type="ClassType"/>
    <xs:complexType name="ClassType">
        <xs:annotation>
            <xs:documentation>Definitions and descriptions for a class</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="description" type="DescriptionType" minOccurs="1" maxOccurs="1"/>
            <xs:element name="constant" type="FieldType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="field" type="FieldType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="constructor" type="ConstructorType" minOccurs="0"
                maxOccurs="unbounded"/>
            <xs:element name="method" type="MethodType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attribute name="name" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="FieldType">
        <xs:annotation>
            <xs:documentation>Definitions and descriptions for a field or constant contained in a
            class</xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="xs:anyType">
                <xs:attribute name="name" type="xs:string"/>
                <xs:attribute name="type" type="xs:string"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="ConstructorType">
        <xs:annotation>
            <xs:documentation>Definitions and descriptions for a method contained in a
            class</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="signature" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
            <xs:element name="description" type="DescriptionType" minOccurs="1" maxOccurs="1"/>
            <xs:element name="argument" type="ArgumentType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="example" type="xs:anyType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="exception" type="ExceptionType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="MethodType">
        <xs:annotation>
            <xs:documentation>Definitions and descriptions for a method contained in a
            class</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="signature" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
            <xs:element name="description" type="DescriptionType" minOccurs="1" maxOccurs="1"/>
            <xs:element name="argument" type="ArgumentType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="return" type="ReturnType" minOccurs="1" maxOccurs="1"/>
            <xs:element name="example" type="xs:anyType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="exception" type="ExceptionType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attribute name="name" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="ArgumentType">
        <xs:complexContent>
            <xs:extension base="xs:anyType">
                <xs:attribute name="name" type="xs:string"/>
                <xs:attribute name="type" type="xs:string"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="ReturnType">
        <xs:complexContent>
            <xs:extension base="xs:anyType">
                <xs:attribute name="type" type="xs:string"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="ExceptionType">
        <xs:complexContent>
            <xs:extension base="xs:anyType">
                <xs:attribute name="name" type="xs:string"/>
                <xs:attribute name="value" type="xs:string"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="DescriptionType" mixed="true">
        <xs:complexContent>
            <xs:extension base="xs:anyType">
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
</xs:schema>
