Invalid xsd files for edifact cartridge?

54 views
Skip to first unread message

Stefan Dietl

unread,
Jul 18, 2023, 7:59:00 AM7/18/23
to Smooks Users
Hello all,

to me it is not clear how those xds files for the edifact cartridges are generated or created. It looks like they are not valid. At least it is not possible to parse edifact files even when they are recognized as valid in other validation tools. Do we have a bug here or am I doing something wrong? It doesn't matter if I use validation mode FULL or LIMITED.

One example: ORDERS file

I get this error message:

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.png

But according to this (truugo) and other pages "21" is a valid value here.

validationTool.png

Any help or hints appreciated

Stefan Dietl

unread,
Jul 18, 2023, 1:48:47 PM7/18/23
to Smooks Users
I guess this is somehow related to https://github.com/smooks/smooks-edi-cartridge/issues/185. This bug should be fixed in v2.0.0-RC2. But it isn't.

Claude Mamo

unread,
Jul 19, 2023, 2:57:11 AM7/19/23
to smook...@googlegroups.com
Stefan, It turns out that issue 185 might have caused a regression: it resolved some code lists but broke others. I'm working on a fix but I'd appreciate it if you could create an issue. As noted elsewhere, EDIFACT directories are notorious to parse since they are, for the most part, described in free-form text. In your case, the Smooks directory parser is assuming that the indentation declaring a new code doesn't change but this assumption is wrong. The indentation will change for numeric codes that are bigger than 9 as shown below:

* 6063  Quantity qualifier

  Desc: Code giving specific meaning to a quantity.

  Repr: an..3

        1 Discrete quantity
             Self explanatory.
        2 Charge
             Quantity relevant for charge.
        3 Cumulative quantity
             Self explanatory.
        8 Inventory quantity at supplier's subject to inspection by
          customer
             Quantity of goods which the customer requires the
             supplier to have in inventory and which may be inspected
             by the customer if desired.
       11 Split quantity
             Part of the whole quantity.
       12 Despatch quantity
             Quantity despatched by the seller.
       17 Quantity on hand
             Self explanatory.


It doesn't matter if I use validation mode FULL or LIMITED.

Have you tried setting validation mode Off? Alternatively, as a workaround, you can manually add the needed codes to the DFDL schema.

Claude

On Tue, Jul 18, 2023 at 7:48 PM 'Stefan Dietl' via Smooks Users <smook...@googlegroups.com> wrote:
I guess this is somehow related to https://github.com/smooks/smooks-edi-cartridge/issues/185. This bug should be fixed in v2.0.0-RC2. But it isn't.

On Tuesday, 18 July 2023 at 13:59:00 UTC+2 Stefan Dietl wrote:
Hello all,

to me it is not clear how those xds files for the edifact cartridges are generated or created. It looks like they are not valid. At least it is not possible to parse edifact files even when they are recognized as valid in other validation tools. Do we have a bug here or am I doing something wrong? It doesn't matter if I use validation mode FULL or LIMITED.

One example: ORDERS file
Off
I get this error message:

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.png

But according to this (truugo) and other pages "21" is a valid value here.

validationTool.png

Any help or hints appreciated


Adresse: Conrad Electronic SE, Klaus-Conrad-Str. 1, 92240 Hirschau


Geschäftsführende Direktoren: Ralf Bühler (Vorsitzender), Jürgen Groth, Dr. Sebastian Dehnen

Handelsregister: Amtsgericht Amberg HRB 3896


Diese E-Mail kann (streng) vertrauliche und damit rechtlich geschützte Informationen enthalten. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.

--
You received this message because you are subscribed to the Google Groups "Smooks Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to smooks-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/smooks-user/cdf6dca7-c58b-4cad-b77f-1542d1b0981dn%40googlegroups.com.

Stefan Dietl

unread,
Jul 19, 2023, 4:47:51 PM7/19/23
to Smooks Users
Thank you for the fast reply, Claude. I created issue https://github.com/smooks/smooks-edi-cartridge/issues/236
Reply all
Reply to author
Forward
0 new messages