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

DPath: Query-style expressions - was: fn:count cannot be used to count items in a sequence

Agile BoardAttach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • s15
    • None
    • Back End, DFDL Language
    • None

    Description

      Note: This is an issue with the dpath implementation

      This is similar to DFDL-1075, but different enough to be its own ticket.

      Previously, you could use the fn:count function to count the items in a sequence. e.g if you had a sequence like the following:
      <types_of_fruits>
      <apples>5</apples>
      <oranges>4</oranges>
      <pears>1</pears>
      </types_of_fruits>
      You could specify fn:count(types_of_fruits) and it would return 3. If you try that with the DPath implementation, you get the following:

      [error] Test edu.illinois.ncsa.daffodil.section23.dfdl_expressions.TestDFDLExpressions.test_more_count_0 failed: java.lang.Exception: Schema Definition Error: Subset The count function must reference a single array.

      See tests:
      test_more_count_0
      test_more_count_1
      test_more_count_2
      test_more_count_1b_2
      test_more_count_1b

      (these are in the serialization-with-dpath4-testcleanup branch, and have not yet been pulled into 0.15.0)

      Attachments

        Activity

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

          People

            Unassigned Unassigned
            daffodil-jchab Jessie Chab

            Dates

              Created:
              Updated:

              Slack

                Issue deployment