]> matita.cs.unibo.it Git - helm.git/commitdiff
Bug fixing: now the link to the graphs produce extended URIs
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Thu, 18 Oct 2001 10:17:15 +0000 (10:17 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Thu, 18 Oct 2001 10:17:15 +0000 (10:17 +0000)
(e.g. ".../nat.ind#xpointer(1/1/1")

helm/on-line/xslt/demultiplexMutual.xsl
helm/on-line/xslt/metadataControl.xsl
helm/on-line/xslt/metadataLib.xsl

index af4aafa889b1fefab0d37462ab99733532b0a5af..370483392f3dbf09d94f94be7eecf8fd23ec8f77 100644 (file)
 
 <xsl:template match="InductiveDefinition">
  <xsl:for-each select="InductiveType">
+  <xsl:variable name="CICURIInductiveType" select="concat($CICURI,'#xpointer(1/',position())"/>
   <xsl:variable name="RDFURIInductiveType" select="concat($RDFURI,',',position())"/>
-   <h3>Metadata related to <xsl:value-of select="@name"/>:</h3>
-   <xsl:apply-templates select="document(concat($url,$RDFURIInductiveType))" mode="makelink">
-    <xsl:with-param name="name" select="@name"/>
-    <xsl:with-param name="RDFURI" select="$RDFURIInductiveType"/>
-   </xsl:apply-templates>
+  <h3>Metadata related to <xsl:value-of select="@name"/>:</h3>
+  <xsl:apply-templates select="document(concat($url,$RDFURIInductiveType))" mode="makelink">
+   <xsl:with-param name="name" select="@name"/>
+   <xsl:with-param name="CICURI" select="concat($CICURIInductiveType,')')"/>
+   <xsl:with-param name="RDFURI" select="$RDFURIInductiveType"/>
+  </xsl:apply-templates>
   <xsl:for-each select="Constructor">
+   <xsl:variable name="CICURIConstructor" select="concat($CICURIInductiveType,'/',position(),')')"/>
    <xsl:variable name="RDFURIConstructor" select="concat($RDFURIInductiveType,',',position())"/>
    <h3>Metadata related to <xsl:value-of select="@name"/>:</h3>
    <xsl:apply-templates select="document(concat($url,$RDFURIConstructor))" mode="makelink">
     <xsl:with-param name="name" select="@name"/>
+    <xsl:with-param name="CICURI" select="$CICURIConstructor"/>
     <xsl:with-param name="RDFURI" select="$RDFURIConstructor"/>
    </xsl:apply-templates>
   </xsl:for-each>
index 3b9b5ba831732b8bfe73b2e814b283cddb92f1e6..71999116ab9a4965fd90cb5f96eed1bff402f841 100644 (file)
@@ -18,6 +18,7 @@
 <xsl:template match="unresolved|url">
  <xsl:apply-templates mode="makelink" select=".">
   <xsl:with-param name="name" select="$CICURI"/>
+  <xsl:with-param name="CICURI" select="$CICURI"/>
   <xsl:with-param name="RDFURI" select="$RDFURI"/>
  </xsl:apply-templates>
 </xsl:template>
index a1ea8c58d5f8a0c63d61152f076e6fe1d640d705..e3d2493211cb1ea47ec7c3cecd765d382e9fd257 100644 (file)
@@ -8,6 +8,8 @@
 <xsl:param name="getterURL" select="''"/>
 <xsl:param name="draw_graphURL" select="''"/>
 
+<xsl:variable name="rawCICURI" select="$CICURI"/>
+
 <xsl:template match="/">
  <html>
   <head>
 
 <xsl:template match="/" mode="makelink">
  <xsl:param name="name" select="''"/>
+ <xsl:param name="CICURI" select="''"/>
  <xsl:param name="RDFURI" select="''"/>
  <xsl:apply-templates select="*" mode="makelink">
   <xsl:with-param name="name" select="$name"/>
+  <xsl:with-param name="CICURI" select="$CICURI"/>
   <xsl:with-param name="RDFURI" select="$RDFURI"/>
  </xsl:apply-templates>
 </xsl:template>
 
 <xsl:template match="unresolved" mode="makelink">
  <xsl:param name="name" select="''"/>
+ <xsl:param name="CICURI" select="''"/>
  <p>
   Object <xsl:value-of select="$name"/> is never referenced in other objects
  </p>
- <xsl:apply-templates select="." mode="mk_dep_graph"/>
+ <xsl:apply-templates select="." mode="mk_dep_graph">
+  <xsl:with-param name="CICURI" select="$CICURI"/>
+ </xsl:apply-templates>
 </xsl:template>
 
 <xsl:template match="url" mode="makelink">
  <xsl:param name="name" select="''"/>
+ <xsl:param name="CICURI" select="''"/>
  <xsl:param name="RDFURI" select="''"/>
  <p>
   <script>
    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 it.</a>');
  </p>
  <p>
   <script>
+   var CICURI = "<xsl:value-of select="$CICURI"/>";
    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 = setParam(url,"param.CICURI",escape(CICURI));
    url = draw_graphURL + 'draw?url=' + escape(url);
    var url2 = setParam(location.href,"keys","ML2,RT");
    url2 = setParam(url2,"xmluri",escape(url));
 ]]>
   </script>
  </p>
- <xsl:apply-templates select="." mode="mk_dep_graph"/>
+ <xsl:apply-templates select="." mode="mk_dep_graph">
+  <xsl:with-param name="CICURI" select="$CICURI"/>
+ </xsl:apply-templates>
 </xsl:template>
 
 <xsl:template match="*" mode="mk_dep_graph">
+ <xsl:param name="CICURI" select="''"/>
  <p>
   <script>
    var CICURI = "<xsl:value-of select="$CICURI"/>";
+   var rawCICURI = "<xsl:value-of select="$rawCICURI"/>";
    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 = setParam(url,"xmluri", getterURL + 'getxml%3Furi%3D' + rawCICURI);
+   url = setParam(url,"param.CICURI",escape(CICURI));
    url = draw_graphURL + 'draw?url=' + escape(url);
    var url2 = setParam(location.href,"keys","ML2,RT");
    url2 = setParam(url2,"xmluri",escape(url));