return 1;
}
+
+##########################################################
+####
+#### XMLTemplate
+####
+##########################################################
+
+package XMLTemplate;
+
+use vars qw(@ISA);
+
+@ISA = qw(HTMLTemplate);
+
+sub new {
+ #evtl auskommentieren
+ my $type = shift;
+
+ return $type->SUPER::new(@_);
+}
+
+sub format_string {
+ my ($self, $variable) = @_;
+ my $form = $self->{"form"};
+
+ my %replace =
+ ('order' => ['<', '>', quotemeta("\n")],
+ '<' => '<',
+ '>' => '>',
+ quotemeta("\n") => '<br>',
+ );
+
+ map({ $variable =~ s/$_/$replace{$_}/g; } @{ $replace{"order"} });
+
+ # Allow no markup to be converted into the output format
+ my @markup_replace = ('b', 'i', 's', 'u', 'sub', 'sup');
+
+ foreach my $key (@markup_replace) {
+ $variable =~ s/\<(\/?)${key}\>//g;
+ }
+
+ return $variable;
+}
+
+sub get_mime_type() {
+ my ($self) = @_;
+
+ if ($self->{"form"}->{"format"} =~ /xml/i) {
+ return "application/xml ";
+ } else {
+ return "text/xml";
+ }
+}
+
+sub uses_temp_file {
+# my ($self) = @_;
+ # no tempfile needet for XML Output
+ return 1;
+}
+
1;