The XML declaration is added to the Facelets template to make the tooling happy,
but Facelets allows this markup to pass straight through the browser. The
problem is that there are certain browsers which choke (or behave differently)
when the XML declaration is included in the rendered response.
The XML declaration really has no business being in the rendered output, so the
best approach is to have Facelets suppress this markup. But if there are
developers who prefer it, perhaps because they are using Facelets to generate an
XML feed, then there should be a setting somewhere that allows them to control
the terminus of the declaration (either suppressed or passed through). This is
no different than the "omitXmlDeclaration" setting on most XML printers,
What's odd is that Facelets does not pass through the DTD declaration, which is
arguably even more of a problem. However, there is an easy workaround. Simply
include a DTD-generating tag.