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//')"/>
-
-<!-- Next function to quote strings for JavaScript (i.e. ' ==> \' -->
-<xsl:template name="jsquote">
- <xsl:param name="s" select="''"/>
- <xsl:param name="news" select="''"/>
- <xsl:choose>
- <xsl:when test="$s = ''"><xsl:value-of select="$news"/></xsl:when>
- <xsl:otherwise>
- <xsl:variable name="char" select="substring($s,1,1)"/>
- <xsl:choose>
- <xsl:when test='$char = "'"'>
- <xsl:call-template name="jsquote">
- <xsl:with-param name="s" select="substring($s,2)"/>
- <xsl:with-param name="news" select='concat($news,"\\\'")'/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="jsquote">
- <xsl:with-param name="s" select="substring($s,2)"/>
- <xsl:with-param name="news" select="concat($news,$char)"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
+<xsl:variable name="BaseRDFURLForward" select="concat($rdflyURL,'get?kind=forward&object=')"/>
+<xsl:variable name="BaseRDFURLBackward" select="concat($rdflyURL,'get?kind=backward&object=')"/>
+<xsl:variable name="BaseRDFURLDC" select="concat($rdflyURL,'get?kind=dc&object=')"/>
<xsl:template match="/">
<html>
<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 target="cic" 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">
<input type="text" onClick="return false" value="{$uri_set_size}" size="2"/> (30 suggested)
</form>
<!--CSC: end of cut & paste from makeGraphLinks -->
+ <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:variable name="quotedCICURI">
<xsl:call-template name="jsquote">
<xsl:with-param name="s" select="$CICURI"/>
+ <xsl:with-param name="times" select="2"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="quotedCICURIforURL">
+ <xsl:call-template name="quote">
+ <xsl:with-param name="s" select="$CICURI"/>
</xsl:call-template>
</xsl:variable>
<xsl:choose>
- <xsl:when test="document(concat($BaseRDFURLBackward,$RDFURI))/*/*/*">
+ <xsl:when test="document(concat($BaseRDFURLBackward,$quotedCICURIforURL))/*/*/*">
<p>
<script>
var CICURI = "<xsl:value-of select="$CICURI"/>";
<![CDATA[
- document.write('<a target="theory" href="' + mkMetaTheoryURL(CICURI) + '">View the objects depending on it.</a>');
+ document.write('<a href="' + mkMetaTheoryURL(CICURI) + '">View the objects depending on it.</a>');
]]>
</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:choose>
- <xsl:when test="document(concat($BaseRDFURLForward,$RDFURI))/*/*/*">
+ <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>