I'am rather confused by the DOCTYPE generation of Trinidad's
<tr:document> tag. It generates a HTML DOCTYPE, not XHTML.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
which doesn't allow selfclosing meta and link tags (being XHTML syntax).
However the following simple jsf causes the parser to crash:
<?xml version="1.0" encoding="UTF-8" ?>
<jsp:root version="2.0"
xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:tr="http://myfaces.apache.org/trinidad">
<jsp:directive.page contentType="text/html; charset=utf-8"/>
<f:view>
<tr:document title="my title">
<f:facet name="metaContainer">
<link rel="stylesheet" type="text/css" href="/styles.css"> <!--
note: link is not closed -->
</f:facet>
<p>my body</p>
</tr:document>
</f:view>
</jsp:root>
SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: /trdoc.jsp(12,9) The element type
"link" must be terminated by the matching end-tag
"</link>".
But if I terminate with a </link>, invalid HTML is generated: the link
is closed with a /> which is not valid for the generated DOCTYPE. So,
this means Trinidad can't generate valid HTML?? Or did I miss something?
I really hope so...
By the way, the <tr:document> generates correct HTML: like the <meta
name="generator" content="Apache Trinidad"> tag which isn't closed and
doesn't generate an exception (probably because it doesn't need to be
parsed).
Any comments?