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

Scala API not handling XML entities in Infosets correctly

XMLWordPrintableJSON

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • s10
    • None
    • API
    • None

      According to Taylor, in the test for handling double newline entities as separators, there's a discrepancy between the result returned via our Scala api vs the java api. We are translating from JDOM to Scala Node to JDOM. So it keeps replacing entities when it doesn't need to.

      The infoset uses XML entities to represent '<' and '>' However, the ampersands in the entity are getting replaced. so

      &lt;

      becomes

      &amp;lt;

      instead of

      <

      See test doubleNL in the following files:
      daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section06/entities/charClassEntities.tdml
      daffodil-test/src/test/scala-debug/edu/illinois/ncsa/daffodil/section06/entities/TestEntities_01.scala
      daffodil-test/src/test/scala/edu/illinois/ncsa/daffodil/section06/entities/TestEntities.scala

      I created a version of the test that uses CDATA tags and literal '<' and '>' characters (doubleNL2) and this seems to be a good workaround.

              jchab Jessie Chab
              jchab Jessie Chab
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: