...
- The <?xml?> XML declaration is omitted.
- Most element render with an open and close tag, even if empty.
- Certain elements will be abbreviated to just the open tag, if empty:
- br
- hr
- img
- <![CDATA[]> sections are not used
This is all to ensure that the markup stream, while (almost) well formed, is still properly understood by browsers expecting ordinary HTML.
In fact, Tapestry may decide to render a purely XML document; it depends on the content type of the response. The default content type for pages is "text/html" ... this triggers specialized XML rendering.
A page may declare its content type using the @ContentType class annotation. Content types other than "text/html" will render as well-formed XML documents, including the XML declaration, and more standard behavior for empty elements.
...