Mozilla/Galeon/Netscape V6 browsers.
In particular, now every frame (but the two headers that are completely
dummy) is made by UWOBO. The stylesheet applied, named resolve_topurl.xsl
(key = RT) substitutes where requested the URL of the interface, that
can no longer be inferred in JavaScript from the current URL (that now
refers to UWOBO).
Hopefully, together with the previous modification to recognize browsers
supporting only UNICODE or supporting only the symbol font, all the
known compatibility problems have been solved.
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
-"http://www.w3.org/TR/REC-html40/loose.dtd">
-<html>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
+-->
+
+<html xmlns:subst="http://www.cs.unibo.it/helm/subst">
<head>
<title>Control panel</title>
-<script language="JavaScript" src="../../javascript/defaults.js"></script>
-<script language="JavaScript" src="../../javascript/utils.js"></script>
-<script language="JavaScript" src="../../javascript/control.js"></script>
+<!-- Note: <subst:script/> are substitued by the stylesheet with <script /> -->
+<!-- after changing @src in the concatenation of the interface URL with @src -->
+<subst:script language="JavaScript" src="/javascript/defaults.js" />
+<subst:script language="JavaScript" src="/javascript/utils.js" />
+<subst:script language="JavaScript" src="/javascript/control.js" />
</head>
<body bgcolor="#ffffff" text="#000000">
<form>
<td>
<select name="output" onChange="updateOutput(this,document.forms[0].format)">
<script>
- var mode = getParam('mode');
+ var mode = getParam2('mode');
var mode_list = mode.split(',');
outputOption(document, "processed", "Processed", mode_list[0]);
outputOption(document, "raw", "Raw", mode_list[0]);
<td>
<select name="format" onChange="updateFormat(this)">
<script>
- var mode = getParam('mode');
+ var mode = getParam2('mode');
var mode_list = mode.split(',');
if (mode_list[0] == "raw") {
outputOption(document, "cic", "CIC", mode_list[1]);
</td>
<td>
<script>
+<![CDATA[
document.write('<a target="_top" href="' +
- getParam('topurl') + '/html/library/index.html' +
+ getParam2('topurl') + '/html/library/index.html' +
'" onClick="refreshReload()">Reload</a>');
+]]>
</script>
- <br>
+ <br />
(do it also before attempting to take a link to the current page)
<script>
- top.processorURL = getParam('processorURL');
- top.getterURL = getParam('getterURL');
- top.UNICODEvsSYMBOL = getParam('UNICODEvsSYMBOL');
- top.topurl = getParam('topurl');
- top.mode = getParam('mode');
- top.cicuri = getParam('cicuri');
- top.theoryuri = getParam('theoryuri');
+<![CDATA[
+ top.processorURL = getParam2('processorURL');
+ top.getterURL = getParam2('getterURL');
+ top.UNICODEvsSYMBOL = getParam2('UNICODEvsSYMBOL');
+ top.topurl = getParam2('topurl');
+ top.mode = getParam2('mode');
+ top.cicuri = getParam2('cicuri');
+ top.theoryuri = getParam2('theoryuri');
+]]>
</script>
</td>
</tr>
<tr>
<td colspan="3">
<script>
- var mode = getParam('mode');
+<![CDATA[
+ var mode = getParam2('mode');
var mode_list = mode.split(',');
if (mode_list[0] == "raw") {
outputCheckbox(document, "updateCompressed(this)",
outputCheckbox(document, "updateAnnotations(this)",
" Annotations", mode_list[4] == "yes");
}
+]]>
</script>
</td>
<td>
<script>
- document.write('<a target="_top" href="../../html/index.html' +
- '" onClick="refreshReload()">Configuration Panel</a>');
+<![CDATA[
+ document.write('<a target="_top" href=""' +
+ ' onClick="refreshReload()">Configuration Panel</a>');
+]]>
</script>
- <br>
+ <br />
</td>
</tr>
</table>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
-"http://www.w3.org/TR/REC-html40/loose.dtd">
-<html>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
+-->
+
+<html xmlns:subst="http://www.cs.unibo.it/helm/subst">
<head>
- <script language="JavaScript" src="../../javascript/defaults.js"></script>
- <script language="JavaScript" src="../../javascript/utils.js"></script>
- <title>Index</script></title>
+<!-- Note: <subst:script/> are substitued by the stylesheet with <script /> -->
+<!-- after changing @src in the concatenation of the interface URL with @src -->
+<subst:script language="JavaScript" src="/javascript/defaults.js" />
+<subst:script language="JavaScript" src="/javascript/utils.js" />
+<title>Index</title>
</head>
<script>
+ var topurl = "<subst:topurl/>";
+<![CDATA[
document.write('<frameset rows="18%,*" border="0" scrolling="no">');
- document.write('<frame src="control.html' +
- '?topurl=' + chopSlash(chopSlash(chopSlash(location.protocol + "//" + location.host + location.pathname))) +
- '&mode=' + getParam('mode') +
- '&cicuri=' + getParam('cicuri') +
- '&theoryuri=' + getParam('theoryuri') +
- '&processorURL=' + getParam('processorURL') +
- '&getterURL=' + getParam('getterURL') +
- '&UNICODEvsSYMBOL=' + getParam('UNICODEvsSYMBOL') +
- '" name="control"/>');
+ var control_frame_URL=
+ topurl + '/html/library/control.html' +
+ '?topurl=' + topurl +
+ '&mode=' + getParam2('mode') +
+ '&cicuri=' + getParam2('cicuri') +
+ '&theoryuri=' + getParam2('theoryuri') +
+ '&processorURL=' + getParam2('processorURL') +
+ '&getterURL=' + getParam2('getterURL') +
+ '&UNICODEvsSYMBOL=' + getParam2('UNICODEvsSYMBOL');
+ var escaped_control_frame_URL = escape(control_frame_URL);
+ document.write('<frame src="' +
+ getParam2('processorURL') + 'apply' +
+ '?keys=RT' +
+ '¶m.topurl=' + topurl +
+ '&xmluri=' + escaped_control_frame_URL + '" name="control"/>');
document.write('<frameset cols="50%,50%" border="0" scrolling="no">');
document.write('<frameset rows="11%,*" border="0" scrolling="no">');
document.write('<frame src="' +
- getParam('processorURL') + 'apply' +
+ getParam2('processorURL') + 'apply' +
'?keys=GP' +
- '&xmluri=' + location.protocol + "//" + location.host + chopSlash(location.pathname) + "/header.html" +
- '¶m.uri=' + getParam('theoryuri') +
+ //'&xmluri=' + location.protocol + "//" + location.host + chopSlash(location.pathname) + "/header.html" +
+ '&xmluri=' + topurl + '/html/library/header.html' +
+ '¶m.uri=' + getParam2('theoryuri') +
'" name="theoryheader"/>');
document.write('<frame src="' +
- getParam('processorURL') + 'apply' +
+ getParam2('processorURL') + 'apply' +
'?keys=L2H' +
- '&xmluri=' + escape(getParam('getterURL') + 'ls?format=xml&baseuri=' + getParam('theoryuri')) +
+ '&xmluri=' + escape(getParam2('getterURL') + 'ls?format=xml&baseuri=' + getParam2('theoryuri')) +
'¶m.keys=L2H' +
- '¶m.uri=' + getParam('theoryuri') +
- '¶m.getterURL=' + getParam('getterURL') +
- '¶m.UNICODEvsSYMBOL=' + getParam('UNICODEvsSYMBOL') +
+ '¶m.uri=' + getParam2('theoryuri') +
+ '¶m.getterURL=' + getParam2('getterURL') +
+ '¶m.UNICODEvsSYMBOL=' + getParam2('UNICODEvsSYMBOL') +
'¶m.target=theory' +
- '¶m.interfaceURL=' + location.protocol + "//" + location.host + chopSlash(chopSlash(chopSlash(location.pathname))) +
+ //'¶m.interfaceURL=' + location.protocol + "//" + location.host + chopSlash(chopSlash(chopSlash(location.pathname))) +
+ '¶m.interfaceURL=' + topurl +
'" name="theoryresult"/>');
document.write('</frameset>');
document.write('<frameset rows="11%,*" border="0" scrolling="no">');
document.write('<frame src="' +
- getParam('processorURL') + 'apply' +
+ getParam2('processorURL') + 'apply' +
'?keys=GP' +
- '&xmluri=' + location.protocol + "//" + location.host + chopSlash(location.pathname) + "/header.html" +
- '¶m.uri=' + getParam('cicuri') +
+ //'&xmluri=' + location.protocol + "//" + location.host + chopSlash(location.pathname) + "/header.html" +
+ '&xmluri=' + topurl + '/html/library/header.html' +
+ '¶m.uri=' + getParam2('cicuri') +
'" name="cicheader"/>');
document.write('<frame src="' +
- getParam('processorURL') + 'apply' +
+ getParam2('processorURL') + 'apply' +
'?keys=L2H' +
- '&xmluri=' + escape(getParam('getterURL') + 'ls?format=xml&baseuri=' + getParam('cicuri')) +
+ '&xmluri=' + escape(getParam2('getterURL') + 'ls?format=xml&baseuri=' + getParam2('cicuri')) +
'¶m.keys=L2H' +
- '¶m.uri=' + getParam('cicuri') +
- '¶m.getterURL=' + getParam('getterURL') +
- '¶m.UNICODEvsSYMBOL=' + getParam('UNICODEvsSYMBOL') +
+ '¶m.uri=' + getParam2('cicuri') +
+ '¶m.getterURL=' + getParam2('getterURL') +
+ '¶m.UNICODEvsSYMBOL=' + getParam2('UNICODEvsSYMBOL') +
'¶m.target=cic' +
- '¶m.interfaceURL=' + location.protocol + "//" + location.host + chopSlash(chopSlash(chopSlash(location.pathname))) +
+ //'¶m.interfaceURL=' + location.protocol + "//" + location.host + chopSlash(chopSlash(chopSlash(location.pathname))) +
+ '¶m.interfaceURL=' + topurl +
'" name="cicresult"/>');
document.write('</frameset>');
document.write('</frameset>');
document.write('</frameset>');
+]]>
</script>
</html>
updateMode(0, new_mode);
if (new_mode == "raw") updateMode(2, format.options[format.selectedIndex].value);
else updateMode(1, format.options[format.selectedIndex].value);
- location.search = dest + top.mode;
+
+ var href =
+ top.processorURL + 'apply' +
+ '?keys=RT' +
+ '¶m.topurl=' + topurl +
+ '&xmluri=' +
+ escape(top.topurl + '/html/library/control.html' + dest + top.mode);
+
+ location.href = href;
}
}
"&getterURL=" + top.getterURL +
"&UNICODEvsSYMBOL=" + top.UNICODEvsSYMBOL;
- top.frames[0].document.links[0].search = search;
- top.frames[0].document.links[1].search = search;
+ var href =
+ top.processorURL + 'apply' +
+ '?keys=RT' +
+ '¶m.topurl=' + top.topurl +
+ '&xmluri=' +
+ escape(top.topurl + '/html/library/index.html' + search);
+
+ top.frames[0].document.links[0].href = href;
+ top.frames[0].document.links[1].href =
+ top.topurl + '/html/index.html' + search;
return true;
}
function refreshcicHeader(headerURL)
{
+// Qui e sotto da modificare per usare UWOBO!!!
top.cicheader.location.search = "?keys=GP&xmluri=" + headerURL + "¶m.uri=" + top.cicuri;
return true;
}
return document.UNICODEvsSYMBOL.radioUNICODEvsSYMBOL[1].value;
}
+function chopSlash(url)
+{
+ return url.slice(0,url.lastIndexOf('/'));
+}
+
function refreshLinks()
{
var search = top.location.search;
"?processorURL=" + getUwoboURL() +
"&getterURL=" + getGetterURL();
- document.links[4].href = "../html/library/index.html?cicuri=" + cicuri
- + "&theoryuri=" + theoryuri
- + "&mode=" + mode
- + "&processorURL=" + getUwoboURL()
- + "&getterURL=" + getGetterURL()
- + "&UNICODEvsSYMBOL=" + getUNICODEvsSYMBOL();
+ var topurl =
+ chopSlash(chopSlash(
+ document.location.protocol + '//' +
+ document.location.host +
+ document.location.pathname));
+ document.links[4].href =
+ getUwoboURL() + "apply" +
+ "?keys=RT" +
+ "¶m.topurl=" + topurl +
+ "&xmluri=" +
+ escape(
+ topurl + "/html/library/index.html" +
+ "?cicuri=" + cicuri +
+ "&theoryuri=" + theoryuri +
+ "&mode=" + mode +
+ "&processorURL=" + getUwoboURL() +
+ "&getterURL=" + getGetterURL() +
+ "&UNICODEvsSYMBOL=" + getUNICODEvsSYMBOL()
+ );
}
function selectUwoboURL(ss)
return value;
}
-function getParam(name)
+function getParam0(search,name)
{
- var search = location.search;
- search = search.slice(1);
var args = search.split("&");
var value = "???";
return value;
}
+function getParam(name)
+{
+ return getParam0(location.search.slice(1),name);
+}
+
+function getParam2(name)
+{
+ var url = unescape(getParam('xmluri'));
+ var tmp = url.split("?");
+
+ if (tmp.length > 1)
+ return getParam0(tmp[1],name);
+ else
+ return getDefaultParam(name);
+}
+
+
function outputOption(doc, value, content, selected)
{
doc.write("<option value=\"" + value + "\" ");
<img border="0" src="{concat($interfaceURL,'/icons/',$icon)}" alt="[{$alt}]"/>
</td>
<td>
+<!-- Substituted with next lines to avoid Mozilla 0.8 bug setting this.search
<a
onClick=
"top.{$target}uri='{$uri}';
onMouseOver="window.status='{$uri}'; return true"
href="apply"
><xsl:value-of select="$basename"/></a>
+-->
+ <a
+ onClick=
+ "top.{$target}uri='{$uri}';
+ refresh{$target}Header('{$interfaceURL}/html/library/header.html');
+ var search='?keys={$keys}' +
+ '&xmluri=' + escape('{$getterURL}ls?format=xml'+'&baseuri={$uri}')+
+ '&param.uri={$uri}' +
+ '&param.keys={$keys}' +
+ '&param.getterURL={$getterURL}' +
+ '&param.target={$target}' +
+ '&param.interfaceURL={$interfaceURL}';
+ this.href=
+ this.protocol + '//' + this.host + this.pathname + search + this.hash;"
+ onMouseOver="window.status='{$uri}'; return true"
+ href="apply"
+ ><xsl:value-of select="$basename"/></a>
</td>
</tr>
</xsl:template>
--- /dev/null
+<?xml version="1.0"?>
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:subst="http://www.cs.unibo.it/helm/subst">
+
+<xsl:output
+ method="html"
+ encoding="ISO-8859-1"
+ media-type="text/html" />
+
+<xsl:param name="topurl" select="''"/>
+
+<xsl:template match="subst:script">
+ <script language="{@language}" src="{concat($topurl,@src)}"></script>
+</xsl:template>
+
+<xsl:template match="subst:topurl">
+ <xsl:value-of select="$topurl"/>
+</xsl:template>
+
+<xsl:template match="/|*">
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ <xsl:apply-templates/>
+ </xsl:copy>
+</xsl:template>
+
+</xsl:stylesheet>