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

CLI XML text output incorrect with empty complex elements.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.4.0
    • CLI
    • None

    Description

      Imagine we have a schema with a compex element that has all optional children and data where the none of the children exist. Or a similar case where all the children of a complex element are hidden. In such cases, the XMLTextInfosetOutputter will output something like this:

      <root>
        <complex_with_no_children>
        </complex_with_no_children>
      </root>
      

      To a non-schema aware XML parser, complex_with_no_children will look like a simple type with whitespace content instead of an empty complex type, which can cause problems.

      Instead, the XMLTextInfosetOutputter should detect when a complex element will not have any text output (i.e. no children, or all children are hidden), and instead output an element with no content , so the above should look more like:

      <root>
        <complex_with_no_children />
      </rot>
      

      Attachments

        Activity

          People

            jadams_tresys Josh Adams
            slawrence Steve Lawrence
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: