I am trying to parse an EDIFACT interchange that uses syntax level 3 and the comma as decimal separator, and where the interchange has the following UNA header segment:
UNA:+,? '
My smooks (2.0.0-M1) setup is as follow (Kotlin code):
val schemaUri = "d04b/EDIFACT-Messages.dfdl.xsd"
val smooks = Smooks()
val reader = EdifactReaderConfigurator(schemaUri).setMessageTypes(myMessageTypes)
reader.cacheOnDisk = true
reader.setDecimalSign(",")
smooks.setReaderConfig(reader)
val filterSettings = FilterSettings.newSaxNgSettings().setReaderPoolSize(5)
smooks.setFilterSettings(filterSettings)
smooks.setExports(Exports(StringResult::class.java))
When I try to parse an interchange with the above UNA header, I get the following error:
org.smooks.api.SmooksException: Failed to filter source
[...]
Caused by: org.smooks.api.SmooksException: Schema Definition Error: Non-distinct property ',' found in: textStandardGroupingSeparator, textStandardDecimalSeparator
Schema context: E0017 Location line 3334 column 14 in jar:file:.m2/repository/org/smooks/cartridges/edi/edi-schemas/2.0.0-RC1/edi-schemas-2.0.0-RC1.jar!/EDIFACT-Common/EDIFACT-Service-Segments-4.1.dfdl.xsd
Parsing does work fine if I omit the UNA segment and if I use the default UNA:+.? ' with decimal point instead of comma – even though my configuration explicitly sets the comma as default decimal separator.
Is there any particular configuration I am missing?