3 <xsl:stylesheet version="1.0"
4 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5 xmlns:subst="http://www.cs.unibo.it/helm/subst">
7 <xsl:param name="CICURI" select="''"/>
8 <xsl:param name="getterURL" select="''"/>
9 <xsl:param name="draw_graphURL" select="''"/>
11 <!--CSC: code cut & pasted from makeGraphLinks -->
12 <xsl:param name="uri_set_size" select="'30'"/>
13 <!--CSC: end of cut & paste from makeGraphLinks -->
15 <xsl:variable name="BaseRDFURL" select="concat($getterURL,'getxml?uri=helm:rdf:www.cs.unibo.it/helm/rdf/')"/>
16 <xsl:variable name="BaseRDFURLForward" select="concat($BaseRDFURL,'forward//')"/>
17 <xsl:variable name="BaseRDFURLBackward" select="concat($BaseRDFURL,'backward//')"/>
19 <!-- Next function to quote strings for JavaScript (i.e. ' ==> \' -->
20 <xsl:template name="jsquote">
21 <xsl:param name="s" select="''"/>
22 <xsl:param name="news" select="''"/>
24 <xsl:when test="$s = ''"><xsl:value-of select="$news"/></xsl:when>
26 <xsl:variable name="char" select="substring($s,1,1)"/>
28 <xsl:when test='$char = "'"'>
29 <xsl:call-template name="jsquote">
30 <xsl:with-param name="s" select="substring($s,2)"/>
31 <xsl:with-param name="news" select='concat($news,"\\\'")'/>
35 <xsl:call-template name="jsquote">
36 <xsl:with-param name="s" select="substring($s,2)"/>
37 <xsl:with-param name="news" select="concat($news,$char)"/>
45 <xsl:template match="/">
48 <subst:script language="JavaScript" src="/javascript/defaults.js"/>
49 <subst:script language="JavaScript" src="/javascript/utils.js"/>
50 <subst:script language="JavaScript" src="/javascript/control.js"/>
51 <subst:script language="JavaScript" src="/javascript/graphLinks.js"/>
53 <title>Metadata of <xsl:value-of select="$CICURI"/></title>
55 <body onLoad="window.focus()" bgColor="white">
57 var CICURI = "<xsl:value-of select="$CICURI"/>";
59 document.write('<h1>Metadata of <a target="cic" href="' + mkCICURL(CICURI) + '">' + CICURI + '</a></h1>');
62 <xsl:apply-templates select="*"/>
63 <!--CSC: code almost cut & pasted from makeGraphLinks -->
64 <form name="uri_set_size">
65 Number of nodes to show when following an hyperlink to a graph:
66 <input type="text" onClick="return false" value="{$uri_set_size}" size="2"/> (30 suggested)
68 <!--CSC: end of cut & paste from makeGraphLinks -->
73 <xsl:template name="makelink">
74 <xsl:param name="name" select="''"/>
75 <xsl:param name="CICURI" select="''"/>
76 <xsl:param name="RDFURI" select="''"/>
77 <xsl:variable name="quotedCICURI">
78 <xsl:call-template name="jsquote">
79 <xsl:with-param name="s" select="$CICURI"/>
83 <xsl:when test="document(concat($BaseRDFURLBackward,$RDFURI))/*/*/*">
86 var CICURI = "<xsl:value-of select="$CICURI"/>";
88 document.write('<a target="theory" href="' + mkMetaTheoryURL(CICURI) + '">View the objects depending on it.</a>');
95 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>');
102 Object <xsl:value-of select="$name"/> is never referenced in other objects
108 <xsl:when test="document(concat($BaseRDFURLForward,$RDFURI))/*/*/*">
110 <!-- CSC: Cut & Paster from above ==> create a single javascript function -->
113 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>');
120 Object <xsl:value-of select="$name"/> does not reference any other object