now all xslt is server side - great...

git-svn-id: http://yolanda.mister-muffin.de/svn@204 7eef14d0-6ed0-489d-bf55-20463b2d70db
This commit is contained in:
josch 2007-12-17 21:33:45 +00:00
parent 93d21c2272
commit 47ebae3b4e

View file

@ -135,47 +135,29 @@ sub urlencode
sub output_page
{
if($query->http('USER_AGENT') =~ m{(Firefox/[2-3]|MSIE [6-7]|yolanda-upload)})
{
#print xml
return $session->header(
-type=>'text/xml',
-charset=>'UTF-8'
),
XMLout(
$page,
KeyAttr => {},
XMLDecl => $XMLDecl,
RootName => 'page',
AttrIndent => '1'
);
}
else
{
use XML::LibXSLT;
use XML::LibXML;
use XML::LibXSLT;
use XML::LibXML;
my $parser = XML::LibXML->new();
my $xslt = XML::LibXSLT->new();
my $parser = XML::LibXML->new();
my $xslt = XML::LibXSLT->new();
my $stylesheet = $xslt->parse_stylesheet($parser->parse_file("$root/xsl/xhtml.xsl"));
my $stylesheet = $xslt->parse_stylesheet($parser->parse_file("$root/xsl/xhtml.xsl"));
return $session->header(
-type=>'text/xml',
-charset=>'UTF-8'
),
$stylesheet->output_string(
$stylesheet->transform(
$parser->parse_string(
XMLout(
$page,
KeyAttr => {},
XMLDecl => $XMLDecl,
RootName => 'page',
AttrIndent => '1'
)
return $session->header(
-type=>'text/xml',
-charset=>'UTF-8'
),
$stylesheet->output_string(
$stylesheet->transform(
$parser->parse_string(
XMLout(
$page,
KeyAttr => {},
XMLDecl => $XMLDecl,
RootName => 'page',
AttrIndent => '1'
)
)
);
}
)
);
}