diff options
Diffstat (limited to 'lib/WebCoso/XSLT.pm')
-rw-r--r-- | lib/WebCoso/XSLT.pm | 3 |
1 files changed, 2 insertions, 1 deletions
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(@_)}); |