]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/on-line/xslt/metadataLib.xsl
First implementation of graphs. Working on my notebook, probably not
[helm.git] / helm / on-line / xslt / metadataLib.xsl
index 5b78e2b9eb35237e7e94257e3ed3b0bb87f0d2ef..95aab43f35817325360dedd77bf186cf3d271a55 100644 (file)
@@ -36,6 +36,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","meta_theory%2CT1%2CT2%2CL%2CE");
    url = setParam(url,"xmluri", getterURL + "getxml%3Furi%3D" + RDFURI);
-   document.write('<a target="theory" 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 CICURI = "<xsl:value-of select="$CICURI"/>";
+<![CDATA[
+   document.write('<a target="graph" href="http://localhost:8083/draw?url=' +
+    escape('http://localhost:8080/helm/servlet/uwobo/apply?xmluri=http://localhost:8081/getxml%3Furi%3D' + RDFURI + '&keys=MMG&param.getterURL=http%3A//localhost%3A8081/&prop.media-type=text/plain&param.CICURI=' + CICURI) + '">View the graph of all the objects dependending 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"/>";
+<![CDATA[
+   document.write('<a target="graph" href="http://localhost:8083/draw?url=' +
+    escape('http://localhost:8080/helm/servlet/uwobo/apply?xmluri=http://localhost:8081/getxml%3Furi%3D' + CICURI + '&keys=MDG&param.getterURL=http%3A//localhost%3A8081/&prop.media-type=text/plain&param.CICURI=' + CICURI) + '">View the graph of all the dependencies of this object.</a>');
 ]]>
   </script>
  </p>