Setup XML

Getting eclipse to validate DFDL Schemas using its XML validation capabilities requires some configuration. Without this you will get hundreds (at least) of XML and XML Schema validation errors from the daffodil code base.

There are two files of interest to this located in your dfdl git repository:

IMPORTANT: These settings and catalog will change the configuration of eclipse substantially, and may not be suitable for projects other than Daffodil, so save your existing eclipse install directory and workspace's .metadata/.plugins/org.eclipse.core.runtime/.settings directory, if you are trying to share it across more than just Daffodil. You'll likely need to split out into two distinct workspaces and two distinct copies of eclipse.

Import XML Catalog

  1. Open Eclipse.
  2. Select File -> Import -> XML -> XML Catalog.
  3. Browse to and select daffodil-lib/src/main/resources/eclipse-xml-catalog.xml

Import Eclipse Settings

  1. Close Eclipse.
  2. Open Windows Explorer and open the folder of your local dfdl git repository.
  3. Navigate to the following file: daffodil-core/src/main/resources/eclipse-settings.zip
  4. Copy this file.
  5. Navigate to the location of your Eclipse workspace.

The eclipse settings zip file contains a .settings directory to be restored in your Eclipse workspace's ".metadata/.plugins/org.eclipse.core.runtime/.settings" directory.

To accomplish this:

  1. Navigate to ".metadata/.plugins/org.eclipse.core.runtime/".
  2. Here, paste the eclipse-settings.zip file.
  3. Right-click eclipse-settings.zip ->  7 Zip -> Extract Here
  4. You may be asked if you'd like to replace the files.  Select yes to all.

Test It Out

With the settings and XML Catalog above, you can edit DFDL Schemas, and get support from Eclipse.

For example,

Contrarywise....

Setup Linked Resources

Open Eclipse.

You need to describe where you cloned the daffodil repository.  To do so, perform the following:

  1. Go to Window -> Preferences -> General -> Workspace -> Linked Resources
  2. Under 'Defined path variables', click 'New...'
  3. Enter DAFFODIL_ROOT as the Name
  4. Enter the path to the daffodil repository in Location
  5. Click OK twice.