Description
Issue
I just updated the validator to the newest version and discovered another behaviour in compare to previous version while validating an XRechnung which contain a not valid start date. (In release notes I can only find informations about bugfixes, not about changing the validation behaviour.)
Scenario
When validating an XRechnung with:
<cac:InvoicePeriod>
<cbc:StartDate>Gestern</cbc:StartDate>
<cbc:EndDate>2016-12-31+01:00</cbc:EndDate>
</cac:InvoicePeriod>
I get this exception:
Error evaluating (fn:exists(...) and fn:exists(...) and xs:date(EndDate) ge xs:date(StartDate) or fn:empty(...) or fn:empty(...)) in xsl:when/@test on line 2036 column 188 of EN16931-UBL-validation.xsl:
FORG0001: Invalid date "Gestern" (Non-numeric year component)
java.lang.IllegalStateException: Can not run schematron validation
... and validation is not successful. When validating the same XRechnung with version 1.1.0 of the validator no exceptions are thrown and a result object is returned with following schema violations:
cvc-datatype-valid.1.2.1: 'Gestern' ist kein gültiger Wert für 'date'.
cvc-complex-type.2.2: Element 'cbc:StartDate' darf kein Element [untergeordnete Elemente] haben, und der Wert muss gültig sein.
Question
I would expect that the result of the validation should be the same or at least no exception should be thrown. Can you please say if this behaviour has been intentionally changed or if it is just some kind of bug?
Additional Information
Versions in usage:
validationtool-1.1.2.jar
validator-configuration-xrechnung_1.2.2_2019-12-30.zip
Java(TM) SE Runtime Environment (build 1.8.0_241-b07)
Activity