ZUGFeRD / mustangproject

Open Source Java e-Invoicing library, validator and tool (Factur-X/ZUGFeRD, UNCEFACT/CII XRechnung)
http://www.mustangproject.org
Apache License 2.0
168 stars 99 forks source link

--action visualize seems to ignore the language #349

Closed moritz closed 7 months ago

moritz commented 7 months ago

I've run

java -jar Mustang-CLI-2.8.0.jar --action visualize

both with --language de and --language en, with this sample as input file.

Both runs produced identical results, which seems fishy to me. If the language setting doesn't affect the outcome, why require it all?

jstaerk commented 7 months ago

hi, I believe you are using a ZUGFeRD version 1 input, try with a version 2, like https://www.mustangproject.org/files/factur-x.xml .

C:\Users\jstaerk\workspace\mustangproject\Mustang-CLI\target>java -jar Mustang-CLI-2.9.0.jar --action visualize --source \Users\jstaerk\Downloads\factur-x.xml --language de
ZUGFeRD XML source set to \Users\jstaerk\Downloads\factur-x.xml
Output language set to de
Target file (default: factur-x.html):
Warning at char 27 in xsl:value-of/@select on line 1985 column 166
  SXWN9000: Comparison of xs:untypedAtomic? to xs:boolean will fail unless the first operand is empty
Warning at xsl:for-each on line 2083 column 78
  SXWN9009: An empty xsl:for-each instruction has no effect
Warning at char 6 in xsl:value-of/@select on line 1010 column 126
  SXWN9000: Comparison of xs:untypedAtomic? to xs:boolean will fail unless the first operand is empty
Warning at char 6 in xsl:value-of/@select on line 1927 column 119
  SXWN9000: Comparison of xs:untypedAtomic? to xs:boolean will fail unless the first operand is empty
Warning at char 27 in xsl:value-of/@select on line 1985 column 166
  SXWN9000: Comparison of xs:untypedAtomic? to xs:boolean will fail unless the first operand is empty
Warning at char 6 in xsl:value-of/@select on line 1010 column 126
  SXWN9000: Comparison of xs:untypedAtomic? to xs:boolean will fail unless the first operand is empty
Warning at char 6 in xsl:value-of/@select on line 1927 column 119
  SXWN9000: Comparison of xs:untypedAtomic? to xs:boolean will fail unless the first operand is empty
Warning at char 27 in xsl:value-of/@select on line 1985 column 166
  SXWN9000: Comparison of xs:untypedAtomic? to xs:boolean will fail unless the first operand is empty
Written to factur-x.html
xrechnung-viewer.css and xrechnung-viewer.js written as well (to local working dir)

respectively


C:\Users\jstaerk\workspace\mustangproject\Mustang-CLI\target>java -jar Mustang-CLI-2.9.0.jar --action visualize --source \Users\jstaerk\Downloads\factur-x.xml --language en
ZUGFeRD XML source set to \Users\jstaerk\Downloads\factur-x.xml
Output language set to en
Target file (default: factur-x.html):factur-x.en.html
Warning at char 27 in xsl:value-of/@select on line 1985 column 166
  SXWN9000: Comparison of xs:untypedAtomic? to xs:boolean will fail unless the first operand is empty
Warning at xsl:for-each on line 2083 column 78
  SXWN9009: An empty xsl:for-each instruction has no effect
Warning at char 6 in xsl:value-of/@select on line 1010 column 126
  SXWN9000: Comparison of xs:untypedAtomic? to xs:boolean will fail unless the first operand is empty
Warning at char 6 in xsl:value-of/@select on line 1927 column 119
  SXWN9000: Comparison of xs:untypedAtomic? to xs:boolean will fail unless the first operand is empty
Warning at char 27 in xsl:value-of/@select on line 1985 column 166
  SXWN9000: Comparison of xs:untypedAtomic? to xs:boolean will fail unless the first operand is empty
Warning at char 6 in xsl:value-of/@select on line 1010 column 126
  SXWN9000: Comparison of xs:untypedAtomic? to xs:boolean will fail unless the first operand is empty
Warning at char 6 in xsl:value-of/@select on line 1927 column 119
  SXWN9000: Comparison of xs:untypedAtomic? to xs:boolean will fail unless the first operand is empty
Warning at char 27 in xsl:value-of/@select on line 1985 column 166
  SXWN9000: Comparison of xs:untypedAtomic? to xs:boolean will fail unless the first operand is empty
Written to factur-x.en.html
xrechnung-viewer.css and xrechnung-viewer.js written as well (to local working dir)

produces the attached files (sorry for the special character mishap, I'm on windows and I didn't specify the utf8 charset on commandline) factur-x.zip

please feel free to either close the issue or change the subject to zugferd v1 visualisation should be translatable, unfortunately the official xslt is currently single language only so one would need translators :-(

moritz commented 7 months ago

Hi @jstaerk,

thank you for the quick response.

You are right, it works with zugferd 2 / factur-x files, and that it doesn't really work with version 1 isn't really an issue for me, so I'm closing this.