Steve Lawrence created DAFFODIL-2064:
----------------------------------------
Summary: CLI XML text output incorrect with empty complex elements.
Key: DAFFODIL-2064
URL: https://issues.apache.org/jira/browse/DAFFODIL-2064
Project: Daffodil
Issue Type: Bug
Components: CLI
Reporter: Steve Lawrence
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:
{code:xml}
<root>
<complex_with_no_children>
</complex_with_no_children>
</root>
{code}
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:
{code:xml}
<root>
<complex_with_no_children />
</rot>
{code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)