<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified">
   <xs:element name="EnergyAccountReport">
      <xs:complexType>
         <xs:sequence>
            <xs:element minOccurs="1" name="DocumentIdentification">
               <xs:complexType>
                  <xs:attribute name="v" use="required">
                     <xs:annotation>
                        <xs:documentation source="https://gopro-collaboratif.rte-france.com/pages/viewpage.action?pageId=187534628" xml:lang="fr">Identification du document : Concaténation des champs CodeEicAREA et codeEiCPARTY : EICAREA_EICPARTY</xs:documentation>
                     </xs:annotation>
                     <xs:simpleType>
                        <xs:restriction base="xs:string">
                           <xs:maxLength value="35" />
                        </xs:restriction>
                     </xs:simpleType>
                  </xs:attribute>
               </xs:complexType>
            </xs:element>
            <xs:element minOccurs="1" name="DocumentVersion">
               <xs:complexType>
                  <xs:attribute name="v" use="required">
                     <xs:annotation>
                        <xs:documentation source="https://gopro-collaboratif.rte-france.com/pages/viewpage.action?pageId=187534628" xml:lang="fr">Numéro de version du document</xs:documentation>
                     </xs:annotation>
                     <xs:simpleType>
                        <xs:restriction base="xs:integer">
                           <xs:pattern value="\d{1,3}" />
                        </xs:restriction>
                     </xs:simpleType>
                  </xs:attribute>
               </xs:complexType>
            </xs:element>
            <xs:element minOccurs="0" name="DocumentType">
               <xs:complexType>
                  <xs:attribute name="v" use="optional">
                  </xs:attribute>
               </xs:complexType>
            </xs:element>
            <xs:element minOccurs="0" name="DocumentStatus">
               <xs:complexType>
                  <xs:attribute name="v" use="optional">
                     <xs:annotation>
                        <xs:documentation source="https://gopro-collaboratif.rte-france.com/pages/viewpage.action?pageId=187534628" xml:lang="fr">Détermine le statut « validé » ou non du document</xs:documentation>
                     </xs:annotation>
                  </xs:attribute>
               </xs:complexType>
            </xs:element>
            <xs:element minOccurs="1" name="ProcessType">
               <xs:complexType>
                  <xs:attribute name="v" use="required">
                     <xs:annotation>
                        <xs:documentation source="https://gopro-collaboratif.rte-france.com/pages/viewpage.action?pageId=187534628" xml:lang="fr">Détermine le type du processus, Prend la valeur fixe « A05 » qui signifie le calcul des écarts</xs:documentation>
                     </xs:annotation>
                     <xs:simpleType>
                        <xs:restriction base="xs:string">
                           <xs:length value="3" />
                           <xs:pattern value="A05" />
                        </xs:restriction>
                     </xs:simpleType>
                  </xs:attribute>
               </xs:complexType>
            </xs:element>
            <xs:element minOccurs="0" name="ClassificationType">
               <xs:complexType>
                  <xs:attribute name="v" use="optional">
                  </xs:attribute>
               </xs:complexType>
            </xs:element>
            <xs:element minOccurs="1" name="SenderIdentification">
               <xs:complexType>
                  <xs:attribute name="v" use="required">
                     <xs:annotation>
                        <xs:documentation source="https://gopro-collaboratif.rte-france.com/pages/viewpage.action?pageId=187534628" xml:lang="fr">Code EIC du GRD émetteur</xs:documentation>
                     </xs:annotation>
                     <xs:simpleType>
                        <xs:restriction base="xs:string">
                           <xs:maxLength value="18" />
                        </xs:restriction>
                     </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="codingScheme" use="required">
                     <xs:simpleType>
                        <xs:restriction base="xs:string">
                           <xs:length value="3" />
                           <xs:pattern value="A01" />
                        </xs:restriction>
                     </xs:simpleType>
                  </xs:attribute>
               </xs:complexType>
            </xs:element>
            <xs:element minOccurs="0" name="SenderRole">
               <xs:complexType>
                  <xs:attribute name="v" use="optional">
                     <xs:annotation>
                        <xs:documentation source="https://gopro-collaboratif.rte-france.com/pages/viewpage.action?pageId=187534628" xml:lang="fr">Rôle de l'envoyeur</xs:documentation>
                     </xs:annotation>
                  </xs:attribute>
               </xs:complexType>
            </xs:element>
            <xs:element minOccurs="0" name="ReceiverIdentification">
               <xs:complexType>
                  <xs:attribute name="v" use="optional">
                     <xs:annotation>
                        <xs:documentation source="https://gopro-collaboratif.rte-france.com/pages/viewpage.action?pageId=187534628" xml:lang="fr">Code EIC de RTE</xs:documentation>
                     </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="codingScheme" use="optional">
                  </xs:attribute>
               </xs:complexType>
            </xs:element>
            <xs:element minOccurs="0" name="ReceiverRole">
               <xs:complexType>
                  <xs:attribute name="v" use="optional">
                     <xs:annotation>
                        <xs:documentation source="https://gopro-collaboratif.rte-france.com/pages/viewpage.action?pageId=187534628" xml:lang="fr">A05 pour les RE et A09  pour l'agrégateur de donnée</xs:documentation>
                     </xs:annotation>
                  </xs:attribute>
               </xs:complexType>
            </xs:element>
            <xs:element minOccurs="1" name="DocumentDateTime">
               <xs:complexType>
                  <xs:attribute name="v" type="xs:dateTime" use="required">
                     <xs:annotation>
                        <xs:documentation source="https://gopro-collaboratif.rte-france.com/pages/viewpage.action?pageId=187534628" xml:lang="fr">Date et heure de génération du document</xs:documentation>
                     </xs:annotation>
                  </xs:attribute>
               </xs:complexType>
            </xs:element>
            <xs:element minOccurs="1" name="AccountingPeriod">
               <xs:complexType>
                  <xs:attribute name="v" use="required">
                     <xs:annotation>
                        <xs:documentation source="https://gopro-collaboratif.rte-france.com/pages/viewpage.action?pageId=187534628" xml:lang="fr">Période sur laquelle porte le document</xs:documentation>
                     </xs:annotation>
                     <xs:simpleType>
                        <xs:restriction base="xs:string">
                           <xs:length value="35" />
                           <xs:pattern value="((19|20)\d\d-(0[1-9]|1[012])-([012]\d|3[01])T([01]\d|2[0-3]):([0-5]\d)Z)/((19|20)\d\d-(0[1-9]|1[012])-([012]\d|3[01])T([01]\d|2[0-3]):([0-5]\d)Z)" />
                        </xs:restriction>
                     </xs:simpleType>
                  </xs:attribute>
               </xs:complexType>
            </xs:element>
            <xs:element minOccurs="1" maxOccurs="3" name="AccountTimeSeries">
               <xs:complexType>
                  <xs:sequence>
                     <xs:element name="SendersTimeSeriesIdentification">
                        <xs:complexType>
                           <xs:attribute name="v" use="required">
                              <xs:annotation>
                                 <xs:documentation source="https://gopro-collaboratif.rte-france.com/pages/viewpage.action?pageId=187534628" xml:lang="fr">Période sur laquelle porte le document</xs:documentation>
                              </xs:annotation>
                              <xs:simpleType>
                                 <xs:restriction base="xs:string">
                                    <xs:maxLength value="35" />
                                 </xs:restriction>
                              </xs:simpleType>
                           </xs:attribute>
                        </xs:complexType>
                     </xs:element>
                     <xs:element name="BusinessType">
                        <xs:complexType>
                           <xs:attribute name="v" use="required">
                              <xs:simpleType>
                                 <xs:annotation>
                                    <xs:documentation source="https://gopro-collaboratif.rte-france.com/pages/viewpage.action?pageId=187534628" xml:lang="fr">« Z01 » : pour les courbes de charges estimées
