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

TLOG: Delimited parsing with occursCountKind="implicit" with separators is not handling missing optional elements correctly

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      This bug currently prevents the IBM4690-TLOG schema project from working.

      Example schema:

      <tdml:defineSchema name="s15">
        <dfdl:format ref="ex:daffodilTest1" lengthKind="delimited" encoding="ISO-8859-1" occursCountKind="implicit" textNumberCheckPolicy="strict" textNumberPadCharacter="0" textNumberJustification="right"
      lengthUnits="bytes" separatorSuppressionPolicy="trailingEmpty" separatorPosition="prefix"/>
      
        <xs:element name="testSeq" dfdl:lengthKind="delimited">
          <xs:complexType>
            <xs:sequence dfdl:initiatedContent="no" dfdl:separatorPosition="infix"
              dfdl:sequenceKind="ordered" dfdl:separator=":">
              <xs:element name="a" type="xs:int"/>
              <xs:element name="b" type="xs:int" minOccurs="0"/>
              <xs:element name="c" type="xs:int" minOccurs="0"/>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      
      </tdml:defineSchema>
      

      This schema should be able to parse the following scenarios:

      1:2:3 -> a=1, b=2, c=3

      1:2: -> a=1, b=2

      1::3 -> a=1, c=3

      1:: -> a=1

      Currently scenarios 1,2 and 4 work as expected, but scenario 3 ends up parsing as just a=1 and b and c are just skipped.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            dfthompson Dave Thompson
            jadams_tresys Josh Adams
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Issue deployment