NAME

Template::TAL::Output - base class for Template::TAL output layers

SYNOPSIS

my $tt = Template::TAL->new( output => "Template::TAL::Output::XML" );
print $tt->process('foo');

DESCRIPTION

The render method of Template::TAL::Template produces a DOM tree. TT then gives that tree to its output class (in $tt->output) for conversion to a byte sequence. This class is the superclass of all Template::TAL output classes. By default, TT will use Template::TAL::Output::HTML, but you may want to use Template::TAL::Output::XML to produce XML output.

SUBCLASSING

You only have to override the 'render' method, which should take an XML::LibXML::Document object, and return a byte sequence. Preferably, you should respect the 'charset' property of the instance (assuming that applies to your output method).

METHODS

new()

Create a new instance of the output class.

charset

Get/set chained accessor that returns/sets the character set that the output will be encoded into. By default, this is 'utf-8'.

render( XML DOM )

returns a byte sequence representing the XML DOM passed.

COPYRIGHT

Written by Tom Insam, Copyright 2005 Fotango Ltd. All Rights Reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

BUGS

None known. Please see Template::TAL for details of how to report bugs

SEE ALSO

Template::TAL