- « Z02 » : pour les courbes de charges télérelevées
- « Z04 » pour la courbe de charge des échanges InterGRD
- « Z05 » : pour la courbe de charge des pertes</xs:documentation>
                                 </xs:annotation>
                                 <xs:restriction base="xs:string">
                                    <xs:length value="3" />
                                    <xs:pattern value="Z01|Z02|Z04|Z05" />
                                 </xs:restriction>
                              </xs:simpleType>
                           </xs:attribute>
                        </xs:complexType>
                     </xs:element>
                     <xs:element name="Product">
                        <xs:complexType>
                           <xs:attribute name="v" use="optional">
                              <xs:annotation>
                                 <xs:documentation source="https://gopro-collaboratif.rte-france.com/pages/viewpage.action?pageId=187534628" xml:lang="fr">Pour la puissance active</xs:documentation>
                              </xs:annotation>
                           </xs:attribute>
                        </xs:complexType>
                     </xs:element>
                     <xs:element name="ObjectAggregation">
                        <xs:complexType>
                           <xs:attribute name="v" use="optional">
		              <xs:annotation>
		                 <xs:documentation source="https://gopro-collaboratif.rte-france.com/pages/viewpage.action?pageId=187534628" xml:lang="fr">Pour indiquer qu’il s’agit d’une agrégation sur un périmètre</xs:documentation>
		              </xs:annotation>
                           </xs:attribute>
                        </xs:complexType>
                     </xs:element>
                     <xs:element name="Area">
                        <xs:complexType>
                           <xs:attribute name="v" use="required">
                              <xs:simpleType>
                                 <xs:annotation>
                                    <xs:documentation source="https://gopro-collaboratif.rte-france.com/pages/viewpage.action?pageId=187534628" xml:lang="fr">Code EIC Area du GRD</xs:documentation>
                                 </xs:annotation>
                                 <xs:restriction base="xs:string">
                                    <xs:maxLength value="18" />
                                 </xs:restriction>
                              </xs:simpleType>
                           </xs:attribute>
                           <xs:attribute name="codingScheme" use="required">
                              <xs:simpleType>
                                 <xs:annotation>
                                    <xs:documentation source="https://gopro-collaboratif.rte-france.com/pages/viewpage.action?pageId=187534628" xml:lang="fr">CodingScheme= « A01 »</xs:documentation>
                                 </xs:annotation>
                                 <xs:restriction base="xs:string">
                                    <xs:length value="3" />
                                    <xs:pattern value="A01" />
                                 </xs:restriction>
                              </xs:simpleType>
                           </xs:attribute>
                        </xs:complexType>
                     </xs:element>
                     <xs:element name="Party">
                        <xs:complexType>
                           <xs:attribute name="v" use="required">
                              <xs:simpleType>
                                 <xs:annotation>
                                    <xs:documentation source="https://gopro-collaboratif.rte-france.com/pages/viewpage.action?pageId=187534628" xml:lang="fr">Code EIC du RE ou GRD</xs:documentation>
                                 </xs:annotation>
                                 <xs:restriction base="xs:string">
                                    <xs:maxLength value="18" />
                                 </xs:restriction>
                              </xs:simpleType>
                           </xs:attribute>
                           <xs:attribute name="codingScheme" use="required">
                              <xs:simpleType>
                                 <xs:annotation>
                                    <xs:documentation source="https://gopro-collaboratif.rte-france.com/pages/viewpage.action?pageId=187534628" xml:lang="fr">CodingScheme= « A01 »</xs:documentation>
                                 </xs:annotation>
                                 <xs:restriction base="xs:string">
                                    <xs:length value="3" />
                                    <xs:pattern value="A01" />
                                 </xs:restriction>
                              </xs:simpleType>
                           </xs:attribute>
                        </xs:complexType>
                     </xs:element>
                     <xs:element name="MeasurementUnit">
                        <xs:complexType>
                           <xs:attribute name="v" use="required">
                              <xs:simpleType>
                                 <xs:annotation>
                                    <xs:documentation source="https://gopro-collaboratif.rte-france.com/pages/viewpage.action?pageId=187534628" xml:lang="fr">« KWT » Pour indiquer que l’unité de mesure est le KiloWatt</xs:documentation>
                                 </xs:annotation>
                                 <xs:restriction base="xs:string">
                                    <xs:length value="3" />
                                 </xs:restriction>
                              </xs:simpleType>
                           </xs:attribute>
                        </xs:complexType>
                     </xs:element>
                     <xs:element minOccurs="7" maxOccurs="7" name="Period">
                        <xs:annotation>
                           <xs:documentation source="https://gopro-collaboratif.rte-france.com/pages/viewpage.action?pageId=187534628" xml:lang="fr">Doit contenir 7 éléments fils (correpsonds à un jour de la semaine)</xs:documentation>
                        </xs:annotation>
                        <xs:complexType>
                           <xs:sequence>
                              <xs:element name="TimeInterval">
                                 <xs:complexType>
                                    <xs:attribute name="v" use="required">
                                       <xs:annotation>
                                          <xs:documentation source="https://gopro-collaboratif.rte-france.com/pages/viewpage.action?pageId=187534628" xml:lang="fr">Période sur laquelle portent les mesures.</xs:documentation>
                                       </xs:annotation>
                                       <xs:simpleType>
                                          <xs:restriction base="xs:string">
                                             <xs:length value="35" />
                                             <xs:pattern value="((19|20)\d\d-(0[1-9]|1[012])-([012]\d|3[01])T([01]\d|2[0-3]):([0-5]\d)Z)/((19|20)\d\d-(0[1-9]|1[012])-([012]\d|3[01])T([01]\d|2[0-3]):([0-5]\d)Z)" />
                                          </xs:restriction>
                                       </xs:simpleType>
                                    </xs:attribute>
                                 </xs:complexType>
                              </xs:element>
                              <xs:element name="Resolution">
                                 <xs:complexType>
                                    <xs:attribute name="v" use="required">
                                       <xs:annotation>
                                          <xs:documentation source="https://gopro-collaboratif.rte-france.com/pages/viewpage.action?pageId=187534628" xml:lang="fr">Pas de temps – format = « PnYnMnDTnHnMnS »
