3 <!-- Copyright (C) 2000, HELM Team -->
5 <!-- This file is part of HELM, an Hypertextual, Electronic -->
6 <!-- Library of Mathematics, developed at the Computer Science -->
7 <!-- Department, University of Bologna, Italy. -->
9 <!-- HELM is free software; you can redistribute it and/or -->
10 <!-- modify it under the terms of the GNU General Public License -->
11 <!-- as published by the Free Software Foundation; either version 2 -->
12 <!-- of the License, or (at your option) any later version. -->
14 <!-- HELM is distributed in the hope that it will be useful, -->
15 <!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
16 <!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -->
17 <!-- GNU General Public License for more details. -->
19 <!-- You should have received a copy of the GNU General Public License -->
20 <!-- along with HELM; if not, write to the Free Software -->
21 <!-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, -->
22 <!-- MA 02111-1307, USA. -->
24 <!-- For details, see the HELM World-Wide-Web page, -->
25 <!-- http://cs.unibo.it/helm/. -->
27 <xsl:stylesheet version="1.0"
28 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
29 xmlns:subst="http://www.cs.unibo.it/helm/subst">
31 <xsl:param name="uri_set_size" select="'30'"/>
33 <xsl:output method="html" encoding="iso-8859-1"/>
35 <xsl:template match="/|*">
37 <xsl:copy-of select="@*"/>
38 <xsl:apply-templates/>
42 <xsl:template match="head">
44 <xsl:copy-of select="@*"/>
45 <subst:script language="JavaScript" src="/javascript/defaults.js"/>
46 <subst:script language="JavaScript" src="/javascript/utils.js"/>
47 <subst:script language="JavaScript" src="/javascript/control.js"/>
48 <script language="JavaScript" type="text/javascript">
49 <!-- topurl will be used by the code in jsmenu/* -->
50 var topurl = "<subst:topurl/>";
52 <script language="JavaScript" type="text/javascript">
54 if(window.event + "" == "undefined") event = null;
55 function HM_f_PopUp(){return false};
56 function HM_f_PopDown(){return false};
58 popDown = HM_f_PopDown;
62 <script language="JavaScript1.2" type="text/javascript">
64 HM_PG_MenuWidth = 300;
65 HM_PG_FontFamily = "Arial,sans-serif";
69 HM_PG_FontColor = "blue";
70 HM_PG_FontColorOver = "green";
71 HM_PG_BGColor = "#DDDDDD";
72 HM_PG_BGColorOver = "#FFCCCC";
73 HM_PG_ItemPadding = 3;
75 HM_PG_BorderWidth = 2;
76 HM_PG_BorderColor = "black";
77 HM_PG_BorderStyle = "solid";
78 HM_PG_SeparatorSize = 2;
79 HM_PG_SeparatorColor = "#d0ff00";
81 HM_PG_ImageSrc = ]]> topurl + <![CDATA["/javascript/jsmenu/HM_More_black_right.gif";
82 HM_PG_ImageSrcLeft = ]]> topurl + <![CDATA["/javascript/jsmenu/HM_More_black_left.gif";
83 HM_PG_ImageSrcOver = ]]> topurl + <![CDATA["/javascript/jsmenu/HM_More_white_right.gif";
84 HM_PG_ImageSrcLeftOver = ]]> topurl + <![CDATA["/javascript/jsmenu/HM_More_white_left.gif";
87 HM_PG_ImageHorizSpace = 0;
88 HM_PG_ImageVertSpace = 2;
90 HM_PG_KeepHilite = true;
92 HM_PG_ClickKill = false;
93 HM_PG_ChildOverlap = 20;
94 HM_PG_ChildOffset = 10;
95 HM_PG_ChildPerCentOver = null;
96 HM_PG_TopSecondsVisible = .5;
97 HM_PG_StatusDisplayBuild =0;
98 HM_PG_StatusDisplayLink = 0;
99 HM_PG_UponDisplay = null;
100 HM_PG_UponHide = null;
101 HM_PG_RightToLeft = 0;
103 HM_PG_CreateTopOnly = 0;
104 HM_PG_ShowLinkCursor = 1;
105 HM_PG_NSFontOver = true;
107 //HM_a_TreesToBuild = [2];
112 function mkRDFURI(uri)
114 var prefix = "helm:rdf:www.cs.unibo.it/helm/rdf/backward//";
115 var re1 = /#xpointer\(1\/(\d+)\/(\d+)\)/;
116 var re2 = /#xpointer\(1\/(\d+)\)/;
117 // Just one of the following replace will do something
118 uri = uri.replace(re1,",$1,$2");
119 uri = uri.replace(re2,",$1");
121 return (prefix + uri);
124 function removeXPointer(uri)
126 //var re = /#xpointer(\.*)/;
127 // CSC: Why the r.e.s below work and the one above does not?
128 var re1 = /#xpointer\(1\/(\d+)\/(\d+)\)/;
129 var re2 = /#xpointer\(1\/(\d+)\)/;
130 var res = uri.replace(re1,"");
131 res = res.replace(re2,"");
137 // (use_rdf_uri==true) if the stylesheet must be applied to the
138 // metadata; (use_rdf_uri==false) otherwise
139 function mkGraphURL(uri,keys,use_rdf_uri)
141 var getterURL = unescape(getParam("param.getterURL"));
142 var draw_graphURL = unescape(getParam("param.draw_graphURL"));
143 var url= setParam(location.href,"keys",keys);
144 var rdfuri = mkRDFURI(uri);
145 url = setParam(url,"xmluri", getterURL + 'getxml%3Furi%3D' +
146 (use_rdf_uri ? rdfuri : removeXPointer(uri)));
147 url = setParam(url,"param.CICURI",escape(uri));
148 var uri_set_size = document.uri_set_size.elements[0].value;
149 url = setParam(url,"param.uri_set_size",uri_set_size);
150 url = draw_graphURL + 'draw?url=' + escape(url);
151 var url2 = setParam(location.href,"keys","MGL,RT");
152 url2 = setParam(url2,"xmluri",escape(url));
153 url2 = setParam(url2,"param.uri_set_size",uri_set_size);
157 function mkDepURL(uri)
159 return mkGraphURL(uri,"MDG",0);
163 function mkMetaURL(uri)
165 return mkGraphURL(uri,"MMG",1);
168 function mkCICURL(uri)
170 var rawuri = removeXPointer(uri);
171 var getterURL = getParam("param.getterURL");
172 var interfaceURL = unescape(getParam("param.interfaceURL"));
173 var url= setParam(location.href,"keys",getParam("param.keys"));
174 url = setParam(url,"xmluri", getterURL + 'getxml%3Furi%3D' + rawuri);
175 url = setParam(url,"param.CICURI",rawuri);
176 url = interfaceURL + "?url=" + escape(url);
181 <xsl:apply-templates/>
185 <xsl:template match="body">
186 <form name="uri_set_size">
187 Number of nodes to show when following an hyperlink:
188 <input type="text" onClick="return false" value="{$uri_set_size}" size="2"/> (30 suggested)
191 <xsl:copy-of select="@*"/>
192 <xsl:apply-templates/>
197 ,,,,,,,,,,,,,,,,
199 ["Objects this one depends on.","javascript:window.open(mkDepURL(selectedURI),'graph')",1,0,0],
200 ["Render this object.","javascript:window.open(mkCICURL(selectedURI),'cic')",1,0,0],
201 ["Objects depending on this one.","javascript:window.open(mkMetaURL(selectedURI),'graph')",1,0,0]
205 <subst:script Language="JavaScript1.2" src="/javascript/jsmenu/HM_Loader_prova.js"/>
209 <xsl:template match = "area">
210 <xsl:variable name="uri" select="@href"/>
212 <xsl:copy-of select="@*"/>
213 <xsl:if test="starts-with(@href,"cic:")">
214 <!-- CSC: I don't know why the following one does not work.
215 CSC: Replaced with the following line
216 <xsl:attribute name="onMouseOver">selectedURI=this.href;HM_f_PopUp('elMenu1',event)</xsl:attribute>
218 <xsl:attribute name="onMouseOver">selectedURI='<xsl:value-of select="$uri"/>';HM_f_PopUp('elMenu1',event)</xsl:attribute>
219 <xsl:attribute name="onMouseOut">HM_f_PopDown('elMenu1')</xsl:attribute>
221 <xsl:apply-templates/>