[Catalyst] Catalyst::View::TT

Jonathan Rockway jon at jrock.us
Tue Nov 14 16:20:52 GMT 2006


Bill Moseley wrote:
> Do all browsers accept application/xhtml+xml these days?  I thought I
> remembered seeing something about setting the content type based on
> HTTP_ACCEPT.

No, but it's been a W3C standard for 7 years now, so it's probably time
to start sending it.  The number of NCSA Mosiac users is small enough to
ignore, I think.

You could use an algorithm to only send application/xhtml+xml to
browsers which claim to be able to accept it, but then you'll have to
have at least two versions of your content (one XML, and one not XML).
XML and HTML are not compatible.  (They can be, but if they are, why not
just use HTML 4 and spare yourself the trouble?)

FWIW, I use View::TT to output XHTML (as XML) and don't have any
problems with newlines being added.

-- 
package JAPH;use Catalyst qw/-Debug/;($;=JAPH)->config(name => do {
$,.=reverse qw[Jonathan tsu rehton lre rekca Rockway][$_].[split //,
";$;"]->[$_].q; ;for 1..4;$,=~s;^.;;;$,});$;->setup;



More information about the Catalyst mailing list