The Wikipedia article says that the XML declaration is optional if I use the
default encoding UTF-8. Otherwise I need the declaration. So we can't use
trinidad with anything else than utf-8 (I use utf-8 anyway).

<tr:document> or <trh:html>/<trh:head>/<trh:body> load the default css which
I don't want.
With

<%@ page language="java" contentType="application/xhtml+xml; charset=UTF-8"
    pageEncoding="UTF-8"%>
<f:view>
<trh:html>
<trh:head>
        <title>...</title>
        <meta http-equiv="Content-Type" content="application/xhtml+xml;
charset=UTF-8" />
</trh:head>
<trh:body>
...
I get

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/loose.dtd";>
<html dir="ltr" lang="de">
<head>
<meta name="generator" content="Apache Trinidad"><link rel="stylesheet"
charset="UTF-8" type="text/css"
href="/kingstale/adf/styles/cache/minimal-desktop-903655080-gecko-cmp.css">
<script type="text/javascript">var _AdfWindowOpenError='In Ihrem Browser
wurde ein Blocker für Popup-Fenster ermittelt. Popup Blocker stören die
Ausführung dieser Anwendung. Deaktivieren Sie den Popup Blocker oder lassen
Sie Popups von dieser Site zu.';</script><script type="text/javascript"
src="/kingstale/adf/jsLibs/Common1_2_2.js"></script><script
type="text/javascript">_defaultTZ()</script>
        <title>...</title>
        <meta http-equiv="Content-Type" content="application/xhtml+xml;
charset=UTF-8" />
</head><body onload="_checkLoad()" onunload="_checkUnload(event)">

which is no xhtml. For example the link tag is not closed and the doctype is
wrong. Same with tr:document.

Tobias


Adam Winer wrote:
> 
> Ah, great, now we've got a compact description of the bug. :)
> If you have an XML declaration, in the doc, we end up generating
> two XML declarations on a PPR response.  There's code in Trinidad (in
> the XmlOutput code) to strip anything before an XML declaration,
> but it gets tripped up if there are two.
> 
> My understanding, backed up by:
> http://en.wikipedia.org/wiki/XHTML#XML_Declaration
> is that you don't need the XML declaration to be valid XHTML.
> 
> There is a clear error in your page, though:
> 
> contentType="text/html; charset=UTF-8"
> 
> is wrong.  You need contentType="application/xhtml+xml; charset=UTF-8".
> I'm not surprised your page wasn't rendered as XHTML.
> 
> That said, what you ideally should be doing in Trinidad is using
> <tr:document> or <trh:html>/<trh:head>/<trh:body>, and not
> specifying an XML declaration or DTD, but just letting Trinidad
> do it for you.  These do support generating XHTML DTDs,
> BTW, as long as you've set the contentType correctly.
> 
> -- Adam
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-TRINIDAD--PPR-problem-with-1.2.2-branch-tf4275649.html#a12799674
Sent from the My Faces - Dev mailing list archive at Nabble.com.

Reply via email to