]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/metadata/create_V7_mowgli/fix_rdf.pl
Branch V7_3_new_exportation merged.
[helm.git] / helm / metadata / create_V7_mowgli / fix_rdf.pl
index 6d17383b3615ddd12b159716cad6dbeb608abcd2..23b4b7fda2f6f438dd039eae7d1d7f687b96c10b 100755 (executable)
@@ -12,12 +12,22 @@ open(HEADER,">>$outputfile");
 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;