[jsr-314-open-mirror] [jsr-314-open] [490-XmlViews] Chapter 11: The JSF XML View Syntax

Cay Horstmann cay.horstmann at gmail.com
Tue Oct 26 22:02:27 EDT 2010


Just from the point of view of namespaces, you can certainly use html
as the root. The difficulty is the doctype. An XML processing tool has
every reason to expect that a document starting with

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

is a conforming document.

However, a JSF page is not--it aims to produce such a document (at
least when rendered to XHTML).

That's why today you get wiggly underlines in editors, exceptions in
XSLT scripts, and so on, when you try to process JSF pages.

So, the DOCTYPE needs to be output, not included. That could be done
with attributes of a top level element or with a child element.

That means the top element should not be html, but it could be h:html,
or, of course, f:view.

Cheers,

Cay

NB. Not having an option for rendering a DOCTYPE would be bad--we want
users to be able to produce proper XHTML. For one thing, if you omit
the DOCTYPE, you can trigger quirks mode in commonly used browsers.



More information about the jsr-314-open-mirror mailing list