Data Format Description Language (DFDL) v1.0 Specification
OGF Proposed Recommendation GFD-P-R.174, January 31, 2011
Variable-occurrence items include both variable-occurrence arrays and optional elements.
The number of occurrences of a variable-occurrence item may be specified in the data. This can be combined with delimiters for determining the number of occurrences, in which case the number of occurrences obtained by parsing using delimiters and any stored information must be consistent. It is a processing error if they are not.
To determine the logical contents and number of occurrences for an array, we examine the input stream trying to parse elements one by one with separators between them. Parsing for an optional element is similar, except there is only the possibility of one occurrence, so separators don't matter.
If the element is not found then defaulting occurs as described in 13.17 Properties for Default Value Control
It is a processing error if a separator is parsed successfully, but parsing does not find the subsequent element successfully, unless dfdl:separatorPolicy is 'postfix'.
On parsing and unparsing if the number of occurrences of an element is less than xs:minOccurs and the element has a default specified then the element is defaulted up to xs:minOccurs, otherwise it is a processing error.
Copyright (C) Open Grid Forum (2005-2010). All Rights Reserved.
This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the OGF or other organizations, except as needed for the purpose of developing Grid Recommendations in which case the procedures for copyrights defined in the OGF Document process must be followed, or as required to translate it into languages other than English.