Skip to content

XRechnung test suite version release-2026-01-31: UBL document reference interpreted as date #1048

@stefan6419846

Description

@stefan6419846

When running Mustang-CLI (mustang --action validate --source 03.07a-INVOICE_ubl.xml), way to less rules seem to be applied and there are exceptions not represented in the validation report.

[main] INFO com.helger.schematron.api.xslt.AbstractSchematronXSLTBasedResource - Applying Schematron XSLT on XML instance
[main] WARN org.mustangproject.ZUGFeRD.ZUGFeRDInvoiceImporter - Failed to parse date ANG987654321 with pattern yyyy-MM-dd
java.text.ParseException: Unparseable date: "ANG987654321"
	at java.base/java.text.DateFormat.parse(DateFormat.java:399)
	at org.mustangproject.ZUGFeRD.ZUGFeRDInvoiceImporter.parseDate(ZUGFeRDInvoiceImporter.java:1342)
	at org.mustangproject.ZUGFeRD.ZUGFeRDInvoiceImporter.extractInto(ZUGFeRDInvoiceImporter.java:629)
	at org.mustangproject.ZUGFeRD.ZUGFeRDInvoiceImporter.setDocument(ZUGFeRDInvoiceImporter.java:340)
	at org.mustangproject.ZUGFeRD.ZUGFeRDInvoiceImporter.setRawXML(ZUGFeRDInvoiceImporter.java:297)
	at org.mustangproject.ZUGFeRD.ZUGFeRDInvoiceImporter.setRawXML(ZUGFeRDInvoiceImporter.java:311)
	at org.mustangproject.ZUGFeRD.ZUGFeRDInvoiceImporter.fromXML(ZUGFeRDInvoiceImporter.java:1462)
	at org.mustangproject.validator.XMLValidator.checkArithmetics(XMLValidator.java:456)
	at org.mustangproject.validator.XMLValidator.validate(XMLValidator.java:409)
	at org.mustangproject.validator.ZUGFeRDValidator.internalValidate(ZUGFeRDValidator.java:199)
	at org.mustangproject.validator.ZUGFeRDValidator.validate(ZUGFeRDValidator.java:254)
	at org.mustangproject.commandline.Main.performValidate(Main.java:482)
	at org.mustangproject.commandline.Main.main(Main.java:442)
[main] WARN org.mustangproject.ZUGFeRD.ZUGFeRDInvoiceImporter - Failed to parse date ANG987654321 with pattern yyyy-MM-dd
java.text.ParseException: Unparseable date: "ANG987654321"
	at java.base/java.text.DateFormat.parse(DateFormat.java:399)
	at org.mustangproject.ZUGFeRD.ZUGFeRDInvoiceImporter.parseDate(ZUGFeRDInvoiceImporter.java:1342)
	at org.mustangproject.ZUGFeRD.ZUGFeRDInvoiceImporter.extractInto(ZUGFeRDInvoiceImporter.java:629)
	at org.mustangproject.validator.XMLValidator.checkArithmetics(XMLValidator.java:458)
	at org.mustangproject.validator.XMLValidator.validate(XMLValidator.java:409)
	at org.mustangproject.validator.ZUGFeRDValidator.internalValidate(ZUGFeRDValidator.java:199)
	at org.mustangproject.validator.ZUGFeRDValidator.validate(ZUGFeRDValidator.java:254)
	at org.mustangproject.commandline.Main.performValidate(Main.java:482)
	at org.mustangproject.commandline.Main.main(Main.java:442)
[main] INFO org.mustangproject.validator.ZUGFeRDValidator - Parsed PDF:absent XML:valid Signature:null Checksum:3BCFED594297D6CDE5D3937CF1C50E93C000B4F2 Profile:urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0 Version:2 Took:2755ms Errors:[] ErrorIDs: []
<?xml version="1.0" encoding="UTF-8"?>

<validation filename="03.07a-INVOICE_ubl.xml" datetime="2026-02-23 13:54:53">
  <xml>
    <info>
      <version>2</version>
      <profile>urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0</profile>
      <validator version="2.22.0"/>
      <rules>
        <fired>30</fired>
        <failed>0</failed>
      </rules>
      <duration unit="ms">2648</duration>
    </info>
    <summary status="valid"/>
  </xml>
  <summary status="valid"/>
</validation>

The specific file is available in https://github.com/itplr-kosit/xrechnung-testsuite/releases/download/v2026-01-31/xrechnung-3.0.2-testsuite-2026-01-31.zip as instances/standard/03.07a-INVOICE_ubl.xml.

Running the validation against a custom implementation inspired by Mustang-CLI leads to 228 rules being fired, which looks much more correct.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions