Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DAFFODIL-2882

Incorrect mapping from separatorPoliciy to separatorSuppressionPolicy

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.6.0
    • 3.7.0
    • Front End
    • None

    Description

      Daffodil allows use of the deprecated separatorPolicy property and internally maps it to the new separatorSupressionPolicy property. This is done here:

      https://github.com/apache/daffodil/blob/main/daffodil-lib/src/main/scala/org/apache/daffodil/lib/schema/annotation/props/ByHandMixins.scala#L198-L201

      So our mappings are:

      required -> never
      suppressed  -> anyEmpty
      suppressedAtEndStrict -> trailingEmpty
      suppressedAtEndLax -> trailingEmptyStrict 
      

      However, according to the errata document (https://ogf.org/documents/GFD.214.pdf), the mappings should be:

      required -> never
      suppressed -> anyEmpty
      suppressedAtEndLax -> trailingEmpty
      suppressedAtEndStrict -> trailingEmptyStrict
      

      Note that suppressedAtEndStrict and suppressedAtEndLax are swapped and do not match the errata document. Comparing the wording of older versions of the DFDL spec, it does seem like our mapping is incorrect.

      Attachments

        Activity

          People

            Unassigned Unassigned
            slawrence Steve Lawrence
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: