Change recoverable errors to validation errors instead of schema definition warnings

A dfdl:assert with failureType="recoverableError" currently results in a
schema definition warning. However, SDW's are usually used for things
that can be safely ignored, while these asserts are generally used for
validation checking beyond the capabilities of XSD that should not be
ignored, or should at least be treated differently than warnings so that
a user can easily differentiate between the two.

This modifies these recoverable errors to become validation errors,
accessible just like those created when validation is turned on. This
also refactors the handling of errors to avoid duplication between
assert expressions and assert patterns, as well as changes to make error
messages more consistent.

Note that this is a non-backwards compatible change, but is arguably the
more correct behavior since these asserts really are predominantly used
for more complex validation checks.

DAFFODIL-2357
7 files changed
tree: 6bac1d4af57b73ccd5abce4c8b3ad641d5ded93d
  1. .github/
  2. containers/
  3. daffodil-cli/
  4. daffodil-core/
  5. daffodil-io/
  6. daffodil-japi/
  7. daffodil-lib/
  8. daffodil-macro-lib/
  9. daffodil-propgen/
  10. daffodil-runtime1/
  11. daffodil-runtime1-layers/
  12. daffodil-runtime1-unparser/
  13. daffodil-runtime2/
  14. daffodil-sapi/
  15. daffodil-schematron/
  16. daffodil-tdml-lib/
  17. daffodil-tdml-processor/
  18. daffodil-test/
  19. daffodil-test-ibm1/
  20. daffodil-udf/
  21. project/
  22. test-stdLayout/
  23. tutorials/
  24. .asf.yaml
  25. .codecov.yml
  26. .gitattributes
  27. .gitignore
  28. .sbtopts
  29. .sonar-project.properties
  30. BUILD.md
  31. build.sbt
  32. KEYS
  33. LICENSE
  34. NOTICE
  35. README.md
README.md

Apache Daffodil is an open-source implementation of the DFDL specification that uses DFDL data descriptions to parse fixed format data into an infoset. This infoset is commonly converted into XML or JSON to enable the use of well-established XML or JSON technologies and libraries to consume, inspect, and manipulate fixed format data in existing solutions. Daffodil is also capable of serializing or “unparsing” data back to the original data format. The DFDL infoset can also be converted directly to/from the data structures carried by data processing frameworks so as to bypass any XML/JSON overheads.

For more information about Daffodil, see https://daffodil.apache.org/.

Build Requirements

  • JDK 8 or higher
  • SBT 0.13.8 or higher
  • C compiler C99 or higher
  • Mini-XML Version 3.0 or higher

See BUILD.md for more details.

Getting Started

SBT is the officially supported tool to build Daffodil. Below are some of the more commonly used commands for Daffodil development.

Compile

Compile source code:

sbt compile

Tests

Run unit tests:

sbt test

Run command line interface tests:

sbt IntegrationTest/test

Command Line Interface

Build the command line interface (Linux and Windows shell scripts in daffodil-cli/target/universal/stage/bin/; see the Command Line Interface documentation for details on their usage):

sbt daffodil-cli/stage

License Check

Run Apache RAT (license audit report in target/rat.txt and error if any unapproved licenses are found):

sbt ratCheck

Test Coverage Report

Run sbt-scoverage (report in target/scala-ver/scoverage-report/):

sbt clean coverage test IntegrationTest/test
sbt coverageAggregate

Getting Help

You can ask questions on the dev@daffodil.apache.org or users@daffodil.apache.org mailing lists. You can report bugs via the Daffodil JIRA.

License

Apache Daffodil is licensed under the Apache License, v2.0.