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

Line numbers in error messages off by size of comments above

    XMLWordPrintableJSON

Details

    Description

      Steven Williams reports that line numbers are off in diagostic messages, and seemingly by just the size of preceding XML comments in the schema.

      While parsing a data file, a parsing error reports the incorrect line number in the schema.

      [error] Parse Error: Assertion failed.

      { ../Octet1/APC eq 1 }

      failed

      Parsed value was: ��� a whole lot of XML���

      Schema context: element.APC Location line 283 column 8 in file:/H:/git/cat062/dfdl/cat062.dfdl.xsd

      Line 283 in the schema is

      <xs:element name=���FX��� type=���cat062:bool��� />

      The line in the schema containing the test listed in the error message is inside the following xs:element, which starts at line 287 (the test is on line 290).

      Our schema contains a company policy-mandated comment block at the top of the schema, similar to

      <!���

      // ****

      // Company Proprietary

      //

      // Copyright �� 2016

      // Disclaimer

      // ****

      -->

      If I remove that comment block or reduce it to <!-- --> on a single line, the schema line referenced in the error message now correctly points to the start of the element containing the failed test.

      This should also show up on the schemas in github.com/DFDLSchemas as they have much larger multi-line comment blocks that would throw the error line number a lot further off.

      Steve

      Attachments

        Activity

          People

            slawrence Steve Lawrence
            mbeckerle Mike Beckerle
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: