Description
More than once the need has arisen to convert binary data to XML where the binary data contains a string of data that is already XML. That XML is not escapified XML, it's regular XML.
The surrounding binary data needs to be parsed and converted to XML, but the string of XML needs to simply be slammed into the XML text coming out of Daffodil.
The inverse needs to happen on unparsing - the XML corresponding to the string has to be written out as a string (without escaping) and incorporated into the binary data.
Note that such XML isn't necessarily adhering to DFDL's subset of XML schema. E.g., it may use attributes, etc.
Nevertheless, the combined XML - the XML you get corresponding to the binary data part, along with the string of XML embedded in it, the resulting complete XML document does have an XSD and could be validated (if not by Daffodil, then by a separate validator)