Open simon-gotomaxx opened 1 month ago
If your issue is a question if a mustang generated file is valid(?) please include either the complete source code and/or the complete output so that I can have a look and run it through a validator
I create the ZUGFeRD file in a custom application (Mustang is not used). I use Mustang (Mustang-CLI-2.11.0.jar) for validation and am wondering about the error message. Attached is the XML that produces the above error during validation. factur-x.zip
The error only occurs when I use SpecifiedTradeSettlementPaymentMeans multiple times. This should be possible according to the general ZUGFeRD documentation.
In the FACTUR-X schemas below the EXTENDED profile the cardinality of SpecifiedTradeSettlementPaymentMeans is [0..1].
Ah ok now I see it. <assert test=‘count(ram:SpecifiedTradeSettlementPaymentMeans)<=1’> Element ‘ram:SpecifiedTradeSettlementPaymentMeans’ may occur a maximum of 1 time.</assert (from the FACTUR-X_EN16931.sch schematron)
It is just a bit confusing as it is described in the documentation and even more so if it is allowed in xRechnung (EN16931).
According to the documentation, SpecifiedTradeSettlementPaymentMeans can be used multiple times to specify multiple banks. If I do this, I get an error message when validating:
`schema validation fails:org.xml.sax.SAXParseException; lineNumber: 273; columnNumber: 46; cvc-complex-type.2.4.a: Ungültiger Content wurde beginnend mit Element '{"urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":SpecifiedTradeSettlementPaymentMeans}' gefunden. '{"urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":ApplicableTradeTax}' wird erwartet.