[DFDL-WG] unordered sequence with constrained occurrences

Garriss Jr., James P. jgarriss at mitre.org
Tue Mar 5 08:42:37 EST 2013


Suppose text data has 3 constructs:  a, b, and c.


*       a must occur 1 time

*       b can occur 0 or 1 time

*       c can occur any number of times, 0 or more

These 3 constructs can appear in any order.

So these are valid inputs:

abc
a
bcccca

But these are not:

ccbcc
abbc
abcabc

Can data like this be modeled with DFDL?

The unordered sequence can be modeled with a data array, like this:

Array (0 to unbounded)
Sequence
  a (0 to 1)
  b (0 to 1)
  c (0 to 1)
/Sequence
/Array

But I don't know how to constrain the total number of occurrences.

Appreciate any ideas!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ogf.org/pipermail/dfdl-wg/attachments/20130305/85c78f02/attachment.html>


More information about the dfdl-wg mailing list