aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/WebCoso/XSLT.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/WebCoso/XSLT.pm b/lib/WebCoso/XSLT.pm
index 8daa912..6caed71 100644
--- a/lib/WebCoso/XSLT.pm
+++ b/lib/WebCoso/XSLT.pm
@@ -120,10 +120,11 @@ sub getTagsXML {
}
DEBUG('building TagsXML');
my $doc=XML::LibXML::Document->new();
- return $doc unless defined $self->{tags_source};
my $de=$doc->createElementNS($NS,'wc:tags');
$doc->setDocumentElement($de);
+ return $doc unless defined $self->{tags_source};
+
my ($tagname,$doclist);
while (($tagname,$doclist)=each %{$self->{tags_source}}) {
my $te=$doc->createElementNS($NS,'wc:tag');
@@ -164,10 +165,11 @@ sub getChangesXML {
}
DEBUG('building ChangesXML');
my $doc=XML::LibXML::Document->new();
- return $doc unless defined $self->{changes_source};
my $de=$doc->createElementNS($NS,'wc:changes');
$doc->setDocumentElement($de);
+ return $doc unless defined $self->{changes_source};
+
my ($docpath,$dates);
while (($docpath,$dates)=each %{$self->{changes_source}}) {
my $te=$doc->createElementNS($NS,'wc:document');