AxKit2
view release on metacpan or search on metacpan
lib/AxKit2/Transformer/TAL.pm view on Meta::CPAN
$out = $dom->toStringHTML();
$ct = "text/html";
}
else {
$out = $dom->toStringHTML();
$ct = "application/xml";
}
my $enc = "UTF-8";
$client->headers_out->header('Content-Length', bytelength($out));
$client->headers_out->header('Content-Type', "$ct; charset=$enc");
$client->send_http_headers;
$client->write($out);
}
1;
__DATA__
<?xml version="1.0"?>
<!--
lib/AxKit2/Transformer/XSLT.pm view on Meta::CPAN
sub output {
my ($self, $client, $dom) = @_;
my $stylesheet = $cache{$self->{stylesheet}} || die "Not processed";
my $ct = $stylesheet->media_type;
my $enc = $stylesheet->output_encoding;
my $out = $stylesheet->output_string($dom);
$client->headers_out->header('Content-Length', bytelength($out));
$client->headers_out->header('Content-Type', "$ct; charset=$enc");
$client->send_http_headers;
$client->write($out);
}
1;
plugins/demo/webmail view on Meta::CPAN
}
if (!$string) {
$string = '';
warn("Lynxing file\n");
my ($lfh, $file) = tempfile(DIR => "/tmp");
binmode($lfh, ":utf8") if $] > 5.007;
print $lfh $in;
close($lfh);
$ENV{LYNX_TEMP_SPACE} = "/tmp";
open(LYNX, "lynx -dump -raw -nolist -display_charset=utf-8 -width=72 -force_html $file 2>&1 |") || die $!;
while (<LYNX>) {
$string .= $_;
}
close(LYNX);
unlink($file);
$string =~ s/\n{2,}/\n\n/g;
$string = "<htmlpart pre='1'>" .
xml_escape(wrap("","",$string)) .
"</htmlpart>";
}
plugins/spod5 view on Meta::CPAN
# print "Interim doc: ", $interim->toString;
my $stylesheet = $xslt->parse_stylesheet($parser->parse_string($pod2s5));
my $output = $stylesheet->transform($interim);
my $ct = $stylesheet->media_type;
my $enc = $stylesheet->output_encoding;
my $out = $stylesheet->output_string($output);
$client->headers_out->header('Content-Length', bytelength($out));
$client->headers_out->header('Content-Type', "$ct; charset=$enc");
$client->send_http_headers;
$client->write($out);
return DONE;
}
$add_params = <<'EOT';
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
( run in 0.259 second using v1.01-cache-2.11-cpan-4d50c553e7e )