-
-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mustang outputs validation errors whereas KoSIT works #593
Comments
They are warnings, not errors. In the validation output, they are marked as such, and the overall outcome is status="valid". However, I'm not sure why the KoSIT validator doesn't display any warning. |
Sorry, I expressed myself incorrectly. Yes, I have seen that they are “only” warnings. The question is not why they are not found in KoSIT, but why they are found in Mustangproject.
I see a GrossPriceProductTradePrice of 11.76 for the first position, a NetPriceProductTradePrice of 11.76 and no specification for AppliedTradeAllowanceCharge. This means that both amounts are mathematically correct because there is no discount. |
By the way: If the XML part contains warnings - and in this case it seems to me to be a serious error (the validator speaks of “MUST”), is the document really compliant (i.e. valid)? Is it really compliant with ZUGFeRD 2.3.2? (In this case I would expect a severity of NOTICE or INFORMATION, but not a WARNING.) I would say it is not compliant, but under the circumstances that the validator issues warnings but still classifies the XML as valid, you could still release the document for further processing. That would be exactly the wording or rating I would give the document. |
The text, especially the word "MUST" comes from the validating XSLT, so I guess it would be a bad idea to changes this in mustangproject. I just compared .../XR_30/XRechnung-CII-validation.xslt (from mustangproject) and .../3.0.2/xsl/XRechnung-CII-validation.xsl (from the KoSIT validator), and for the warnings you got, there's no difference (including the flag, which is "warning" in both files). As noted, I've no idea why the KoSIT validator doesn't display them. (What's even weirder, in other cases, the KoSIT validator does issue warnings. For example, if you have an empty ram:DefinedTradeContact element, you get a warning from Rule PEPPOL-EN16931-R008: "Document MUST not contain empty elements." The overall outcome of the validation by the KoSIT validator in this case is "Acceptable".) I really don't want to read the code of the KoSIT validator to find out which criteria are used to decide wether a warning will be issued or not ;-) For warnings from mustangproject, please note that it currently has a bug that can case errors to be treated as warnings. I've alread submitted a pull request for this one and hope it'll be merged before the next release. (See #595). |
Using Mustang 2.15.0 CLI and PDF examples from current ZUGFeRD 2.3.2, for example XRECHNUNG_Reisekostenabrechnung.pdf I get errors on validation (notice that I mean the XML error, not the already known Java errors):
Instead, when validating the embedded XML with KoSIT Validator 1.5.0 the XRechnung is fully validated without any errors:
The text was updated successfully, but these errors were encountered: