diff options
author | dakkar <dakkar@luxion> | 2009-01-06 12:25:44 +0000 |
---|---|---|
committer | dakkar <dakkar@luxion> | 2009-01-06 12:25:44 +0000 |
commit | ab8177e2b452ae5381bdcd7e91460808f38d075d (patch) | |
tree | fdaf3152883514dfd6aa31528d8f74b69adb988c /lib/WebCoso | |
parent | ora genera davvero i feed (diff) | |
download | WebCoso-ab8177e2b452ae5381bdcd7e91460808f38d075d.tar.gz WebCoso-ab8177e2b452ae5381bdcd7e91460808f38d075d.tar.bz2 WebCoso-ab8177e2b452ae5381bdcd7e91460808f38d075d.zip |
ora i feed espandono le pagine (e ri-fissato l'errore dei titoli, cfr r388)
git-svn-id: svn://luxion/repos/WebCoso/trunk@399 fcb26f47-9200-0410-b104-b98ab5b095f3
Diffstat (limited to 'lib/WebCoso')
-rw-r--r-- | lib/WebCoso/Common.pm | 2 | ||||
-rw-r--r-- | lib/WebCoso/XSLT.pm | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/WebCoso/Common.pm b/lib/WebCoso/Common.pm index 30b18fe..5420063 100644 --- a/lib/WebCoso/Common.pm +++ b/lib/WebCoso/Common.pm @@ -86,7 +86,7 @@ sub getTitleFor { my $doc=$fc->get($doc_name); unless ($doc) { LOGWARN("No document for <$doc_name>, returning <$name>"); - return $name; + return "$name"; # force it to a string, since it might be an XML Node } my $title=$xpath->findnodes( q{/document/title}, diff --git a/lib/WebCoso/XSLT.pm b/lib/WebCoso/XSLT.pm index 40c945b..cc64cfb 100644 --- a/lib/WebCoso/XSLT.pm +++ b/lib/WebCoso/XSLT.pm @@ -24,7 +24,8 @@ sub new { $self->{xslt_proc}->register_function($NS,'dates-for', sub{$self->getDatesXML(WebCoso::Common::getDatesFor($self->{fc},@_))}); $self->{xslt_proc}->register_function($NS,'document', - sub{$self->{fc}->get(WebCoso::Common::srcXMLFor(@_))}); + sub{$self->{fc}->get(WebCoso::Common::srcXMLFor(@_)) + || XML::LibXML::Document->new('1.0','utf-8')}); $self->{xslt_proc}->register_function($NS,'message', sub{DEBUG($_[0],' ',$_[1]->get_node(0)->toString());return ''}); $self->{xslt_proc}->debug_callback(sub{DEBUG(@_)}); |