smooks / smooks-edi-cartridge

Smooks EDI & EDIFACT cartridges for reading as well as writing EDI
https://www.smooks.org
Other
20 stars 14 forks source link

Invalid edifact schemas in 2.0.0-RC2 #236

Closed dietl-conrad closed 1 year ago

dietl-conrad commented 1 year ago

Describe the bug

When trying to parse a valid edifact d96a ORDERS file with Smooks#filterSource a parsing exception is thrown:

Caused by: org.smooks.api.SmooksException: Validation Error: E6063 failed facet checks due to: facet enumeration(s): 1|2|3|8 Schema context: E6063 Location line 2180 column 14 in jar:file:.../.gradle/caches/modules-2/files-2.1/org.smooks.cartridges.edi/edifact-schemas/2.0.0-RC2/2a9680cfde02150481b654bc4ff52e65870ffaa3/edifact-schemas-2.0.0-RC2-d96a.jar!/d96a/EDIFACT-Segments.dfdl.xsd

The xds file indeed only specifies the options "1|2|3|8"

xsd

But according to this (truugo) and other pages "21" is a valid value here. Also available in the ZIP files of UNECE.

validationTool

To Reproduce

Pass a valid edifact d96a ORDERS file with value "21" for segment E6063 to Smooks#filterSource method.

Expected behavior

It's expected that the edifact file is parsed without exceptions.

Environment

Example:

dietl-conrad commented 1 year ago

This problem should already be fixed with https://github.com/smooks/smooks-edi-cartridge/issues/185. But it seems some parsing is still not possible.

cjmamo commented 1 year ago

185 might have a caused a regression. Incomplete code lists are being generated for the following EDIFACT directories: d94a, d95b, d96a, d96b, d97a, d97b, d98a, d98b, and d99a.