aboutsummaryrefslogtreecommitdiff
path: root/lib/WebCoso
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2009-08-31 15:12:26 +0200
committerdakkar <dakkar@thenautilus.net>2009-08-31 15:12:26 +0200
commitefee79b29c5f7b5e7b3ae739349ae87cbfa09c31 (patch)
treef7983556f93748e4fe2a3a3a79604ff1a5791fb4 /lib/WebCoso
parentallow a general "tags" document (diff)
downloadWebCoso-efee79b29c5f7b5e7b3ae739349ae87cbfa09c31.tar.gz
WebCoso-efee79b29c5f7b5e7b3ae739349ae87cbfa09c31.tar.bz2
WebCoso-efee79b29c5f7b5e7b3ae739349ae87cbfa09c31.zip
always return a "title" element for titles
even when the title is a simple string; previously strings were returned as "paragraph", which confused the redering
Diffstat (limited to 'lib/WebCoso')
-rw-r--r--lib/WebCoso/XSLT.pm9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/WebCoso/XSLT.pm b/lib/WebCoso/XSLT.pm
index 73ba59d..debe011 100644
--- a/lib/WebCoso/XSLT.pm
+++ b/lib/WebCoso/XSLT.pm
@@ -234,12 +234,9 @@ sub getTitleXML {
&& ($title->isa('XML::LibXML::Node')
|| $title->isa('XML::LibXML::NodeList'));
- my $doc=XML::LibXML::Document->new();
- my $de=$doc->createElement('paragraph');
- $doc->setDocumentElement($de);
- $de->appendTextNode($title);
-
- return $doc;
+ my $el=XML::LibXML::Element->new('title');
+ $el->appendTextNode($title);
+ return $el;
}
1;