I have a file containing a snippet with nbsp; (with an ampersand) as below. The file will later be referenced with ui:include.
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets">
foo&nbsp;bar
</ui:composition>
Result: "Error Parsing /snippets/header.xhtml: Error Traced[line: 3] The entity "nbsp" was referenced, but not declared."
It works fine if I change it to #160; (with an ampersand) as here:
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets">
foo&#160;bar
</ui:composition>
Now, this was also the behavior of facelets in JSF 1.x, but I had been under the impression that it was a bug, not a feature. Is this the expected behavior in JSF 2.0? If so, why? And where does it say so in the spec?
I am using Mojarra 2.0.1 FCS with Java 6.0.15 and Tomcat 6.0.18.
Thanks!
- Marty
[JSF 2.0 Training Courses|http://courses.coreservlets.com/public-courses/jsf2/]