]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/on-line/xslt/metadataLib.xsl
New implementation of the graphs stuff: now every hard-coded URL has
[helm.git] / helm / on-line / xslt / metadataLib.xsl
index f264516b2c72a18c366abe4d0c9258fa8331ddb0..a1ea8c58d5f8a0c63d61152f076e6fe1d640d705 100644 (file)
@@ -6,6 +6,7 @@
 
 <xsl:param name="CICURI" select="''"/>
 <xsl:param name="getterURL" select="''"/>
+<xsl:param name="draw_graphURL" select="''"/>
 
 <xsl:template match="/">
  <html>
@@ -15,7 +16,7 @@
    <subst:script language="JavaScript" src="/javascript/control.js"/>
    <title>Metadata of <xsl:value-of select="$CICURI"/></title>
   </head>
-  <body bgColor="white">
+  <body onLoad="window.focus()" bgColor="white">
    <h1>Metadata of <xsl:value-of select="$CICURI"/></h1>
    <xsl:apply-templates select="*"/>
   </body>
@@ -36,6 +37,7 @@
  <p>
   Object <xsl:value-of select="$name"/> is never referenced in other objects
  </p>
+ <xsl:apply-templates select="." mode="mk_dep_graph"/>
 </xsl:template>
 
 <xsl:template match="url" mode="makelink">
  <xsl:param name="RDFURI" select="''"/>
  <p>
   <script>
-   var name = "<xsl:value-of select="$name"/>";
    var RDFURI = "<xsl:value-of select="$RDFURI"/>";
    var getterURL = "<xsl:value-of select="$getterURL"/>";
 <![CDATA[
    //url = setParam(url,"keys",getCICMathMLKeys());
-   var url = setParam(location.href,"keys","mth");
+   var url = setParam(location.href,"keys","meta_theory%2CT1%2CT2%2CL%2CE");
    url = setParam(url,"xmluri", getterURL + "getxml%3Furi%3D" + RDFURI);
-   document.write('<a href="' + url + '">View the objects depending on ' + name + '.</a>');
+   document.write('<a target="theory" href="' + url + '">View the objects depending on it.</a>');
+]]>
+  </script>
+ </p>
+ <p>
+  <script>
+   var RDFURI = "<xsl:value-of select="$RDFURI"/>";
+   var getterURL = "<xsl:value-of select="$getterURL"/>";
+   var draw_graphURL = "<xsl:value-of select="$draw_graphURL"/>";
+<![CDATA[
+   var url = setParam(location.href,"keys","MMG");
+   url = setParam(url,"xmluri", getterURL + 'getxml%3Furi%3D' + RDFURI);
+   url = draw_graphURL + 'draw?url=' + escape(url);
+   var url2 = setParam(location.href,"keys","ML2,RT");
+   url2 = setParam(url2,"xmluri",escape(url));
+   document.write('<a target="graph" href="' + url2 + '">View the graph of all the objects depending on this one.</a>');
+]]>
+  </script>
+ </p>
+ <xsl:apply-templates select="." mode="mk_dep_graph"/>
+</xsl:template>
+
+<xsl:template match="*" mode="mk_dep_graph">
+ <p>
+  <script>
+   var CICURI = "<xsl:value-of select="$CICURI"/>";
+   var getterURL = "<xsl:value-of select="$getterURL"/>";
+   var draw_graphURL = "<xsl:value-of select="$draw_graphURL"/>";
+<![CDATA[
+   var url = setParam(location.href,"keys","MDG");
+   url = setParam(url,"xmluri", getterURL + 'getxml%3Furi%3D' + CICURI);
+   url = draw_graphURL + 'draw?url=' + escape(url);
+   var url2 = setParam(location.href,"keys","ML2,RT");
+   url2 = setParam(url2,"xmluri",escape(url));
+   document.write('<a target="graph" href="' + url2 + '">View the graph of all the dependencies of this object.</a>');
 ]]>
   </script>
  </p>