pour un pas de 15’ = « PT15M »
pour un pas de 30’ = « PT30M »</xs:documentation>
                                       </xs:annotation>
                                       <xs:simpleType>
                                          <xs:restriction base="xs:string">
                                             <xs:pattern value="PT15M|PT30M" />
                                          </xs:restriction>
                                       </xs:simpleType>
                                    </xs:attribute>
                                 </xs:complexType>
                              </xs:element>
                              <xs:element minOccurs="1" maxOccurs="100" name="AccountInterval">
                                 <xs:complexType>
                                    <xs:sequence>
                                       <xs:element name="Pos">
                                          <xs:complexType>
                                             <xs:attribute name="v" use="required">
                                                <xs:annotation>
                                                   <xs:documentation source="https://gopro-collaboratif.rte-france.com/pages/viewpage.action?pageId=187534628" xml:lang="fr">Position du point : valeur comprise entre 1 et 100</xs:documentation>
                                                </xs:annotation>
                                                <xs:simpleType>
                                                   <xs:restriction base="xs:integer">
                                                      <xs:pattern value="\d{1,6}" />
                                                   </xs:restriction>
                                                </xs:simpleType>
                                             </xs:attribute>
                                          </xs:complexType>
                                       </xs:element>
                                       <xs:element name="InQty">
                                          <xs:complexType>
                                             <xs:attribute name="v" use="required" >
                                                <xs:annotation>
                                                   <xs:documentation source="https://gopro-collaboratif.rte-france.com/pages/viewpage.action?pageId=187534628" xml:lang="fr">Dans le cas des courbes GRD-RE
