I am trying to parse an INSDES D98A EDIFACT message using Smooks Cartridge 2.0.0-M3.
I found myself trying to fix an unkown problem for days and I have finally found a problem which is related to the following EDIFACT element:
Elements 5+974561:SA and 123:SA' are repeating elements. As it is with EDIFACT for Syntax 3 i.e. UNA:+.? 'UNB+UNOC:3+(...) the repeat separator is "*" so the example above would not work. If changed to
PIA+5+974561:SA*123:SA' it works fine.
However when using syntax 4 i.e.
UNA:+.? 'UNB+UNOC:4+(...) I should be able to manually specify the repeat separator. However even if I specify it with UNA like:
UNA:+.?*' the parsing fails.
It should be working without specifying UNA completely due to that part:
<xsd:element name="RepeatSeparator" type="xsd:string" default="*" dfdl:length="1" dfdl:lengthKind="explicit" dfdl:escapeSchemeRef="" dfdl:textTrimKind="none">
<xsd:annotation>
<xsd:appinfo source="
http://www.ogf.org/dfdl/">
<!-- If v3 syntax then assume field separator -->
<dfdl:setVariable ref="ibmEdiFmt:RepeatSep" value="{if (. eq ' ') then ../FieldSeparator else .}"/>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
of the EDIFACT-Service-Segments-4.1.xsd file (it copied the FieldSeparator = '+') but it does not work.
I need a way to parse the following pretty standard line:
PIA+5+974561:SA+123:SA'
Does anyone know how this can be solved with smooks cartridges?
Regards,
Mateusz