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


23. Expression language

The DFDL expression language allows the processing of values conforming to the data model defined in the DFDL Infoset. It allows properties in the DFDL schema to be dependent of the contents of an instance of a DFDL document, a DFDL variable or another property in the schema. For example the length of an element can be made dependent on the contents of another element in the document.

The main uses of the expression language are as follows:

  1. When a DFDL property needs to be set dynamically at parse time from the contents of one or more elements of the data. Properties such as initiator, terminator, length, separator, and nilValues accept an expression.

  2. In a dfdl:assert annotation

  3. In a dfdl:discriminator annotation to resolve uncertainty when parsing

  4. In a dfdl:inputValueCalc property to derive the value of an element in the logical model that doesn’t exist in the physical data.

  5. In a dfdl:outputValueCalc property to compute the value of an element on unparsing.

  6. As the value in a dfdl:setVariable annotation or the dfdl:defaultValue in a dfdl:defineVariable.

The DFDL expression language is a subset of XPath 2.0 [XPath2]. DFDL uses a subset of XML schema and has a simpler information model, so only a subset of XPath 2.0 expressions is meaningful in DFDL Schemas. For example there are no attributes in DFDL so the attribute axis is not needed.


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.