print HEADER <<EOT;
<?xml version="1.0" encoding="ISO-8859-1"?>
-<rdf:RDF xml:lang="en" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:h="http://www.cs.unibo.it/helm/schemas/mattone.rdf#">
+<!DOCTYPE rdf:RDF [
+ <!ENTITY rdfns 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
+ <!ENTITY hthns 'http://www.cs.unibo.it/helm/schemas/schema-helmth#'>
+ <!ENTITY hns 'http://www.cs.unibo.it/helm/schemas/schema-helm#'>
+
+ ]>
+<rdf:RDF xml:lang="en" xmlns:rdf="&rdfns;" xmlns:h="&hns;" xmlns:hth="&hthns;">
<h:Object rdf:about="$uri">
EOT
close(HEADER);
-system("cat $filename >> $outputfile");
+$quotedfilename = $filename;
+$quotedfilename =~ s/'/\\'/g;
+$quotedoutputfile = $outputfile;
+$quotedoutputfile =~ s/'/\\'/g;
+system("cat $quotedfilename >> $quotedoutputfile");
open(FOOTER,">>$outputfile");
print FOOTER <<EOT;