Daffodil has the capability to read in various parameters via an external XML file. 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 to variables, var1
and var2
, in the http://example.com
namespace.
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="UTF-8"?>
<externalVariableBindings xmlns="http://www.w3.org/2001/XMLSchema" xmlns:ex="http://example.com">
<bind name="ex:var1">-9</bind>
<bind name="ex:var2">Foo</bind>
</externalVariableBindings> |
These would allow the external variables to be set or overridden, if defined in a DFDL schema like so:
Code Block | ||||
---|---|---|---|---|
| ||||
<dfdl:defineVariable name="var1" external="true" type="xsd:int">1</dfdl:defineVariable>
<dfdl:defineVariable name="var2" external="true" type="xsd:string">Bar</dfdl:defineVariable> |
Configuration Schema
Below is the schema that defines this XML file:
...
language | xml |
---|---|
title | Configuration Schema |
...