]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/on-line/xslt/metadataLib.xsl
Dead code inclusion removed.
[helm.git] / helm / on-line / xslt / metadataLib.xsl
index 7a2f8ec99f2fd53db9e4db32fa487bbc11c219f2..4e3271638d97cb7459ac24e1641105497f99509a 100644 (file)
@@ -4,98 +4,40 @@
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:subst="http://www.cs.unibo.it/helm/subst">
 
+<xsl:import href="utils.xsl"/>
+<xsl:import href="show_dc.xsl"/>
+<xsl:import href="links_library.xsl"/>
+
 <xsl:param name="CICURI" select="''"/>
 <xsl:param name="getterURL" select="''"/>
 <xsl:param name="draw_graphURL" select="''"/>
+<xsl:param name="rdflyURL" select="'http://localhost:58086/'"/>
+
+<!--CSC: code cut & pasted from makeGraphLinks -->
+<xsl:param name="uri_set_size" select="'30'"/>
+<!--CSC: end of cut & paste from makeGraphLinks -->
 
-<xsl:variable name="BaseRDFURL" select="concat($getterURL,'getxml?uri=helm:rdf:www.cs.unibo.it/helm/rdf/')"/>
-<xsl:variable name="BaseRDFURLForward" select="concat($BaseRDFURL,'forward//')"/>
-<xsl:variable name="BaseRDFURLBackward" select="concat($BaseRDFURL,'backward//')"/>
+<xsl:variable name="BaseRDFURLForward" select="concat($rdflyURL,'get?kind=forward&amp;object=')"/>
+<xsl:variable name="BaseRDFURLBackward" select="concat($rdflyURL,'get?kind=backward&amp;object=')"/>
+<xsl:variable name="BaseRDFURLDC" select="concat($rdflyURL,'get?kind=dc&amp;object=')"/>
 
 <xsl:template match="/">
  <html>
   <head>
-   <subst:script language="JavaScript" src="/javascript/defaults.js"/>
-   <subst:script language="JavaScript" src="/javascript/utils.js"/>
-   <subst:script language="JavaScript" src="/javascript/control.js"/>
    <title>Metadata of <xsl:value-of select="$CICURI"/></title>
   </head>
   <body onLoad="window.focus()" bgColor="white">
-   <h1>Metadata of <xsl:value-of select="$CICURI"/></h1>
+   <xsl:variable name="CICURL">
+     <xsl:call-template name="makeURL">
+      <xsl:with-param name="uri" select="$CICURI"/>
+     </xsl:call-template>
+   </xsl:variable>
    <xsl:apply-templates select="*"/>
+  <xsl:call-template name="loop_show_dc">
+   <xsl:with-param name="CICURI" select="$CICURI"/>
+  </xsl:call-template>
   </body>
  </html>
 </xsl:template>
 
-<xsl:template name="makelink">
- <xsl:param name="name" select="''"/>
- <xsl:param name="CICURI" select="''"/>
- <xsl:param name="RDFURI" select="''"/>
- <xsl:choose>
-  <xsl:when test="document(concat($BaseRDFURLBackward,$RDFURI))/*/*/*">
-   <p>
-    <script>
-     var RDFURI = "helm:rdf:www.cs.unibo.it/helm/rdf/backward//<xsl:value-of select="$RDFURI"/>";
-     var getterURL = "<xsl:value-of select="$getterURL"/>";
-<![CDATA[
-     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 it.</a>');
-]]>
-    </script>
-   </p>
-   <p>
-    <script>
-     var CICURI = "<xsl:value-of select="$CICURI"/>";
-     var RDFURI = "helm:rdf:www.cs.unibo.it/helm/rdf/backward//<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 = setParam(url,"param.CICURI",escape(CICURI));
-     url = draw_graphURL + 'draw?url=' + escape(url);
-     var url2 = setParam(location.href,"keys","MGL,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:when>
-  <xsl:otherwise>
-   <p>
-    Object <xsl:value-of select="$name"/> is never referenced in other objects
-   </p>
-  </xsl:otherwise>
- </xsl:choose>
-
- <xsl:choose>
-  <xsl:when test="document(concat($BaseRDFURLForward,$RDFURI))/*/*/*">
-   <p>
-    <!-- CSC: Cut & Paster from above ==> create a single javascript function -->
-    <script>
-     var CICURI = "<xsl:value-of select="$CICURI"/>";
-     var RDFURI = "helm:rdf:www.cs.unibo.it/helm/rdf/forward//<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","MDG");
-     url = setParam(url,"xmluri", getterURL + 'getxml%3Furi%3D' + RDFURI);
-     url = setParam(url,"param.CICURI",escape(CICURI));
-     url = draw_graphURL + 'draw?url=' + escape(url);
-     var url2 = setParam(location.href,"keys","MGL,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>
-  </xsl:when>
-  <xsl:otherwise>
-   <p>
-    Object <xsl:value-of select="$name"/> does not reference any other object
-   </p>
-  </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
 </xsl:stylesheet>