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

String-As-XML cause SDE on malformed XML data. Needs to be PE.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.6.0
    • None
    • Back End
    • None

    Description

      When using the string-as-XML feature, currently if the string that is supposed to be XML is malformed, then a WstxUnexpectedCharException (or other similar exception) gets thrown in the InfosetOutputter which is what does the string-of-XML to actual XML conversion. The InfosetOutputter is outside the scope of backtracking, so this error cannot be converted into a ParseError at this point. The InfosetOutputter currently escalates this to an SDE.

      That's not correct for a data problem. The parser could be speculating down a path where the string of data that is supposed to be XML is just gibberish. If that string is malformed XML, a Parse Error needs to occur so we can backtrack. 

      Converting Infoset into XML is normally something done by the InfosetOutputter, but in this case it cannot be.  It needs to be done in the string parser, and the Infoset needs to somehow cache the resulting XML so it can be handed off to the InfosetOutputter. 

      I think this has to work analogously to text numbers. We parse the string first, then convert to the data type, which for numbers is an integer/float/decimal, etc. This conversion can fail, and that's a Parse Error. String-as-XML needs to work the same way. The string is parsed via one of the lengthKind techniques, then it is converted into XML. If the conversion to XML fails, then it's a Parse Error. 

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            mbeckerle Mike Beckerle
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: