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

DaffodilXMLLoader - eliminate error handler and return diagnostics

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

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.1.0
    • None
    • Clean Ups, Diagnostics
    • None

    Description

      There is a lot of complex code in Daffodil to deal with parsing DFDL Schemas as XML, parsing XML docs such as TDML files etc.

      The complexity to some degree is caused by the way SAX parsers report errors, which is by side-effect calls to an error handler object.

      Daffodil is largely functional programming, and this side-effect style just has to be worked around everyplace we load/validate XML.

      The DaffodilXMLLoader really should be a function that returns type:

      (Option[Elem],Seq[SAXParseException])

      A standard call can then also convert these SAXParseException into SDE/SDW for use from the schema compiler.

      The TDML Runner loading of data files and such wants to treat the errors/warnings differently, so that's why the DaffodilXMLLoader cannot always convert to SDE/SDW objects uniformly.

      This would clean up the code substantially.

       

       

      Attachments

        Activity

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

          People

            Unassigned Unassigned
            mbeckerle Mike Beckerle

            Dates

              Created:
              Updated:

              Slack

                Issue deployment