Checking in changes prior to tagging of version 1.004. Changelog diff is:
[catagits/Catalyst-View-ContentNegotiation-XHTML.git] / README
1 NAME
2     Catalyst::View::TT::XHTML - A sub-class of the standard TT view which
3     serves application/xhtml+xml content if the browser accepts it.
4
5 SYNOPSIS
6         package MyApp::View::XHTML;
7         use strict;
8         use warnings;
9         use base qw/Catalyst::View::TT::XHTML MyApp::View::TT/;
10     
11         1;
12     
13 DESCRIPTION
14     This is a very simple sub-class of Catalyst::View::TT, which sets the
15     response "Content-Type" to be "application/xhtml+xml" if the user's
16     browser sends an "Accept" header indicating that it is willing to
17     process that MIME type.
18
19     Changing the "Content-Type" causes browsers to interpret the page as
20     strict XHTML, meaning that the markup must be well formed.
21
22     This is useful when you're developing your application, as you know that
23     all pages you view are rendered strictly, so any markup errors will show
24     up at once.
25
26 METHODS
27   process
28     Overrides the standard process method, delegating to Catalyst::View::TT
29     to render the template, and then changing the response "Content-Type" if
30     appropriate (from the requests "Accept" header).
31
32 BUGS
33     There should be a more elegant way to inherit the config of your normal
34     TT view.
35
36     Configuration (as loaded by Catalyst::Plugin::ConfigLoader) for the TT
37     view is not used.
38
39     No helper to generate the view file needed (just copy the code in the
40     SYNOPSIS).
41
42 AUTHOR
43     Tomas Doran "<bobtfish@bobtfish.net>"
44
45 CONTRIBUTORS
46     David Dorward - test patches
47
48 COPYRIGHT
49     This module itself is copyright (c) 2008 Tomas Doran and is licensed
50     under the same terms as Perl itself.
51