Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DFDL-1498

Content of fixed-format fields not properly preserved.

XMLWordPrintableJSON

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 2.0.0
    • 1.1.0
    • Back End
    • None

      from Jason Ostermann.

      Our core lessons learned from working with IBM DFDL and Daffodil are:
      ..... (items 1-3 omitted)
      4) Daffodil "pretty prints" data by materially changing the content of
      fixed format fields.

      We need to insure that our pretty printing of output does't insert whitespace or otherwise modify field values other than things we must do to conform to XML Infoset, such as replacing NUL with &E000; and such. Pretty printing generally looks at line lengths and inserts new lines. This can change the length of strings, for example.

      <f>adfa987987asdf345345345sdfadsfsadfad</f>

      might come out as

      <f>
        adfa987987asdf345345345sdfadsfsadfad
      </f>

      and that adds several characters to the string. Our pretty printing should never do this to simple type elements. We can insert whitespace between simple elements and between complex elements, but not within simple elements.

      Some tools and pretty printers seem to only preserve whitespace if one has CDATA bracketing like

      <f><![CDATA[adfa987987asdf345345345sdfadsfsadfad]]></f>

      but inserting these CDATA wrappers around every xs:string value makes the XML representation of the infoset quite clumsy, unexpected, etc.

      We'd be better off just removing pretty printing, or changing the default to off, and having an option to turn it on.

              efinnegan Elizabeth Finnegan
              mbeckerle.dfdl Mike Beckerle
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: