Apache Daffodil DFDL Schema Template

Clone this repo:

Branches

  1. e75e627 Improvements to follow best practices. by Michael Beckerle · 3 months ago main
  2. f953e51 Fix 'sbt test' so it is no longer a no-op by Steve Lawrence · 3 months ago
  3. fe6107c Remove "test_" prefix from the TDML name by Steve Lawrence · 4 months ago
  4. 7a73491 Update to use Daffodil SBT Plugin 1.3.0 by Steve Lawrence · 4 months ago
  5. 5727528 Update dependency versions by Steve Lawrence · 10 months ago

Apache Daffodil DFDL Schema Template

This repository is a Giter8 template for Apache Daffodil DFDL schemas.

Usage

Install SBT and run the following command:

sbt new apache/daffodil-schema.g8

This command prompts for various properties and creates a bare-bones directory structure that follows the recommended DFDL Schema Project Layout and most recent best practices from the DFDL Schema Style Guide. This includes git and sbt configuration files, basic DFDL schema files, and TDML and test files.

Once you have generated your schema directory, typing sbt test will work and run a TDML test. Of course, the initial DFDL schema has no fields, the test data file is empty, and the expected XML Infoset file is an empty element. But, it's working and you can keep it working as you fill in the details of the schema and add tests.

The schema project is set up to use the daffodil-sbt plugin for SBT as part of the SBT build and test. This provides capabilities to compile your DFDL schema into binary form and package it for distribution. You can read more about daffodil-sbt here: Apache daffodil-sbt Plugin

Properties

The following properties are used to configure the generated DFDL schema project:

Testing

This repository uses the SBT Giter8 plugin to perform a single basic sanity check of template generation. To execute this check, run:

sbt test

This command generates a new project using the default.properties template values and then runs the SBT Scripted commands defined in src/test/g8/test to validate correct generation.

License

Apache Daffodil DFDL Schema Template is licensed under the Apache License, v2.0.