<?xml version="1.0" encoding="UTF-8"?>
<!-- ZUGFeRD/Factur-X-Regelsatz, selbst gepflegt (kommt aus keinem KoSIT-Release).
  -
  - Basis: ZUGFeRD 2.5 / Factur-X 1.09 (Distribution ZF25_DE, Schema-Ordner), Schema CII D22B.
  - Wird per "-s fx=<diese Datei> -r fx=<validator/config>" geladen, gemeinsam mit
  - config/xrechnung-3.0.2/scenarios.xml. Alle <location> sind relativ zu validator/config/.
  -
  - Die Guideline-IDs je Profil stammen aus der Codeliste cl id="1" der jeweiligen
  - *_codedb.xml der Distribution - nicht raten, dort nachsehen.
  -
  - Die <validateWithSchematron>-Eintraege zeigen bewusst nicht direkt auf die generierten
  - XSLTs unter _XSLT_*/, sondern auf die Wrapper Factur-X-1.09_*.xslt daneben. Diese stellen
  - schematron-select-full-path auf die lesbare Pfadform um; ohne sie meldet der Bericht
  - Fundstellen als *:Element[namespace-uri()='urn:...'] statt als /rsm:.../ram:... .
  -->
<scenarios xmlns="http://www.xoev.de/de/validator/framework/1/scenarios"
  frameworkVersion="1.0.0">
  <name>Validator Configuration ZUGFeRD 2.5</name>
  <author>
	datamat Software Development
  </author>
  <date>2026-07-27</date>
  <description>
  <p>ZUGFeRD Validator Configuration Factur-X 1.09/ZUGFeRD 2.5</p>
  </description>

  <scenario>
    <name>EN16931 Factur-X 1.09/ZUGFeRD 2.5 Extended (CII)</name>
    <description>
      <p>Validates ZUGFeRD/Factur-X Profile Extended via Schema version D22B</p>
    </description>
    <!-- CII namespaces -->
    <namespace prefix="rsm">urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100</namespace>
    <namespace prefix="ram">urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100</namespace>
    <!-- Namespace for acceptMatch XPATH within validator report XML -->
    <namespace prefix="rep">http://www.xoev.de/de/validator/varl/1</namespace>

    <match>
      exists(/rsm:CrossIndustryInvoice[ rsm:ExchangedDocumentContext/ram:GuidelineSpecifiedDocumentContextParameter/ram:ID/text() = 'urn:cen.eu:en16931:2017#conformant#urn:factur-x.eu:1p0:extended'])
      or exists(/rsm:CrossIndustryInvoice[ rsm:ExchangedDocumentContext/ram:GuidelineSpecifiedDocumentContextParameter/ram:ID/text() = 'urn:cen.eu:en16931:2017#conformant#urn:zugferd.de:2p0:extended'])
    </match>
    <validateWithXmlSchema>
      <resource>
        <name>XML Schema for FACTUR-X; 1.09; EN16931-CONFORMANT-EXTENDED</name>
        <location>facturx/resources/EXTENDED/Factur-X-EXTENDED.xsd</location>
      </resource>
    </validateWithXmlSchema>
    <validateWithSchematron>
      <resource>
        <name>Schematron rules for FACTUR-X; 1.09; EN16931-CONFORMANT-EXTENDED</name>
        <location>facturx/resources/Factur-X-EXTENDED.xslt</location>
      </resource>
    </validateWithSchematron>

    <createReport>
      <resource>
        <name>Validation report for ZUGFeRD/Factur-X Profile Extended</name>
        <location>report/dws-report.xsl</location>
      </resource>
      <!--
        Die Summenpruefung je Steuerkategorie gibt es in drei Varianten: -08b, -08ini und -08rev.
        FeRD kennzeichnet -08ini und -08rev mit flag="warning", der -08b-Variante fehlt das Flag
        durchgaengig in allen neun Familien - nach der KoSIT-Standardzuordnung wird sie dadurch zum
        Fehler. FeRDs eigener Referenz-Validator (valitool, den Beispielen der Distribution beigelegt)
        wertet die ganze Familie als Warnung: die offiziellen EXTENDED-Beispiele X02, X17 und X20
        (SubInvoiceLines, BT-X-8) tragen dort isValid=true bei nur Warnungen, waehrend sie ohne diese
        Herabstufung bei uns abgelehnt wuerden.
        Deshalb hier auf warning gesetzt - die Meldungen bleiben im Bericht sichtbar.
        Bei einem Update des Regelwerks pruefen, ob FeRD das Flag inzwischen selbst setzt.
        Generiert mit Claude Opus 4.8
      -->
      <customLevel level="warning">BR-FXEXT-AE-08b BR-FXEXT-AF-08b BR-FXEXT-AG-08b BR-FXEXT-E-08b BR-FXEXT-G-08b BR-FXEXT-IC-08b BR-FXEXT-O-08b BR-FXEXT-S-08b BR-FXEXT-Z-08b</customLevel>
    </createReport>
    <acceptMatch>/rep:report/rep:assessment[1]/rep:accept[1]</acceptMatch>
  </scenario>

  <scenario>
    <name>EN16931 Factur-X 1.09/ZUGFeRD 2.5 Comfort (CII)</name>
    <description>
      <p>Validates ZUGFeRD/Factur-X Profile Comfort (EN16931) via Schema version D22B</p>
    </description>
    <!-- CII namespaces -->
    <namespace prefix="rsm">urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100</namespace>
    <namespace prefix="ram">urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100</namespace>
    <!-- Namespace for acceptMatch XPATH within validator report XML -->
    <namespace prefix="rep">http://www.xoev.de/de/validator/varl/1</namespace>

    <match>
      exists(/rsm:CrossIndustryInvoice[ rsm:ExchangedDocumentContext/ram:GuidelineSpecifiedDocumentContextParameter/ram:ID/text() = 'urn:cen.eu:en16931:2017'])
      or exists(/rsm:CrossIndustryInvoice[ rsm:ExchangedDocumentContext/ram:GuidelineSpecifiedDocumentContextParameter/ram:ID/text() = 'urn:cen.eu:en16931:2017#conformant#urn:factur-x.eu:1p0:comfort'])
    </match>
    <validateWithXmlSchema>
      <resource>
        <name>XML Schema for FACTUR-X; 1.09; EN16931-COMPLIANT-COMFORT</name>
        <location>facturx/resources/EN16931/Factur-X-EN16931.xsd</location>
      </resource>
    </validateWithXmlSchema>
    <validateWithSchematron>
      <resource>
        <name>Schematron rules for FACTUR-X; 1.09; EN16931-COMPLIANT (FULLY)</name>
        <location>facturx/resources/Factur-X-EN16931.xslt</location>
      </resource>
    </validateWithSchematron>

    <createReport>
      <resource>
        <name>Validation report for ZUGFeRD/Factur-X Comfort (EN16931)</name>
        <location>report/dws-report.xsl</location>
      </resource>
    </createReport>
    <acceptMatch>/rep:report/rep:assessment[1]/rep:accept[1]</acceptMatch>
  </scenario>

  <scenario>
    <name>EN16931 Factur-X 1.09/ZUGFeRD 2.5 Basic (CII)</name>
    <description>
      <p>Validates ZUGFeRD/Factur-X Profile Basic via Schema version D22B</p>
    </description>
    <!-- CII namespaces -->
    <namespace prefix="rsm">urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100</namespace>
    <namespace prefix="ram">urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100</namespace>
    <!-- Namespace for acceptMatch XPATH within validator report XML -->
    <namespace prefix="rep">http://www.xoev.de/de/validator/varl/1</namespace>

    <match>
      exists(/rsm:CrossIndustryInvoice[ rsm:ExchangedDocumentContext/ram:GuidelineSpecifiedDocumentContextParameter/ram:ID/text() = 'urn:cen.eu:en16931:2017#compliant#urn:factur-x.eu:1p0:basic'])
      or exists(/rsm:CrossIndustryInvoice[ rsm:ExchangedDocumentContext/ram:GuidelineSpecifiedDocumentContextParameter/ram:ID/text() = 'urn:cen.eu:en16931:2017#compliant#urn:zugferd.de:2p0:basic'])
    </match>
    <validateWithXmlSchema>
      <resource>
        <name>XML Schema for FACTUR-X; 1.09; BASIC</name>
        <location>facturx/resources/BASIC/Factur-X-BASIC.xsd</location>
      </resource>
    </validateWithXmlSchema>
    <validateWithSchematron>
      <resource>
        <name>Schematron rules for FACTUR-X; 1.09; BASIC</name>
        <location>facturx/resources/Factur-X-BASIC.xslt</location>
      </resource>
    </validateWithSchematron>

    <createReport>
      <resource>
        <name>Validation report for ZUGFeRD/Factur-X Profile Basic</name>
        <location>report/dws-report.xsl</location>
      </resource>
    </createReport>
    <acceptMatch>/rep:report/rep:assessment[1]/rep:accept[1]</acceptMatch>
  </scenario>

  <scenario>
    <name>EN16931 Factur-X 1.09/ZUGFeRD 2.5 BasicWL (CII)</name>
    <description>
      <p>Validates ZUGFeRD/Factur-X Profile BasicWL via Schema version D22B</p>
    </description>
    <!-- CII namespaces -->
    <namespace prefix="rsm">urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100</namespace>
    <namespace prefix="ram">urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100</namespace>
    <!-- Namespace for acceptMatch XPATH within validator report XML -->
    <namespace prefix="rep">http://www.xoev.de/de/validator/varl/1</namespace>

    <match>
      exists(/rsm:CrossIndustryInvoice[ rsm:ExchangedDocumentContext/ram:GuidelineSpecifiedDocumentContextParameter/ram:ID/text() = 'urn:factur-x.eu:1p0:basicwl'])
      or exists(/rsm:CrossIndustryInvoice[ rsm:ExchangedDocumentContext/ram:GuidelineSpecifiedDocumentContextParameter/ram:ID/text() = 'urn:zugferd.de:2p0:basicwl'])
    </match>
    <validateWithXmlSchema>
      <resource>
        <name>XML Schema for FACTUR-X; 1.09; ACCOUNTING INFORMATION, No XML Invoice, (BASIC WITHOUT LINE)</name>
        <location>facturx/resources/BASICWL/Factur-X-BASICWL.xsd</location>
      </resource>
    </validateWithXmlSchema>
    <validateWithSchematron>
      <resource>
        <name>Schematron rules for FACTUR-X; 1.09; EN16931-COMPLIANT-BASICWL</name>
        <location>facturx/resources/Factur-X-BASICWL.xslt</location>
      </resource>
    </validateWithSchematron>

    <createReport>
      <resource>
        <name>Validation report for ZUGFeRD/Factur-X Profile BasicWL</name>
        <location>report/dws-report.xsl</location>
      </resource>
    </createReport>
    <acceptMatch>/rep:report/rep:assessment[1]/rep:accept[1]</acceptMatch>
  </scenario>

  <scenario>
    <name>EN16931 Factur-X 1.09/ZUGFeRD 2.5 Minimum (CII)</name>
    <description>
      <p>Validates ZUGFeRD/Factur-X Profile MINIMUM via Schema version D22B</p>
    </description>
    <!-- CII namespaces -->
    <namespace prefix="rsm">urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100</namespace>
    <namespace prefix="ram">urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100</namespace>
    <!-- Namespace for acceptMatch XPATH within validator report XML -->
    <namespace prefix="rep">http://www.xoev.de/de/validator/varl/1</namespace>

    <match>
      exists(/rsm:CrossIndustryInvoice[ rsm:ExchangedDocumentContext/ram:GuidelineSpecifiedDocumentContextParameter/ram:ID/text() = 'urn:factur-x.eu:1p0:minimum'])
      or exists(/rsm:CrossIndustryInvoice[ rsm:ExchangedDocumentContext/ram:GuidelineSpecifiedDocumentContextParameter/ram:ID/text() = 'urn:zugferd.de:2p0:minimum'])
    </match>
    <validateWithXmlSchema>
      <resource>
        <name>XML Schema for FACTUR-X; 1.09; ACCOUNTING INFORMATION, No XML Invoice, (MINIMUM)</name>
        <location>facturx/resources/MINIMUM/Factur-X-MINIMUM.xsd</location>
      </resource>
    </validateWithXmlSchema>
    <validateWithSchematron>
      <resource>
        <name>Schematron rules for FACTUR-X; 1.09; ACCOUNTING INFORMATION, No XML Invoice, (MINIMUM)</name>
        <location>facturx/resources/Factur-X-MINIMUM.xslt</location>
      </resource>
    </validateWithSchematron>

    <createReport>
      <resource>
        <name>Validation report for ZUGFeRD/Factur-X MINIMUM</name>
        <location>report/dws-report.xsl</location>
      </resource>
    </createReport>
    <acceptMatch>/rep:report/rep:assessment[1]/rep:accept[1]</acceptMatch>
  </scenario>

  <!-- In case none of the above scenarios matched/were applied -->
  <noScenarioReport>
    <resource>
      <name>Default Report</name>
      <location>report/dws-report.xsl</location>
    </resource>
  </noScenarioReport>
</scenarios>
