<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (C) 2006-2026 BRZ GmbH
    http://www.brz.gv.at

    All rights reserved

-->
<xs:schema xmlns="http://www.brz.gv.at/schema/eproc/austrofix-5/" 
           xmlns:xs="http://www.w3.org/2001/XMLSchema"
           targetNamespace="http://www.brz.gv.at/schema/eproc/austrofix-5/" 
           elementFormDefault="qualified"
           attributeFormDefault="unqualified">
  <xs:annotation>
    <xs:documentation>
      schema version: AustroFIX 5.0.0
      last update: 2015-09-22
      author: Philip Helger, BRZ GmbH
      
      All changes compared from 4.0.0 to 5.0.0 are marked with [CHANGE500].
      
      Please ensure that the XJC compiler is passed the "-Dfile.encoding=UTF-8" property!
    </xs:documentation>
  </xs:annotation>
  
  <!-- [CHANGE500] The types were re-ordered to only have references to previous types -->
  
  <!--
  ********************************
  Datentypen die öfter verwendet werden
  ********************************
  -->

  <xs:complexType name="CustomType">
    <xs:annotation>
      <xs:documentation>
        Generischer Erweiterungstyp. Dieser wird in allen Fällen in denen Erweiterungen in
        diesem Schema verwendet werden referenziert.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:any namespace="##other" processContents="skip" minOccurs="1" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>
  
  <!-- [CHANGE500] Removed enum and using a String of length 2 instead -->
  <xs:simpleType name="CountryCodeType">
    <xs:annotation>
      <xs:documentation>2 letter country codes according to ISO 3166-1</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="2" />
      <xs:maxLength value="2" />
    </xs:restriction>
  </xs:simpleType>

  <!-- [CHANGE500] Removed enum and using a String of length 3 instead -->
  <xs:simpleType name="CurrencyType">
    <xs:annotation>
      <xs:documentation>Currency Codes according to ISO 4217</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="3" />
      <xs:maxLength value="3" />
    </xs:restriction>
  </xs:simpleType>

  <!-- [CHANGE500] Removed enum and using a String of length 2 or 3 instead -->
  <xs:simpleType name="LanguageType">
    <xs:annotation>
      <xs:documentation>
        2- or 3-letter language codes according to ISO 639-1
        Derzeit werden ausschließlich die 2-buchstabigen verwendet, 
          die 3-buchstabigen sind aber flexibler weshalb die Möglichkeit zur
          Verwendung offen bleiben soll. 
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="2" />
      <xs:maxLength value="3" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="PercentageType">
    <xs:restriction base="xs:decimal">
      <xs:minInclusive value="0" />
      <xs:maxInclusive value="100" />
      <xs:fractionDigits value="2" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="AmountType">
    <xs:restriction base="xs:decimal">
      <xs:minInclusive value="0" />
      <xs:fractionDigits value="4" />
      <xs:totalDigits value="23" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="SignedAmountType">
    <xs:restriction base="xs:decimal">
      <xs:fractionDigits value="4" />
      <xs:totalDigits value="23" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="BICType">
    <xs:annotation>
      <xs:documentation>BICs haben entweder 8 oder 11 Zeichen (ISO 9362)</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:pattern value="[0-9A-Za-z]{8}([0-9A-Za-z]{3})?" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="IBANType">
    <xs:restriction base="xs:string">
      <xs:maxLength value="34" />
    </xs:restriction>
  </xs:simpleType>

  <!--
  ********************************
  Dokumentenstornierung
  ********************************
  -->

  <xs:complexType name="CancelledOriginalDocumentType">
    <xs:sequence>
      <xs:element name="DocumentID" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Die (Rechnungs)nummer der zu stornierenden Dokuments.
            Bund: maximal 50 Zeichen 
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="DocumentType" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            Der Typ des zu stornierenden Dokuments.
            Identische Werte wie bei Invoice/DocumentType
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="DocumentDate" type="xs:date" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            Das Datum, von dem die zu stornierende Rechnung ist.
            Das dient nur der Sicherstellung, dass die DocumentID auch
            eindeutig zugeordnet werden kann.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Comment" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            Optionale Beschreibung, warum diese Stornierung relevant ist.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>

  <!--
  ********************************
  Verbundene Dokumente
  ********************************
  -->

  <xs:complexType name="RelatedDocumentType">
    <xs:sequence>
      <xs:element name="DocumentID" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Die (Rechnungs)nummer des verbundenen Dokuments.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="DocumentType" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            Der Typ des verbundenen Dokuments.
            Identische Werte wie bei Invoice/DocumentType
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="DocumentDate" type="xs:date" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            Das Datum, des verbundenen Dokuments.
            Optional, kann aber bei der Auffindung helfen.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Comment" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            Optionale Beschreibung, warum dieses Dokument relevant ist.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  
  <!--
  ********************************
  Datentypen für Adressen
  ********************************
  -->

  <xs:simpleType name="AddressIdentifierTypeType">
    <xs:restriction base="xs:token">
      <xs:enumeration value="GLN"/>
      <xs:enumeration value="DUNS"/>
      <xs:enumeration value="ProprietaryAddressID"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="AddressIdentifierType">
    <xs:annotation>
      <xs:documentation>Definiert eine ID für eine Adresse</xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="xs:string">
        <xs:attribute name="Type" type="AddressIdentifierTypeType" use="optional"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:complexType name="AddressType">
    <xs:annotation>
      <xs:documentation>Eine einzelne Adresse</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="AddressIdentifier" type="AddressIdentifierType" minOccurs="0" maxOccurs="unbounded"/>
      <xs:element name="Salutation" type="xs:string" minOccurs="0" />
      <xs:element name="Name" type="xs:string" />
      <xs:element name="Street" type="xs:string" minOccurs="0" />
      <xs:element name="POBox" type="xs:string" minOccurs="0" />
      <xs:element name="Town" type="xs:string" minOccurs="0" />
      <xs:element name="ZIP" type="xs:string" minOccurs="0" />
      <xs:element name="Country" type="CountryCodeType" minOccurs="0" />
      <xs:element name="Phone" type="xs:string" minOccurs="0" />
      <xs:element name="Fax" type="xs:string" minOccurs="0" />
      <xs:element name="Email" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
      <xs:element name="Contact" type="xs:string" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>

  <!--
  ********************************
  Datentypen zur Lieferung der Waren und Dienstleistungen
  ********************************
  -->

  <xs:complexType name="PeriodType">
    <xs:sequence>
      <xs:element name="FromDate" type="xs:date">
        <xs:annotation>
          <xs:documentation>Startdatum</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ToDate" type="xs:date">
        <xs:annotation>
          <xs:documentation>Endedatum - muss gleich oder nach dem Startdatum sein</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="DeliveryType">
    <xs:annotation>
      <xs:documentation>Informationen zur Lieferung</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="ID" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Die zugrundeliegende Lieferscheinnummer</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Comment" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            Lieferbedingungen.
            Bund: hier dürfen maximal 500 Zeichen drin stehen.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:choice>
        <xs:element name="Date" type="xs:date" maxOccurs="unbounded">
          <xs:annotation>
            <xs:documentation>
              Lieferdatum
              Derzeit wird maximal ein Eintrag befüllt.
            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name="Period" type="PeriodType" maxOccurs="unbounded">
          <xs:annotation>
            <xs:documentation>
              Leistungszeitraum
              Derzeit wird maximal ein Eintrag befüllt.
            </xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:choice>
      <xs:element name="Address" type="AddressType" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>

  <!--
  ********************************
  Datentypen für Parties (Besteller, Lieferant, Rechnungsempfänger)
  ********************************
  -->

  <xs:complexType name="FurtherIdentificationType">
    <xs:annotation>
      <xs:documentation>
        Zusätzliche Identifikationsnummern für "parties"
      </xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="xs:string">
        <xs:attribute name="IdentificationType" type="xs:string" use="required">
          <xs:annotation>
            <xs:documentation>Von welchem Typ ist die FurtherIdentification</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:complexType name="OrderingPartyType">
    <xs:sequence>
      <xs:element name="VATIdentificationNumber" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>UID Nummer des Bestellers</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="FurtherIdentification" type="FurtherIdentificationType" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>Sonstige Nummern Bestellers</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Address" type="AddressType" />
      <xs:element name="Custom" type="CustomType" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="BillerType">
    <xs:sequence>
      <xs:element name="VATIdentificationNumber" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>UID Nummer des Rechnungsstellers</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="FurtherIdentification" type="FurtherIdentificationType" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>Sonstige Nummern des Rechnungsstellers</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Delivery" type="DeliveryType" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Liefertermin/Lieferzeitraum</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Address" type="AddressType" />
      <xs:element name="Custom" type="CustomType" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="InvoiceRecipientType">
    <xs:sequence>
      <xs:element name="VATIdentificationNumber" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>UID Nummer des Rechnungsempfängers</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="FurtherIdentification" type="FurtherIdentificationType" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>Sonstige Nummern Rechnungsempfängers</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Address" type="AddressType" />
      <xs:element name="Custom" type="CustomType" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>
  
  <!--
  ********************************
  Datentypen für die Auftragsreferenz
  ********************************
  -->

  <xs:complexType name="OrderReferenceType">
    <xs:annotation>
      <xs:documentation>Referenz auf die Bestellung/einkaufende Organisation</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="ReferenceDate" type="xs:date" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Bestelldatum</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Description" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Angaben zur Bestellung in Freitext</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="PurchasingUnit" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            Einkäufergruppe
            Bund: genau 3 alphanumerische Zeichen
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="OrderNumber" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            Bestellnummer
            Bund: genau 10-stellig numerisch
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="OtherReference" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            Andere Auftragsreferenznummer (z.B. Aktenzahl). 
            Bund: darf SAP-seitig als Aktenzahl maximal 50 Stellen haben.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SupplierID" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            Lieferantennummer/Kreditorennummer
            Bund: 8-10 stellig numerisch or "ES"+8 Nummern
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ContractReference" type="xs:string" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>Referenz auf die verwendeten (Rahmen-)Verträge</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Custom" type="CustomType" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>

  <!--
  ********************************
  Datentypen für die Rechnungspositionen
  ********************************
  -->

  <xs:complexType name="DetailsGroupType">
    <xs:annotation>
      <xs:documentation>
        Definiert eine einzelne Gruppe von Rechnungspositionen.
        Es macht nur Sinn dieses Element zu erzeugen, wenn entweder Kopfzeile oder
        Fußzeile vorhanden sind.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="HeaderDescription" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Die Kopfzeile der Gruppe</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="FooterDescription" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Die Fußzeile der Gruppe</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="Index" type="xs:int" use="required">
      <xs:annotation>
        <xs:documentation>
          Der Index, über den diese Gruppierungsinformationen aus einer Detailposition
          angesprochen wird. Der Index muss eindeutig über alle DetailsGroup Elemente sein.
          Ein Gruppenindex kann von mehreren Rechnungspositionen verwendet werden. 
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>

  <xs:complexType name="AbstractReductionAndSurchargeType" abstract="true">
    <xs:sequence>
      <xs:element name="BaseAmount" type="SignedAmountType">
        <xs:annotation>
          <xs:documentation>
            Der Basisbetrag von dem der Auf-/Abschlag additiert/subtrahiert wird.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Amount" type="AmountType">
        <xs:annotation>
          <xs:documentation>
            Der Auf-/Abschlags-Betrag.
            Muss immer größer oder gleich 0 sein, da mit "Reduction" oder "Surcharge" das Vorzeichen gewechselt werden kann!
            Das ist ein Nettowert!
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Description" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Optionale Beschreibung zu dem Auf-/Abschlag</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  
  <xs:complexType name="ReductionDetailsType">
    <xs:complexContent>
      <xs:extension base="AbstractReductionAndSurchargeType" />
    </xs:complexContent>
  </xs:complexType>
  
  <xs:complexType name="SurchargeDetailsType">
    <xs:complexContent>
      <xs:extension base="AbstractReductionAndSurchargeType" />
    </xs:complexContent>
  </xs:complexType>
  
  <xs:complexType name="TaxExemptionType">
    <xs:simpleContent>
      <xs:annotation>
        <xs:documentation>
          Der Inhalt des Felds muss die Begründung der Steuerbefreiung als
          menschenlesbarer Text sein.
        </xs:documentation>
      </xs:annotation>
      <xs:extension base="xs:string">
        <xs:attribute name="Type" type="xs:string" use="optional">
          <xs:annotation>
            <xs:documentation>Optionaler Typ aus einer ebInterface Codeliste</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:complexType name="DetailsItemAdditionalType">
    <xs:annotation>
      <xs:documentation>
        Definiert eine einzelne Zusatzeigenschaft auf Positionsebene
      </xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="xs:string">
        <xs:attribute name="Name" type="xs:string" use="optional">
          <xs:annotation>
            <xs:documentation>Name der Zusatzeigenschaft</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="Type" type="xs:string" use="optional">
          <xs:annotation>
            <xs:documentation>Datentyp der Zusatzeigenschaft</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="Unit" type="xs:string" use="optional">
          <xs:annotation>
            <xs:documentation>Einheit der Zusatzeigenschaft</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:complexType name="DetailsItemType">
    <xs:annotation>
      <xs:documentation>Definiert eine einzelne Rechnungsposition.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="OrderPosition" type="xs:unsignedInt" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            Definiert die Bestellpositionsnummer. Diese ist verpflichtend, wenn als
            Auftragsreferenz eine SAP-Bestellnummer vorliegt.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:element name="InvoiceLineNumber" type="xs:unsignedInt">
        <xs:annotation>
          <xs:documentation>
            Definiert die Rechnungspositionsnummer. Das ist eine fortlaufende Nummer.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:element name="Description" type="xs:string">
        <xs:annotation>
          <xs:documentation>Der Name des Artikels/der Leistung dieser Position</xs:documentation>
        </xs:annotation>
      </xs:element>

      <xs:element name="Quantity" type="SignedAmountType">
        <xs:annotation>
          <xs:documentation>Definiert die Menge dieser Position</xs:documentation>
        </xs:annotation>
      </xs:element>

      <xs:element name="BaseQuantity" type="SignedAmountType" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            Definiert die Menge, auf die sich der Preis bezieht. 
            Wenn nichts angegeben ist, ist der Wert 1 anzunehmen.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:element name="UnitNetAmount" type="SignedAmountType">
        <xs:annotation>
          <xs:documentation>Definiert den Nettoeinzelbetrag dieser Position</xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="Reduction" type="ReductionDetailsType">
          <xs:annotation>
            <xs:documentation>Definiert einen einzelnen Abschlag (Reduktion) für diese Position</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name="Surcharge" type="SurchargeDetailsType">
          <xs:annotation>
            <xs:documentation>Definiert einen einzelnen Aufschlag (Zuschlag) für diese Position</xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:choice>
      
      <xs:element name="TotalNetAmount" type="SignedAmountType">
        <xs:annotation>
          <xs:documentation>
            Definiert den Nettogesamtbetrag dieser Position. 
            Das entspricht:
            Quantity * UnitNetAmount / BaseQuantity + Surcharge - Reduction
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:choice>
        <xs:element name="TaxRate" type="PercentageType">
          <xs:annotation>
            <xs:documentation>Definiert die Spalte Steuersatz in Prozent (0-100)</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name="TaxExemption" type="TaxExemptionType">
          <xs:annotation>
            <xs:documentation>Erklärt die Steuerbefreiung (zu rechnen wie 0%)</xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:choice>
      
      <xs:element name="TotalGrossAmount" type="SignedAmountType">
        <xs:annotation>
          <xs:documentation>
            Definiert den Bruttogesamtbetrag für diese Position.
            Das entspricht TotalNetAmount * (100 + Tax) / 100 fals ein Tax Element vorhanden ist.
            Falls ein TaxExemption Element vorhanden ist, dann ist dieser Wert gleich TotalNetAmount 
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:element name="QuantityUnit" type="xs:string">
        <xs:annotation>
          <xs:documentation>Definiert die Mengeneinheit</xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:element name="Delivery" type="DeliveryType" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            Definiert die spezifischen Lieferbedingungen für diese Position.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:element name="OrderReference" type="OrderReferenceType" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Bestellreferenz-Daten für diese Position</xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:element name="Additional" type="DetailsItemAdditionalType" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>Sonstige Informationen zu dieser Position.</xs:documentation>
        </xs:annotation>
      </xs:element>

      <xs:element name="Custom" type="CustomType" minOccurs="0" />
    </xs:sequence>
    <xs:attribute name="GroupIndex" type="xs:int" use="optional">
      <xs:annotation>
        <xs:documentation>Referenz auf ein DetailsGroup/@Index Attribut</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="IsBelowTheLine" type="xs:boolean" use="required">
      <xs:annotation>
        <xs:documentation>Gibt an, ob diese Zeile 'Below-The-Line' - also nicht steuerrelevant - ist.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>

  <xs:complexType name="DetailsType">
    <xs:annotation>
      <xs:documentation>Allgemeiner Rechnungsdetails-Typ</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="HeaderDescription" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Globale Kopfzeile für alle Details.</xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:element name="DetailsGroup" type="DetailsGroupType" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>Die Liste aller Detailgruppen</xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:element name="DetailsItem" type="DetailsItemType" maxOccurs="999">
        <xs:annotation>
          <xs:documentation>Die Details/Rechnungspositionen</xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:element name="FooterDescription" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Globale Fußzeile für alle Details.</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  
  <!--
  ********************************
  Datentypen für globale Auf- und Abschläge
  ********************************
  -->

  <xs:complexType name="AbstractReductionAndSurchargeGlobalType" abstract="true">
    <xs:complexContent>
      <xs:extension base="AbstractReductionAndSurchargeType">
        <xs:sequence>
          <xs:element name="TaxRate" type="PercentageType">
            <xs:annotation>
              <xs:documentation>Der USt-Satz auf den der Wert Einfluss hat</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="ReductionGlobalType">
    <xs:complexContent>
      <xs:extension base="AbstractReductionAndSurchargeGlobalType" />
    </xs:complexContent>
  </xs:complexType>
  
  <xs:complexType name="SurchargeGlobalType">
    <xs:complexContent>
      <xs:extension base="AbstractReductionAndSurchargeGlobalType" />
    </xs:complexContent>
  </xs:complexType>

  <!--
  ********************************
  Datentypen für die Steuerzusammenfassung
  ********************************
  -->

  <xs:complexType name="OtherTaxType">
    <xs:sequence>
      <xs:element name="Comment" type="xs:string">
        <xs:annotation>
          <xs:documentation>Der Name der sonstigen Steuer</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="BaseAmount" type="SignedAmountType" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Gibt den Basisbetrag der sonstigen Steuer an</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="TaxRate" type="SignedAmountType" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Gibt den optionalen Steuersatz der sonstigen Steuer an</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Amount" type="SignedAmountType">
        <xs:annotation>
          <xs:documentation>Der Betrag der sonstigen Steuer</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="VATItemType">
    <xs:sequence>
      <xs:element name="TaxedAmount" type="SignedAmountType">
        <xs:annotation>
          <xs:documentation>Basisbetrag, auf den sich die Steuer bezieht</xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:choice>
        <xs:element name="TaxRate" type="PercentageType">
          <xs:annotation>
            <xs:documentation>Steuersatz in Prozent (0-100)</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name="TaxExemption" type="TaxExemptionType">
          <xs:annotation>
            <xs:documentation>Erklärt die Steuerbefreiung (zu rechnen wie 0%)</xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:choice>
      
      <xs:element name="Amount" type="SignedAmountType">
        <xs:annotation>
          <xs:documentation>Steuerbetrag (= TaxedAmount * TaxRate)</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="VATType">
    <xs:sequence>
      <xs:element name="VATItem" type="VATItemType" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="TaxType">
    <xs:annotation>
      <xs:documentation>Typ für die Steuersummen</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="OtherVATTax" type="OtherTaxType" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>Gibt sonstige Steuern an, die USt-pflichtig sind</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="VAT" type="VATType">
        <xs:annotation>
          <xs:documentation>Enthält nur die USt-Summen</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="OtherTax" type="OtherTaxType" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>Gibt sonstige Steuern an, die NICHT USt-pflichtig sind</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Custom" type="CustomType" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>

  <!--
  ********************************
  Datentypen für die Zahlungsarten
  ********************************
  -->

  <xs:complexType name="DirectDebitPaymentType">
    <xs:annotation>
      <xs:documentation>Dieser Typ steht für Lastschrift-Zahlungen</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Comment" type="xs:string" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="BankCodeCType">
    <xs:simpleContent>
      <xs:extension base="xs:integer">
        <xs:attribute name="BankCodeType" type="CountryCodeType" use="required">
          <xs:annotation>
            <xs:documentation>Bankleitzahlenland</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:complexType name="BankAccountNrType">
    <xs:simpleContent>
      <xs:extension base="xs:string">
        <xs:attribute name="Currency" type="CurrencyType" use="required" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:simpleType name="BankAccountOwnerType">
    <xs:restriction base="xs:string">
      <xs:maxLength value="70" />
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="AccountType">
    <xs:sequence>
      <xs:element name="BankName" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Name der Bank</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="BankCode" type="BankCodeCType" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Nationale Bankleitzahl</xs:documentation>
        </xs:annotation>
      </xs:element>
      <!-- [CHANGE500] made BIC optional (for domestic transfers) -->
      <xs:element name="BIC" type="BICType" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Bank Identification Code (BIC)</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="BankAccountNr" type="BankAccountNrType" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Nationale Kontonummer</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="IBAN" type="IBANType">
        <xs:annotation>
          <xs:documentation>International Bank Account Number (IBAN)</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="BankAccountOwner" type="BankAccountOwnerType" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Name des Kontoinhabers</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="PaymentReferenceCheckSumType">
    <xs:restriction base="xs:string">
      <xs:pattern value="([0-9]{1,4}|X)"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="PaymentReferenceType">
    <xs:simpleContent>
      <xs:extension base="xs:string">
        <xs:attribute name="CheckSum" type="PaymentReferenceCheckSumType" use="optional"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:complexType name="UniversalBankTransactionPaymentType">
    <xs:annotation>
      <xs:documentation>Dieser Typ wird für normale Banküberweisungen verwendet</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Comment" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Kommentar zur Zahlungsart</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="BeneficiaryAccount" type="AccountType">
        <xs:annotation>
          <xs:documentation>Begünstigtenkonto</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="PaymentReference" type="PaymentReferenceType" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Referenz für die Bezahlung der Rechnung</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>

  <!-- [CHANGE500] Changed base type from "xs:string" to "xs:token" -->
  <xs:simpleType name="SEPADirectDebitTypeType">
    <xs:restriction base="xs:token">
      <xs:enumeration value="B2C">
        <xs:annotation>
          <xs:documentation>Enthält 'CORE' und 'COR1'</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="B2B" />
    </xs:restriction>
  </xs:simpleType>

  <!-- [CHANGE500] Renamed from "CreditorIDType" to "SEPACreditorIDType" -->
  <xs:simpleType name="SEPACreditorIDType">
    <xs:restriction base="xs:string">
      <xs:maxLength value="35" />
    </xs:restriction>
  </xs:simpleType>

  <!-- [CHANGE500] Renamed from "MandateReferenceType" to "SEPAMandateReferenceType" -->
  <xs:simpleType name="SEPAMandateReferenceType">
    <xs:restriction base="xs:string">
      <xs:maxLength value="35" />
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="SEPADirectDebitType">
    <xs:annotation>
      <xs:documentation>Dieser Typ wird für das SEPA Lastschrift Verfahren verwendet</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Type" type="SEPADirectDebitTypeType">
        <xs:annotation>
          <xs:documentation>
            Der Typ der Lastschrift - hat Auswirkungen auf die Einspruchsfristen. 
            Standard ist 'B2C'
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <!-- [CHANGE500] made BIC optional (for domestic transfers) -->
      <xs:element name="BIC" type="BICType" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Bank Identification Code (BIC)</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="IBAN" type="IBANType">
        <xs:annotation>
          <xs:documentation>International Bank Account Number (IBAN)</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="BankAccountOwner" type="BankAccountOwnerType">
        <xs:annotation>
          <xs:documentation>Name des Kontoinhabers</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="CreditorID" type="SEPACreditorIDType">
        <xs:annotation>
          <xs:documentation>Die SEPA Creditor ID des Rechnungsstellers. Maximale Länge: 35 Zeichen</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="MandateReference" type="SEPAMandateReferenceType">
        <xs:annotation>
          <xs:documentation>Die SEPA Mandatsreferenz. Maximale Länge: 35 Zeichen</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="DebitCollectionDate" type="xs:date">
        <xs:annotation>
          <xs:documentation>Das geplante Einzugsdatum. Liegt für gewöhnlich in der Zukunft</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Comment" type="xs:string" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="NoPaymentType">
    <xs:annotation>
      <xs:documentation>
        Dieser Typ gibt an, dass keine Zahlung vorgesehen ist.
        Bund: dieser Typ darf nur bei Rechnungen mit einem Bruttobetrag von exakt 0 verwendet werden.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Comment" type="xs:string" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>
  
  <!--
  ********************************
  Datentypen für die Zahlungsbedingungen
  ********************************
  -->

  <xs:complexType name="PaymentDiscountWithPercentageType">
    <xs:sequence>
      <xs:element name="DueDays" type="xs:unsignedInt">
        <xs:annotation>
          <xs:documentation>Anzahl der Tage ab Rechnungseingang für dieses Zahlungsziel.</xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:element name="Percentage" type="PercentageType">
        <xs:annotation>
          <xs:documentation>
            Prozentueller Rabatt in Prozent. Muss größer als 0 und kleiner gleich 100 sein.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:element name="Comment" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Optionaler Kommentar zu diesem Skontoeintrag</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="DueDateType">
    <xs:sequence>
      <!-- [CHANGE500] Made DueDays optional so that Comment alone can exist! -->    
      <xs:element name="DueDays" type="xs:unsignedInt" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Das Zahlungsziel in Tagen ab dem Rechnungseingang</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Comment" type="xs:string" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="PaymentConditionsType">
    <xs:sequence>
      <xs:element name="Discount" type="PaymentDiscountWithPercentageType" minOccurs="0" maxOccurs="2">
        <xs:annotation>
          <xs:documentation>SAP kann nur 2 Zahlungsziele mit Prozentwerten</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="DueDate" type="DueDateType" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Netto-Zahlungsziel (= ohne Skonto)</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Custom" type="CustomType" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>

  <!--
  ********************************
  Der Hauptdatentyp für eine Rechnung
  ********************************
  -->

  <xs:complexType name="InvoiceType">
    <xs:sequence>
      <xs:element name="ReceiveDate" type="xs:dateTime">
        <xs:annotation>
          <xs:documentation>
            Datum und Uhrzeit des Rechnungsempfangs in ER&gt;B.
            Kann abweichend vom 
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:element name="SourceDocumentFormat" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            Der ursprüngliche Formattyp, aus dem diese Datei erstellt wurde.
            Hat rein informativen Character.
            Daten aus dem Formular haben dieses Element nicht.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:element name="InvoiceNumber" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Rechnungsnummer
            Bund: maximal 50 Zeichen
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:element name="InvoiceDate" type="xs:date">
        <xs:annotation>
          <xs:documentation>Datum der Rechnungslegung</xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:element name="Currency" type="CurrencyType" default="EUR">
        <xs:annotation>
          <xs:documentation>Rechnungswährung</xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:element name="CurrencyExchangeRatio" type="xs:decimal" minOccurs="0" >
        <xs:annotation>
          <xs:documentation>
            Umrechnungsfaktor zu Euro zum Zeitpunkt der Rechnungsverarbeitung, 
            falls die Währung nicht Euro ist.
            Euro = Wert * CurrencyExchangeRatio
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:element name="DocumentType" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Definiert den Dokumententyp.
            !!Eine finale Aufzählung ist noch nicht möglich!!
            Beispiele:
            * Invoice - normale Rechnung
            * CreditMemo - normale Gutschrift
            * InvoiceForAdvancePayment - Anzahlungsbuchung
            * InvoiceForPartialDelivery - Teilrechnung
            * FinalSettlement - Schlußrechnung
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:element name="DocumentTitle" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            Dokumententitel. Vordringlich um z.B. &quot;4. Teilrechnung&quot; abbilden zu können.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:element name="CancelledOriginalDocument" type="CancelledOriginalDocumentType" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>
            Mit diesem Element kann sich auf Rechnungen bezogen werden, die mit dieser
            Rechnung als storniert anzusehen sind. 
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:element name="RelatedDocument" type="RelatedDocumentType" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>
            Mit diesem Element kann sich auf andere Rechnungen/Gutschriften bezogen werden.
            Das macht vor allem für die Schlußrechnung Sinn, um alle Teilrechnungen zusammenzufassen 
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:element name="OrderingParty" type="OrderingPartyType" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            Details des Bestellers
            Bund: dieses Element wird nicht benötigt!
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:element name="Biller" type="BillerType">
        <xs:annotation>
          <xs:documentation>Details des Rechnungsstellers</xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:element name="InvoiceRecipient" type="InvoiceRecipientType">
        <xs:annotation>
          <xs:documentation>Details des Rechnungsempfängers</xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:element name="OrderReference" type="OrderReferenceType">
        <xs:annotation>
          <xs:documentation>Bestellreferenz-Daten</xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:element name="Details" type="DetailsType">
        <xs:annotation>
          <xs:documentation>Die Rechnungspositionen</xs:documentation>
        </xs:annotation>
      </xs:element>

      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="Reduction" type="ReductionGlobalType">
          <xs:annotation>
            <xs:documentation>Ein globaler Abschlag</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name="Surcharge" type="SurchargeGlobalType">
          <xs:annotation>
            <xs:documentation>Ein globaler Zuschlag</xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:choice>
      
      <xs:element name="Tax" type="TaxType">
        <xs:annotation>
          <xs:documentation>Die Steuersummen</xs:documentation>
        </xs:annotation>
      </xs:element>

      <xs:element name="TotalRoundingAmount" type="SignedAmountType" minOccurs="0" default="0">
        <xs:annotation>
          <xs:documentation>Globale Rundungsdifferenz</xs:documentation>
        </xs:annotation>
      </xs:element>

      <xs:element name="TotalGrossAmount" type="SignedAmountType">
        <xs:annotation>
          <xs:documentation>Gesamtsumme brutto</xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:choice>
        <xs:annotation>
          <xs:documentation>Zahlungsart</xs:documentation>
        </xs:annotation>
        <xs:element name="DirectDebit" type="DirectDebitPaymentType" />
        <xs:element name="UniversalBankTransaction" type="UniversalBankTransactionPaymentType" />
        <xs:element name="SEPADirectDebit" type="SEPADirectDebitType" />
        <xs:element name="NoPayment" type="NoPaymentType" />
      </xs:choice>

      <xs:element name="PaymentConditions" type="PaymentConditionsType" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Zahlungsbedingungen</xs:documentation>
        </xs:annotation>
      </xs:element>

      <xs:element name="Comment" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Allgemeiner Text zur Rechnung fürs PDF.</xs:documentation>
        </xs:annotation>
      </xs:element>
     
      <xs:element name="Custom" type="CustomType" minOccurs="0" />
    </xs:sequence>

    <xs:attribute name="GeneratingSystem" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>Der Name des Systems, welches die Rechnung erstellt hat.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="Language" type="LanguageType" use="required">
      <xs:annotation>
        <xs:documentation>In welcher Sprache ist die Rechnung verfasst? Innerhalb von Oesterreich sollte &quot;de&quot; verwendet werden.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="IsCreditNote" type="xs:boolean" use="required">
      <xs:annotation>
        <xs:documentation>Handelt es sich bei der Rechnung um eine Gutschrift? Im Zweifelsfall &quot;false&quot; angeben fuer eine Rechnung.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="IsCollectiveInvoice" type="xs:boolean" use="required">
      <xs:annotation>
        <xs:documentation>Handelt es sich bei der Rechnung/Gutschrift um eine Sammelrechnung?</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="IsDuplicate" type="xs:boolean" use="required">
      <xs:annotation>
        <xs:documentation>Handelt es sich bei der Rechnung/Gutschrift um ein Duplikat?</xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>

  <!-- *** Root Element *** -->
  <xs:element name="Invoice" type="InvoiceType" />
</xs:schema>
