]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/on-line/xslt/metadataLib.xsl
###############################################################
[helm.git] / helm / on-line / xslt / metadataLib.xsl
index 17050ea66ece75060b0a22e2c8f491670081cff9..bd9b84524224ba0f45124a6c9d33f2f852034567 100644 (file)
    <title>Metadata of <xsl:value-of select="$CICURI"/></title>
   </head>
   <body onLoad="window.focus()" bgColor="white">
-   <script>
-     var CICURI = "<xsl:value-of select="$CICURI"/>";
-<![CDATA[
-     document.write('<h1>Metadata of <a href="' + mkCICURL(CICURI) + '">' + CICURI + '</a></h1>');
-]]>
-   </script>
+   <xsl:variable name="CICURL">
+     <xsl:call-template name="makeURL">
+      <xsl:with-param name="uri" select="$CICURI"/>
+     </xsl:call-template>
+   </xsl:variable>
+   <h1>Metadata of <a href="{$CICURL}"><xsl:value-of select="$CICURI"/></a></h1>
    <xsl:apply-templates select="*"/>
    <!--CSC: code almost cut & pasted from makeGraphLinks -->
    <form name="uri_set_size">
     </script>
    </p>
    <p>
-    <script>
-<![CDATA[
-     document.write('<a href="" onClick="window.open(mkMetaURL(\']]><xsl:value-of select="$quotedCICURI"/><![CDATA[\'),\'graph\');return false;">View the graph of all the objects depending on this one.</a>');
-]]>
-    </script>
+     <xsl:variable name="forwardURL">
+      <xsl:call-template name="makeGraphURL">
+       <xsl:with-param name="uri" select="$CICURI"/>
+       <xsl:with-param name="keys" select="'MMG'"/>
+       <!-- <xsl:with-param name="uri_set_size" select="'document.uri_set_size.elements[0].value'"/> -->
+       <xsl:with-param name="uri_set_size" select="'30'"/>
+      </xsl:call-template>
+     </xsl:variable>
+     <a href="{$forwardURL}">View the graph of all the objects depending on this one.</a>
    </p>
   </xsl:when>
   <xsl:otherwise>
  <xsl:choose>
   <xsl:when test="document(concat($BaseRDFURLForward,$quotedCICURIforURL))/*/*/*">
    <p>
-    <!-- CSC: Cut & Paster from above ==> create a single javascript function -->
-    <script>
-<![CDATA[
-     document.write('<a href="" onClick="window.open(mkDepURL(\']]><xsl:value-of select="$quotedCICURI"/><![CDATA[\'),\'graph\');return false;">View the graph of all the dependencies of this object.</a>');
-]]>
-    </script>
+     <xsl:variable name="forwardURL">
+      <xsl:call-template name="makeGraphURL">
+       <xsl:with-param name="uri" select="$CICURI"/>
+       <xsl:with-param name="keys" select="'MDG'"/>
+       <!-- <xsl:with-param name="uri_set_size" select="'document.uri_set_size.elements[0].value'"/> -->
+       <xsl:with-param name="uri_set_size" select="'30'"/>
+      </xsl:call-template>
+     </xsl:variable>
+     <a href="{$forwardURL}">View the graph of all the dependencies of this object.</a>
    </p>
   </xsl:when>
   <xsl:otherwise>