The Eclipse IDE can be used to assist a user in the authoring of DFDL schemas. This page contains instructions for setting up the Eclipse Integrated-Development-Environment (IDE), and to configure its XML editing features so that they provide some level of support for authoring DFDL schemas.
DFDL extends a subset of XML Schema. Note however: an XML Schema is an XML document.
Now, turns out there is an XML Schema for DFDL Schemas. It was created by taking the XML Schema for XML Schemas, and subsetting it to just what DFDL uses, and then adding into it the XML Schema for DFDL's annotation objects.
The XML settings all assume you have installed Eclipse's XML support. If not already installed, the "Eclipse XML Editors and Tools" plugin can be obtained from Eclipse's update site.
Following are steps to modify the Eclipse XML settings to aid in the creation of DFDL schemas:
dfdl.xsd
*.dfdl.xsd
If also editing TDML file in Eclipse, repeat the above steps, replacing all instances of dfdl.xsd
with tdml
.
Download the following files to a local directory. Alternatively, these files are included in the Daffodil source code in the src/main/resources/org/apache/daffodil/xsd/
directory in either daffodil-lib/
or daffodil-propgen/
.
Modify the Eclipse settings to reference these files:
For each of the following files, select 'Add..' and provide the location on the 'File System…' or 'Workspace…', along with the key and key type
File | Key Type | Key |
---|---|---|
XMLSchema.dtd | Public ID | -//W3C//DTD XMLSCHEMA 200102//EN |
datatypes.dtd | Public ID | datatypes |
XMLSchema_for_DFDL.xsd | URI | http://www.w3.org/2001/XMLSchema |
DFDL_part3_model.xsd | URI | http://www.ogf.org/dfdl/dfdl-1.0/ |
tdml.xsd | URI | http://www.ibm.com/xmlns/dfdl/testData |