Some applications can make use of existing XML parsers for automated data manipulation (e.g. with XPath/XQuery/XSLT, but not necessarily), and since HTML parsing rules derive from SGML, it might be useful to generate output that passes both as valid HTML5 and as well-formed XML.
For example, the following self-closing element:
<input checked>
upon enabling such an option would become like:
<input checked="checked" />
(Note the space in front of the trailing slash, which is required here by SGML-derived HTML parsing rules.)
Some applications can make use of existing XML parsers for automated data manipulation (e.g. with XPath/XQuery/XSLT, but not necessarily), and since HTML parsing rules derive from SGML, it might be useful to generate output that passes both as valid HTML5 and as well-formed XML.
For example, the following self-closing element:
upon enabling such an option would become like:
(Note the space in front of the trailing slash, which is required here by SGML-derived HTML parsing rules.)