Data Format Description Language (DFDL, often pronounced ''daff-o-dil'') is a modeling language for describing general text and
binary data
Binary data is data whose unit can take on only two possible states. These are often labelled as 0 and 1 in accordance with the binary numeral system and Boolean algebra.
Binary data occurs in many different technical and scientific fields, wh ...
in a standard way. It was published as an
Open Grid Forum Recommendation in February 2021, and in April 2024 was published as an
ISO
The International Organization for Standardization (ISO ; ; ) is an independent, non-governmental, international standard development organization composed of representatives from the national standards organizations of member countries.
Me ...
standard.
A DFDL model or schema allows any text or binary data to be read (or "parsed") from its native format and to be presented as an instance of an ''information set''. (An information set is a logical representation of the data contents, independent of the physical format. For example, two records could be in different formats, because one has fixed-length fields and the other uses delimiters, but they could contain exactly the same data, and would both be represented by the same information set). The same DFDL schema also allows data to be taken from an instance of an information set and written out (or "serialized") to its native format.
DFDL is ''
descriptive
In the study of language, description or descriptive linguistics is the work of objectively analyzing and describing how language is actually used (or how it was used in the past) by a speech community. François & Ponsonnet (2013).
All aca ...
'' and not ''
prescriptive''. DFDL is not a data format, nor does it impose the use of any particular data format. Instead it provides a standard way of describing many different kinds of data formats. This approach has several advantages. It allows an application author to design an appropriate data representation according to their requirements while describing it in a standard way which can be shared, enabling multiple programs to directly interchange the data.
DFDL achieves this by building upon the facilities of
W3C XML Schema 1.0. A subset of XML Schema is used, enough to enable the modeling of non-XML data. The motivations for this approach are to avoid inventing a completely new schema language, and to make it easy to convert general text and binary data, via a DFDL information set, into a corresponding XML document.
Educational material is available in the form of DFDL Tutorials, videos and several hands-on DFDL labs.
History
DFDL was created in response to a need for grid APIs to be able to understand data regardless of source. A language was needed capable of modeling a wide variety of existing text and binary data formats.
working groupwas established at the Global Grid Forum (which later became the
Open Grid Forum) in 2003 to create a specification for such a language.
A decision was made early on to base the language on a subset of
W3C XML Schema
XSD (XML Schema Definition), a recommendation of the World Wide Web Consortium (W3C), specifies how to formally describe the elements in an Extensible Markup Language (XML) document. It can be used by programmers to verify each piece of item cont ...
, using
annotations to carry the extra information necessary to describe non-XML physical representations. This is an established approach that was already being used by 2003 in commercial systems. DFDL takes this approach and evolves it into an open standard capable of describing many text or binary data formats.
Work continued on the language, resulting in the publication of a DFDL 1.0 specification as OGF Proposed Recommendation GFD.174 in January 2011.
The official OGF Recommendation is no
GFD.240
published in February 2021 which obsoletes all prior versions and incorporates all issues noted to date (also available a
.
summary
of DFDL and its features is available at the OGF. Any issues with the specification are being tracked using GitHu
issue trackers
In April 2024, DFDL was published a
by way of th
process. The standard is available from ISO but will remain publicly available from the Open Grid Forum as well.
Implementations
Implementations of DFDL processors that can parse and serialize data using DFDL schemas are available.
* IBM has multiple DFDL implementations.
** a production-ready DFDL 1.0 streaming parser, modeler and visual tester. This is available in several IBM products including IBM App Connect Enterprise (formerly known a
IBM Integration Bus
.
free developer edition
is available.
*
IBM z/TPF DFDL
which is part of the IBM Mainframe z/Transaction Processing Facility.
Apache Daffodil
is an open-source DFDL processor having both parser and unparser, an IDE that is an extension of VSCode, as well as integrations into Apache NiFi, th
XML Calabash XProc pipeline engine
an
Smooks
It continues to be under active development.
* European Space Agency projec
S2G Data Viewer
includes a parser DFDL4SDFDL4S
/ref> that implements a subset of the DFDL 1.0 specification.
A public repository for DFDL schemas that describe commercial and scientific data formats has been established o
GitHub
DFDL schemas for formats like UN/EDIFACT, NACHA, MIL-STD-2045, NITF, and ISO8583 are available for free download.
Example
Take as an example the following text data stream which gives the name, age and location of a person:
The logical model for this data can be described by the following fragment of an XML Schema document. The order, names, types and cardinality of the fields are expressed by the XML schema model.
To additionally model the physical representation of the data stream, DFDL augments the XML schema fragment with annotations on the xs:element and xs:sequence objects, as follows:
The property attributes on these DFDL annotations express that the data are represented in an ASCII text format with fields being of variable length and delimited by commas
An alternative, more compact syntax is also provided, where DFDL properties are carried as non-native attributes on the XML Schema objects themselves.
Features
The goal of DFDL is to provide a rich modeling language capable of representing any text or binary data format. The 1.0 release is a major step towards this goal. The capability includes support for:
* Text data types such as strings, numbers, zoned decimals, calendars and Booleans
* Binary data types such as two's complement integers, BCD, packed decimals, floats, calendars and Booleans
* Fixed length data and data delimited by text or binary markup
* Language data structures found in languages like COBOL
COBOL (; an acronym for "common business-oriented language") is a compiled English-like computer programming language designed for business use. It is an imperative, procedural, and, since 2002, object-oriented language. COBOL is primarily ...
, C and PL/1
* Industry standards such as CSV, SWIFT, FIX, HL7, X12, HIPAA, EDIFACT
United Nations/Electronic Data Interchange for Administration, Commerce and Transport (UN/EDIFACT) is an international standard for electronic data interchange (EDI) developed for the United Nations and approved and published by UNECE, the UN Econ ...
, ISO 8583
* Any encoding and endian-ness
* Bit data of arbitrary length
* Pattern languages for text numbers and calendars
* Ordered, unordered and floating content
* Default values on parsing and serializing
* Nil values capability for handling out-of-band data
* Fixed and variable arrays
* XPath
XPath (XML Path Language) is an expression language designed to support the query or transformation of XML documents. It was defined by the World Wide Web Consortium (W3C) in 1999, and can be used to compute values (e.g., strings, numbers, or ...
2.0 expression language including variables to model dynamic data
* Speculative parsing and other mechanisms to resolve choices and optionality
* Validation to XML Schema 1.0 rules
* A scoping mechanism that allows common property values to be applied at multiple annotation points
* Hiding elements in the data from the information set
* Calculating element values for the information set
See also
* Open Grid Forum
* W3C XML Schema
XSD (XML Schema Definition), a recommendation of the World Wide Web Consortium (W3C), specifies how to formally describe the elements in an Extensible Markup Language (XML) document. It can be used by programmers to verify each piece of item cont ...
References
{{Reflist
External links
Open Grid Forum
OGF DFDL home page
OGF DFDL 1.0 specification GFD.240 (pdf)
W3C XML Schema 1.0
DFDL Working Group documents
including videos
DFDLSchemas on GitHub
XML Calabash
Data modeling languages
Grid computing