[ 
https://issues.apache.org/jira/browse/TRINIDAD-922?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12570677#action_12570677
 ] 

Andy Schwartz commented on TRINIDAD-922:
----------------------------------------

Gang -

While I like the idea of providing a clean switch, I have a couple of concerns:

1. While the tr:document is responsible for rendering out the doctype, the 
choice of doctype has wider scope than tr:document.

In particular, switching from html to xhtml impacts the choice of 
ResponseWriter, which falls under the domain of the RenderKit 
(createResponseWriter).  I would prefer to avoid having our RenderKit 
implementation depend on information stashed away on a tr:document component.

2. While we clearly need to make it easier to switch between common doctypes 
(html vs. xhtml), allowing the page author to provide custom doctypes may be a 
bit too much flexibility.

A few reasons for this:

- Allowing custom doctypes means that we need to get into the business of 
doctype parsing.  It isn't sufficient to allow the tr:document to pass the 
doctype through - we also need to parse the doctype to determine which 
ResponseWriter to use.  Would prefer to avoid doctype parsing if we can avoid 
it.
- RenderKits may have minimal doctype requirements.  For example, a RenderKit 
may not function properly in quirks mode (may be depdenent on CSS box model).  
Allowing the page author to specify any doctype may give a false sense that the 
RenderKit works well with any doctype.
- As we have seen with the recent IE8 news, the mechanism for kicking the 
browser into a particular rendering mode may be agent-specific, and may in fact 
not be dependent on the doctype.  I would prefer that we leave the intricacies 
of determining the appropriate mechanism to the RenderKit.

I would prefer that we:

A. Define a switch which is outside of the tr:document - perhaps a 
trinidad-config.xml switch.
B. Keep our switch sufficiently abstract to avoid the issues mentioned in #2.

BTW, just curious...  Anyone know whether the Trinidad renderers/skins actually 
behave well in quirks mode?  I think we should verify this before exposing a 
quirks mode switch.

> Add a switch to <tr:document> allowing to generate XHTML STRICT or 
> TRANSITIONAL DOCTYPE
> ---------------------------------------------------------------------------------------
>
>                 Key: TRINIDAD-922
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-922
>             Project: MyFaces Trinidad
>          Issue Type: New Feature
>            Reporter: Paul van Rossem
>
> Now always the default HTML DOCTYPE is output by the <tr:document> tag. This 
> does not allow to validate the output as XHTML.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to