The wrong html output:
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
...
The main template:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:t="http://myfaces.apache.org/tomahawk"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:fn="http://java.sun.com/jsp/jstl/functions">
<h:head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title><h:outputText value="dmw #{title}"/></title>
<h:outputStylesheet library="#{uiSkin}" name="css/layout.css" />
<h:outputStylesheet library="standard" name="css/developer.css"
rendered="#{developMode}" />
...
</h:head>
<h:body>
Example of a included page:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:t="http://myfaces.apache.org/tomahawk"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
<ui:composition>
...
</ui:composition>
</html>
Used Versions:
<jsf-api.version>2.1</jsf-api.version>
<jsf-impl.version>2.1.21</jsf-impl.version>
<richfaces.version>4.3.2.Final</richfaces.version>
<prettyfaces.version>3.3.3</prettyfaces.version>
<tomahawk.version>1.1.14</tomahawk.version>
When i remove all ui:include and ui:insert tags everything is fine. I build a smaller Testproject which also works like suspected. The error seems to occur when a included page is loaded. A ui:insert tag which can´t be resolved doesn´t lead to the error. I think it has something to do with the rendering configuration.
I tried a few entries in faces-config but without sucess. The following entry removes the unwanted declaration but also the doctype.
<faces-config-extension>
<facelets-processing>
<file-extension>.xhtml</file-extension>
<process-as>xml</process-as>
</facelets-processing>
</faces-config-extension>
XML prolog / instruction not removed from XHTML output
I have no idea where it comes frome? Does anybody have a clue?