- valeurs de la courbe de charge de production estimée si BUSINESS_TYPE = Z01 corresponds à la courbe C02
- ou valeurs de la courbe de charge de production télérelevée  si BUSINESS_TYPE = Z02 corresponds à la courbe C04
- ou 0 si BUSINESS_TYPE = Z05 
Dans le cas des courbes inter GRD
- 0 si BUSINESS_TYPE = Z04 </xs:documentation>
                                                </xs:annotation>
                                                <xs:simpleType>
                                                   <xs:restriction base="xs:string">
                                                      <xs:maxLength value="18" />
                                                      <xs:pattern value="\d+(\.{1}\d+)?" />
                                                   </xs:restriction>
                                                </xs:simpleType>
                                             </xs:attribute>
                                          </xs:complexType>
                                       </xs:element>
                                       <xs:element name="OutQty">
                                          <xs:complexType>
                                             <xs:attribute name="v" use="required" >
                                                 <xs:annotation>
                                                   <xs:documentation source="https://gopro-collaboratif.rte-france.com/pages/viewpage.action?pageId=187534628" xml:lang="fr">Dans le cas des courbes GRD-RE
- valeurs de la courbe de charge de consommation estimée  si BUSINESS_TYPE = Z01 corresponds à la courbe C01
- ou valeurs de la courbe de charge de consommation télérelévée si BUSINESS_TYPE = Z02 corresponds à la courbe C03
- ou valeurs des pertes sur le réseau de distribution  si BUSINESS_TYPE = Z05 corresponds à la courbe C05
Dans le cas des courbes Inter GRD :
Valeur de l'énergie que le GRD AREA donne au GRD PARTY si BUSINESS_TYPE = Z04 corresponds à la C07/08</xs:documentation>
                                                </xs:annotation>
                                                <xs:simpleType>
                                                   <xs:restriction base="xs:string">
                                                      <xs:maxLength value="18" />
                                                      <xs:pattern value="\d+(\.{1}\d+)?" />
                                                   </xs:restriction>
                                                </xs:simpleType>
                                             </xs:attribute>
                                          </xs:complexType>
                                       </xs:element>
                                    </xs:sequence>
                                 </xs:complexType>
                              </xs:element>
                           </xs:sequence>
                        </xs:complexType>
                     </xs:element>
                  </xs:sequence>
               </xs:complexType>
            </xs:element>
         </xs:sequence>
         <xs:attribute name="DtdVersion" type="xs:string" use="optional" />
         <xs:attribute name="DtdRelease" type="xs:string" use="optional" />
      </xs:complexType>
   </xs:element>
</xs:schema>
