我正在开发一款应用程序,我的公司要求在所有页面上都有页眉横幅。我们团队中有大约6个不同版本的页眉横幅,并且现在我想让它从源代码中被包含到我的应用程序中,这样如果他们更新了横幅的源代码,我的应用程序中的横幅版本也会自动更新。
使用
即使它不是格式良好的XML,我该如何包含此横幅?
我的当前模板:
使用
<ui:include src="http://mycompany.com/banner.html" />
会导致错误The markup in the document following the root element must be well-formed.
。即使它不是格式良好的XML,我该如何包含此横幅?
我的当前模板:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui"
xmlns:ui="http://java.sun.com/jsf/facelets">
<ui:composition>
<h:body>
<div>
<ui:include src="http://mycompany.com/banner.html" />
</div>
<ui:insert name="content" />
</h:body>
</ui:composition>
</html>