<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns="urn:aggregationprofile-schema-v1"
  targetNamespace="urn:aggregationprofile-schema-v1"
  elementFormDefault="qualified">
  <!-- AggregationProfile -->
  <xs:element name="AggregationProfile">
    <xs:complexType>
      <xs:sequence>
        <!-- AggregationProfile/VisibleNameCultures -->
        <xs:element name ="VisibleNameCultures" minOccurs="1" maxOccurs="1">
          <xs:complexType>
            <xs:sequence>
              <!-- AggregationProfile/VisibleNameCultures/VisibleNameCulture -->
              <xs:element name="VisibleNameCulture" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                  <!-- AggregationProfile/VisibleNameCultures/VisibleNameCulture/@Cuture -->
                  <xs:attribute name="Cuture" type="xs:string" use="required"/>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <!-- AggregationProfile/ExcelFile -->
        <xs:element name="ExcelFile" minOccurs="1" maxOccurs="1">
          <xs:complexType>
            <xs:sequence>
              <!-- AggregationProfile/ExcelFile/Worksheets -->
              <xs:element name="Worksheets" minOccurs="1" maxOccurs="1">
                <xs:complexType>
                  <xs:sequence>
                    <!-- AggregationProfile/ExcelFile/Worksheets/Worksheet -->
                    <xs:element name="Worksheet" minOccurs="0" maxOccurs="unbounded">
                      <xs:complexType>
                        <xs:sequence>
                          <!-- AggregationProfile/ExcelFile/Worksheets/Worksheet/Cell -->
                          <xs:element name="Cell" minOccurs="0" maxOccurs="unbounded">
                            <xs:complexType>
                              <xs:sequence>
                                <!-- AggregationProfile/ExcelFile/Worksheets/Worksheet/Cell/VisibleName -->
                                <xs:element name="VisibleName" minOccurs="0" maxOccurs="unbounded">
                                  <xs:complexType>
                                    <!-- AggregationProfile/ExcelFile/Worksheets/Worksheet/Cell/VisibleName/@Culture -->
                                    <xs:attribute name="Culture" type="xs:string" use="required"/>
                                    <!-- AggregationProfile/ExcelFile/Worksheets/Worksheet/Cell/VisibleName/@Text -->
                                    <xs:attribute name="Text" type="xs:string" use="required"/>
                                  </xs:complexType>
                                </xs:element>
                              </xs:sequence>
                              <!-- AggregationProfile/ExcelFile/Worksheets/Worksheet/Cell/@Name -->
                              <xs:attribute name="Name" type="xs:string" use="required"/>
                              <!-- AggregationProfile/ExcelFile/Worksheets/Worksheet/Cell/@IsNameRegex -->
                              <xs:attribute name="IsNameRegex" type="xs:string" use="optional"/>
                              <!-- AggregationProfile/ExcelFile/Worksheets/Worksheet/Cell/@CellValueType -->
                              <xs:attribute name="CellValueType" use="optional">
                                <xs:simpleType>
                                  <xs:restriction base="xs:string">
                                    <xs:enumeration value="Text"/>
                                    <xs:enumeration value="Number"/>
                                    <xs:enumeration value="Date"/>
                                  </xs:restriction>
                                </xs:simpleType>
                              </xs:attribute>
                              <!-- AggregationProfile/ExcelFile/Worksheets/Worksheet/Cell/@AggregationFunction -->
                              <xs:attribute name="AggregationFunction" use="optional">
                                <xs:simpleType>
                                  <xs:restriction base="xs:string">
                                    <xs:enumeration value="Sum"/>
                                    <xs:enumeration value="Average"/>
                                  </xs:restriction>
                                </xs:simpleType>
                              </xs:attribute>
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                        <!-- AggregationProfile/ExcelFile/Worksheets/Worksheet/@Name -->
                        <xs:attribute name="Name" type="xs:string" use="required"/>
                        <!-- AggregationProfile/ExcelFile/Worksheets/Worksheet/@IsNameRegex -->
                        <xs:attribute name="IsNameRegex" type="xs:string" use="optional"/>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
            <!-- AggregationProfile/ExcelFile/@FileFilterRegex -->
            <xs:attribute name="FileFilterRegex" type="xs:string" use="optional"/>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
      <!-- AggregationProfile/@Name -->
      <xs:attribute name="Name" type="xs:string" use="required"/>
    </xs:complexType>
  </xs:element>
</xs:schema>
