Configuration

Daffodil has the capability to read in parameters via an external XML file, defined by the dafext.xsd schema. Below are the parameters that can be defined.

External Variables

External variables can be defined using the externalVariablesBindings tag. For example, the following configuration file defines two variables, var1 and var2, in the http://example.com namespace.

<?xml version="1.0" encoding="UTF-8"?>
<dfdlConfig xmlns="http://www.w3.org/2001/XMLSchema" xmlns:ex="http://example.com">
  <externalVariableBindings>
    <bind name="ex:var1">-9</bind>
    <bind name="ex:var2">Foo</bind>
  </externalVariableBindings>
</dfdlConfig>

The following defined in a DFDL schema would allow the external variables to be set or overridden:

<dfdl:defineVariable name="var1" external="true" type="xsd:int">1</dfdl:defineVariable>
<dfdl:defineVariable name="var2" external="true" type="xsd:string">Bar</dfdl:defineVariable>

Tunable Parameters

Tunable parameters can be modified to change Daffodil schema compilation and data parsing properties. For example, the following sets the maxOccursBounds tunable to 1024:

<?xml version="1.0" encoding="UTF-8"?>
<dfdlConfig xmlns="http://www.w3.org/2001/XMLSchema" xmlns:ex="http://example.com">
  <tunables>
    <maxOccursBounds>1024</maxOccursBounds>
  </tunables>
</dfdlConfig>

See tunables for a description of the available tunable parameters.