ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum IndexWebSphere Message Broker SupportDFDL and backtracking - X12 data

Post new topicReply to topic
DFDL and backtracking - X12 data View previous topic :: View next topic
Author Message
wyatt
PostPosted: Fri Feb 16, 2018 6:23 am Post subject: DFDL and backtracking - X12 data Reply with quote

Voyager

Joined: 28 Nov 2004
Posts: 76

Hi

Can anyone point to an example of correct usage of DFDL annotation initiatedContent=yes and discriminators.

We are parsing X12 data (tag delimited EDI). Segments are identified with initiatedContent=yes - when a failure occurs the parser backtracks looking for alternate paths - this ultimately reports failure which is misleading.

Also tried adding discriminators (which evaluate to true) here too, the parser backtracks and results in misleading failure location.

Thoughts/comments/examples would be much appreciated.

Thanks so much!
Back to top
View user's profile Send private message
timber
PostPosted: Fri Feb 16, 2018 7:19 am Post subject: Reply with quote

Sentinel

Joined: 25 Aug 2015
Posts: 815

initiatedContent='yes' is designed to simplify the modelling of a choice that contains tagged fields/structures. Normally, if the tag has matched then you don't want to backtrack past that point in the data - you want the choice to be resolved (discriminated) by the tag.
If you are unfortunate enough to have a choice of tagged structures and there are different structures that can have the same tag...then you don't want to use intiatedContent='yes' (because backtracking is the only way to successfully parse that type of structure).

Quote:
Segments are identified with initiatedContent=yes - when a failure occurs the parser backtracks looking for alternate paths - this ultimately reports failure which is misleading.
The initiatedContent='yes' is a property of the choice group - not a property of the members of the choice group. It (implicitly) asserts that the content of the choice group is tagged with unique tags, and none of the tags is a prefix of any other tag.
Back to top
View user's profile Send private message
wyatt
PostPosted: Fri Feb 16, 2018 7:38 am Post subject: Reply with quote

Voyager

Joined: 28 Nov 2004
Posts: 76

Were using intiatedContent on sequences as each have unique initiators that identify that they exist.

Using this annotation is not helping with backtracking but its not causing any schema error either. So can it be used in this context too or only applicable in choice groups?
Back to top
View user's profile Send private message
timber
PostPosted: Sat Feb 17, 2018 10:18 am Post subject: Reply with quote

Sentinel

Joined: 25 Aug 2015
Posts: 815

It's fine to use initiatedContent on a sequence - the DFDL specification explicitly says so. But...
Quote:
Were using intiatedContent on sequences as each have unique initiators that identify that they exist.
I think this may be where you're going wrong. You need to put the initiatedContent property on the parent sequence. Not on the sequence groups that represent the X12 segments. See my comment above re: choice groups and what the initiatedContent property is asserting.
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker SupportDFDL and backtracking - X12 data
Jump to:



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP


Theme by Dustin Baccetti
Powered by phpBB 2001, 2002 phpBB Group

Copyright MQSeries.net. All rights reserved.