Object Component XSD

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
  attributeFormDefault="unqualified">
  <xs:element name="ObjectComponent">
    <xs:annotation>
      <xs:documentation>Defines a templateComponent that encapsulates a set or subset of database objects.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence maxOccurs="unbounded">
        <xs:element maxOccurs="unbounded" name="Option" minOccurs="0">
          <xs:complexType>
            <xs:attribute name="Name" type="OptionNameTypeEnum" use="required"/>
            <xs:attribute name="Value" type="xs:string" use="required"/>
          </xs:complexType>
        </xs:element>
        <xs:element maxOccurs="unbounded" name="SchemaObject">
          <xs:complexType>
            <xs:sequence>
              <xs:element maxOccurs="unbounded" name="Option" minOccurs="0">
                <xs:complexType>
                  <xs:attribute name="Name" type="OptionNameTypeEnum" use="required"/>
                  <xs:attribute name="Value" type="xs:string" use="required"/>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
            <xs:attribute name="Name" type="xs:string" use="required"/>
            <xs:attribute name="Type" type="SchemaObjectTypeEnum" use="required"/>
          </xs:complexType>
        </xs:element>
        <xs:element maxOccurs="unbounded" minOccurs="0" name="DynamicQuery" nillable="false"
          type="xs:string">
          <xs:annotation>
            <xs:documentation>The dynamic query creates a templateComponent record for each row of data by applying variable substitutions using the column names returned in the query. In this way a definition can generate multiple templateComponents from a single definition.</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element minOccurs="0" name="Deployment">
          <xs:complexType>
            <xs:sequence>
              <xs:element maxOccurs="unbounded" minOccurs="0" name="Script">
                <xs:complexType>
                  <xs:attribute name="Path" type="xs:string" use="required"/>
                  <xs:attribute name="Weight" type="xs:string" use="required"/>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
            <xs:attribute name="Weight" type="xs:int" use="required"/>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="Schema" use="optional" type="xs:string"/>
      <xs:attribute name="Category" use="required" type="xs:string"/>
      <xs:attribute name="Name" use="required" type="xs:string"/>
    </xs:complexType>
  </xs:element>
  <xs:simpleType name="SchemaObjectTypeEnum">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Table"/>
      <xs:enumeration value="View"/>
      <xs:enumeration value="Function"/>
      <xs:enumeration value="Procedure"/>
      <xs:enumeration value="Trigger"/>
      <xs:enumeration value="DdlTrigger"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="OptionNameTypeEnum">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Permissions"/>
      <xs:enumeration value="NoCollation"/>
      <xs:enumeration value="AnsiPadding"/>
      <xs:enumeration value="Indexes"/>
    </xs:restriction>
  </xs:simpleType>
</xs:schema>