]> matita.cs.unibo.it Git - helm.git/commitdiff
Code improvement, same functionalities.
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Tue, 9 Oct 2001 15:12:10 +0000 (15:12 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Tue, 9 Oct 2001 15:12:10 +0000 (15:12 +0000)
helm/graphs/tools/mk_html.pl

index b98e38de13af906ff681087dc09fc57e983ae6ba..1d558fa3c586c99266fda9d1ec95ea084dc76ae1 100755 (executable)
@@ -57,6 +57,51 @@ function getParam3(from,name)
 }
 </script>
 
+<script>
+function mkDepURL(uri)
+{
+   var iurl = unescape(getParam("url"));
+   var getterURL = getParam3(iurl,"param.getterURL");
+   var interfaceURL = unescape(getParam3(iurl,"param.interfaceURL"));
+   var url = setParam(iurl,"keys","MDG");
+   url = setParam(url,"xmluri", getterURL + "getxml%3Furi%3D" + uri);
+   url = setParam(url,"param.CICURI",uri);
+   url = setParam(url,"param.RDFURI","helm:rdf:www.cs.unibo.it/helm/rdf/rdfprova//" + uri);
+   var draw_graph_url =
+    location.protocol + '//' + location.host + location.pathname;
+   url = draw_graph_url + "?url=" + escape(url);
+   return url;
+}
+
+function mkCICURL(uri)
+{
+   var iurl = unescape(getParam("url"));
+   var getterURL = getParam3(iurl,"param.getterURL");
+   var interfaceURL = unescape(getParam3(iurl,"param.interfaceURL"));
+   var url = setParam(iurl,"keys",getParam3(iurl,"param.keys"));
+   url = setParam(url,"xmluri", getterURL + "getxml%3Furi%3D" + uri);
+   url = setParam(url,"param.CICURI",uri);
+   url = setParam(url,"param.RDFURI","helm:rdf:www.cs.unibo.it/helm/rdf/rdfprova//" + uri);
+   url = interfaceURL + "?url=" + escape(url);
+   return url;
+}
+
+function mkMetaURL(uri)
+{
+   var iurl = unescape(getParam("url"));
+   var getterURL = getParam3(iurl,"param.getterURL");
+   var interfaceURL = unescape(getParam3(iurl,"param.interfaceURL"));
+   var url = setParam(iurl,"keys","MMG");
+   url = setParam(url,"xmluri", getterURL + "getxml%3Furi%3Dhelm:rdf:www.cs.unibo.it/helm/rdf/rdfprova//" + uri);
+   url = setParam(url,"param.CICURI",uri);
+   url = setParam(url,"param.RDFURI","helm:rdf:www.cs.unibo.it/helm/rdf/rdfprova//" + uri);
+   var draw_graph_url =
+    location.protocol + '//' + location.host + location.pathname;
+   url = draw_graph_url + "?url=" + escape(url);
+   return url;
+}
+</script>
+
 
  </head>
  <body bgcolor="white" onLoad="window.focus()">
@@ -89,45 +134,17 @@ while (<STDIN>) {
  my $point_4_5_x = $point1x + 4*($point2x - $point1x)/5;
  print <<EOT;
   <script>
-   var iurl = unescape(getParam("url"));
-   var getterURL = getParam3(iurl,"param.getterURL");
-   var interfaceURL = unescape(getParam3(iurl,"param.interfaceURL"));
-   var url = setParam(iurl,"keys","MDG");
-   url = setParam(url,"xmluri", getterURL + "getxml%3Furi%3D$uri");
-   url = setParam(url,"param.CICURI","$uri");
-   url = setParam(url,"param.RDFURI","helm:rdf:www.cs.unibo.it/helm/rdf/rdfprova//$uri");
-   var draw_graph_url =
-    location.protocol + '//' + location.host + location.pathname;
-   url = draw_graph_url + "?url=" + escape(url);
-   document.write('<area shape="rect" href="' + url + '" coords="$point1x,$point2y,$point_1_5_x,$point1y">');
+   document.write('<area shape="rect" href="' + mkDepURL('$uri') + '" coords="$point1x,$point2y,$point_1_5_x,$point1y">');
   </script>
 EOT
  print <<EOT;
   <script>
-   var iurl = unescape(getParam("url"));
-   var getterURL = getParam3(iurl,"param.getterURL");
-   var interfaceURL = unescape(getParam3(iurl,"param.interfaceURL"));
-   var url = setParam(iurl,"keys",getParam3(iurl,"param.keys"));
-   url = setParam(url,"xmluri", getterURL + "getxml%3Furi%3D$uri");
-   url = setParam(url,"param.CICURI","$uri");
-   url = setParam(url,"param.RDFURI","helm:rdf:www.cs.unibo.it/helm/rdf/rdfprova//$uri");
-   url = interfaceURL + "?url=" + escape(url);
-   document.write('<area shape="rect" href="' + url + '" coords="$point_2_5_x,$point2y,$point_3_5_x,$point1y" target="cic">');
+   document.write('<area shape="rect" href="' + mkCICURL('$uri') + '" coords="$point_2_5_x,$point2y,$point_3_5_x,$point1y" target="cic">');
   </script>
 EOT
  print <<EOT;
   <script>
-   var iurl = unescape(getParam("url"));
-   var getterURL = getParam3(iurl,"param.getterURL");
-   var interfaceURL = unescape(getParam3(iurl,"param.interfaceURL"));
-   var url = setParam(iurl,"keys","MMG");
-   url = setParam(url,"xmluri", getterURL + "getxml%3Furi%3Dhelm:rdf:www.cs.unibo.it/helm/rdf/rdfprova//$uri");
-   url = setParam(url,"param.CICURI","$uri");
-   url = setParam(url,"param.RDFURI","helm:rdf:www.cs.unibo.it/helm/rdf/rdfprova//$uri");
-   var draw_graph_url =
-    location.protocol + '//' + location.host + location.pathname;
-   url = draw_graph_url + "?url=" + escape(url);
-   document.write('<area shape="rect" href="' + url + '" coords="$point_4_5_x,$point2y,$point2x,$point1y">');
+   document.write('<area shape="rect" href="' + mkMetaURL('$uri') + '" coords="$point_4_5_x,$point2y,$point2x,$point1y">');
   </script>
 EOT
 }