Data Format Description Language (DFDL) v1.0 Specification
OGF Proposed Recommendation GFD-P-R.174, January 31, 2011


16. Arrays and Optional Elements: Properties for Repeating and Variable-Occurrence Data Items

These properties are for arrays (xs:maxOccurs >1 or unbounded) or optional elements (xs:minOccurs = 0 and xs:maxOccurs = 1) and apply to local elements and element references.

Property Name

Description

occursCountKind

Enum

Specifies how the actual number of occurrences is to be established.

Valid values 'fixed', ‘expression’, 'parsed’ ,‘stopValue’

‘fixed’ means use the value of the xs:maxOccurs on the declaration. It is a schema definition error if the value for xs:minOccurs is not equal to xs:maxOccurs.

‘expression’ means use the value of the dfdl:occursCount property. Applies during parsing only. On unparsing the number of occurrences in the infoset is used, defaulted up to xs:minOccurs if necessary.

'parsed' means that the number of occurrences is determined by normal speculative parsing such as discriminating by the initiator

‘stopValue’ means look for a logical stop value which signifies the end of the occurrences.

Annotation: dfdl:element

occursCount

Non-negative Integer or DFDL Expression

Specifies the number of occurrences of the element.

This property can be computed by way of an expression which returns an integer. The expression must not contain forward references to elements which have not yet been processed.

Annotation: dfdl:element,

occursStopValue

List of DFDL Logical Values

A space separated list of logical values that specify the alternative logical stop values for the element.

Only used when dfdl:occursCountKind='stopValue'.

When parsing then if an occurrence of the element has a logical value that matches one of the values in this list then the parser must not expect any more occurrences of the element.

On unparsing the first value will be inserted as the last value in the array after all of the occurrences in the infoset have been output.

Annotation: dfdl:element

The above properties handle a logical one-dimensional array of any type.

In some situations arrays of elements and sequence groups of elements seem to be similar; however, there is no notion of the array itself independent of its contained elements. Arrays are distinctly different from sequence groups in this way.

A sequence can have its own initiator, and an element having that sequence as its type can also have its own element initiator, so you could express two different initiators.

Unlike a sequence group, an array does not have its own initiator, terminator, or alignment. Those properties apply to each of the child elements of the array. To give an alignment, initiator, separator or terminator for an entire array you must enclose the element declaration for the array in a sequence group and specify the alignment, separator, initiator and terminator on the sequence group.


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.