Ensure Bit/ByteOrderChange parsers always exist at root

If the dfdl:byteOrder or dfdl:bitOrder properties were not provided,
Daffodil did not complain, and it would not insert a Bit/ByteOrderChange
parser at root. This meant that Daffodil would use a default value,
which in some cases caused incorrect behavior. It also meant that the
check for valid bit and byte orders (e.g. not bigEndian &
leastSignificantBitFirst) never occurred since that only happend in
ByteOrderChange parsers, meaning it could allow invalid bit/byte order
combinations.

This changes Daffodil so the root element will always insert Bit and
ByteOrderChange parsers, ensuring that the validity of the properties
are correct and ensuring correct parsing/unparsing. This means that
byteOrder is now always required, even in some cases where it might not
technically be needed.

This also modifies the initial UState/PState creation to not set
bit/byte order, but to instead rely on the Bit/ByteOrderChange parsers
to always be inserted first thing.

DFDL-1835
13 files changed
tree: 191d731552eb82d8c806b93414913857aa22178a
  1. .idea/
  2. daffodil-cli/
  3. daffodil-core/
  4. daffodil-io/
  5. daffodil-japi/
  6. daffodil-lib/
  7. daffodil-macro-lib/
  8. daffodil-propgen/
  9. daffodil-runtime1/
  10. daffodil-runtime1-unparser/
  11. daffodil-sapi/
  12. daffodil-tdml/
  13. daffodil-test/
  14. daffodil-test-ibm1/
  15. eclipse-projects/
  16. project/
  17. test-stdLayout/
  18. tutorials/
  19. .classpath
  20. .ensime
  21. .gitignore
  22. build.sbt
  23. LICENSE
  24. README.md
README.md

Daffodil

Introduction

Daffodil is the open source implementation of the Data Format Description Language (DFDL), a specification created by the Open Grid Forum. DFDL is capable of describing many data formats, including textual and binary, commercial record-oriented, scientific and numeric, modern and legacy, and many industry standards. It leverages XML technology and concepts, using a subset of W3C XML schema type system and annotations to describe such data. Daffodil uses this description to parse data into an infoset represented as XML or JSON, easily capable of ingestion, validation, and transformation.

For more information about Daffodil, see the Daffodil Wiki.

Build Requirements

  • JDK 1.8
  • Scala 2.11.8
  • SBT 0.13.8

Getting Started

To build Daffodil:

$ sbt clean package

To run all Daffodil tests:

# run all unit tests
$ sbt test 
# run all command line tests
$ sbt cli

To build the Daffodil CLI:

$ sbt stage

The above will create Linux and Windows shell scripts in daffodil-cli/target/universal/stage/bin/. See the Daffodil CLI for details on its usage.

Getting Help

For questions, we can be reached on the Daffodil users mailing list or in the #Daffodil room on NCSA HipChat. Bugs can be reported via the Daffodil JIRA, or via email at daffodil-fouo-support@tresys.com for company confidential, FOUO, or security relevant issues.

License

Daffodil is licensed under the University of Illinois/NCSA Open Source License.