From 0aa99246f129a4218464a2ffaecf88aa77dbd22e Mon Sep 17 00:00:00 2001 From: dakkar Date: Mon, 17 Aug 2009 13:48:11 +0200 Subject: some EXSLT functions missing from XML::LibXSLT untested, and should really be in a separate distribution --- lib/WebCoso/XSLT.pm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/WebCoso') diff --git a/lib/WebCoso/XSLT.pm b/lib/WebCoso/XSLT.pm index 28643c5..b52d596 100644 --- a/lib/WebCoso/XSLT.pm +++ b/lib/WebCoso/XSLT.pm @@ -8,6 +8,7 @@ use XML::LibXSLT; use DateTime::Format::Strptime; use Log::Log4perl ':easy'; use Data::Dumper; +use XML::LibXSLT::EXSLT; my $NS='http://webcoso.thenautilus.net/'; @@ -19,6 +20,8 @@ sub new { $self->{xml_parser}=XML::LibXML->new(); $self->{xslt_proc}=XML::LibXSLT->new(); + XML::LibXSLT::EXSLT->apply_to($self->{xslt_proc}); + $self->{xslt_proc}->register_function($NS,'title-for', sub{$self->getTitleForXML(@_)}); $self->{xslt_proc}->register_function($NS,'dst-uri-for', -- cgit v1.2.3