-
-
Notifications
You must be signed in to change notification settings - Fork 208
Description
The package xrechnung-3.0.2-xrechnung-visualization-2024-06-20.zip contains a test instance wrong-date-with-zeros-uncefact.xml. This instance could not be visualized by Mustang-2.16.2, neither for target HTML nor for target PDF, neither by using the CLI nor by applying the XSLT scripts that are part of the JAR file.
Using CLI:
java -Dlogback.configurationFile=./logback.xml -jar "Mustang-CLI.jar" --disable-file-logging --action visualize --source "wrong-date-with-zeros-uncefact.xml" --out "wrong-date-with-zeros-uncefact.html" --language de
Picked up JAVA_TOOL_OPTIONS: -Duser.language=en-US -Dfile.encoding=UTF-8
ZUGFeRD XML source set to wrong-date-with-zeros-uncefact.xml
Output language set to de
Target set to wrong-date-with-zeros-uncefact.html
(...)
Error at char 27 in expression in xsl:value-of/@select on line 2480 column 160
FORG0001 Invalid date "0000-00-00" (Month is out of range)
In template rule with match="/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:IssueDateTime/udt:DateTimeString[@Format = '102']" on line 180 of
invoked by xsl:apply-templates at #59
In template rule with match="/rsm:CrossIndustryInvoice" on line 54 of
invoked by built-in template rule (text-only)
[main] ERROR ROOT - Invalid date "0000-00-00" (Month is out of range)
; SystemID: ; Line#: 2480; Column#: 26
ValidationException: Invalid date "0000-00-00" (Month is out of range)
(...)
at org.mustangproject.ZUGFeRD.ZUGFeRDVisualizer.applyZF2XSLT(ZUGFeRDVisualizer.java:377)
at org.mustangproject.ZUGFeRD.ZUGFeRDVisualizer.visualize(ZUGFeRDVisualizer.java:144)
at org.mustangproject.ZUGFeRD.ZUGFeRDVisualizer.visualize(ZUGFeRDVisualizer.java:126)
at org.mustangproject.commandline.Main.performVisualization(Main.java:856)
at org.mustangproject.commandline.Main.main(Main.java:425)
Invalid date "0000-00-00" (Month is out of range)
Using XSLT scripts:
java -cp (...) net.sf.saxon.Transform -xsl:"Mustang-CLI-2.16.2/cii-xr.xsl" -s:"wrong-date-with-zeros-uncefact.xml" -o:"wrong-date-with-zeros-uncefact.xr"
Error at char 27 in expression in xsl:value-of/@select on line 2480 column 160 of cii-xr.xsl:
FORG0001 Invalid date "0000-00-00" (Month is out of range)
In template rule with match="/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:IssueDateTime/udt:DateTimeString[@Format = '102']" on line 180 of cii-xr.xsl
invoked by xsl:apply-templates at file:/(...)/Mustang-CLI-2.16.2/cii-xr.xsl#59
In template rule with match="/rsm:CrossIndustryInvoice" on line 54 of cii-xr.xsl
invoked by built-in template rule (text-only)
Invalid date "0000-00-00" (Month is out of range)
The cause is that Mustang-CLI-2.16.2 is using outdated XSLT scripts. The issue does not occur if applying the XSLT scripts from the following packages:
By using the XSLT scripts from the packages mentioned above both targets could be generated successfully, HTML and PDF.
So, please, update the XSLT scripts.