the CIC or the Theory window to invoke the annotationHelper.
<title>???</title>
<style type="text/css">
-#normal { background-color: white; font-family: sans-serif }
+#normal { background-color: #e6e6fa; font-family: sans-serif }
td.head { font-weight: bold; background-color: #e6e6fa; color: brown }
td.back { background-color: #e6e6fa; color: brown }
#indent { margin-left: 1cm; margin-right: 1cm }
<script language="JavaScript" src="../../javascript/defaults.js"></script>
<script language="JavaScript" src="../../javascript/utils.js"></script>
+<script language="JavaScript" src="../../javascript/control.js"></script>
</head>
<body id="normal">
- <center>
- <h1>Broken control frame. Useful soon! (stay tooned)</h1>
- </center>
-<form>
- <script>document.write('<textarea rows="1" cols="75">' +
- unescape(getParam('url')) +
- '</textarea>');
- </script>
-</form>
+ <h1>Object:
+ "<script>document.write(extractParam(unescape(getParam('url')),'param.CICURI'))</script>"
+ <font size="+1">[Annotations are
+ <script>if ((extractParam(unescape(getParam('url')),'param.annotations')) == 'NO') document.write('off'); else document.write('on')</script>
+ ]</font>
+ </h1>
+ <table>
+ <tr>
+ <td>
+ <script>
+ var url = unescape(getParam('url'));
+ url = setParam(url,"keys",getCICMathMLKeys());
+ url = setParam(url,"prop.doctype-public","");
+ url = setParam(url,"prop.encoding","");
+ url = setParam(url,"prop.media-type","application/x-helm-annotation-helper");
+ document.write(
+ '<a target="result" href="' + url + '">Annotate it</a>'
+ )
+ </script>
+ </td>
+ <td>
+ (Before following the link, you must install the HELM Annotation Helper)
+ </td>
+ </tr>
+ <tr>
+ <td>
+ View its metadata
+ </td>
+ <td>(Not implemented, yet. Coming soon.)</td>
+ </tr>
+ <tr>
+ <td>
+ Proof-check it
+ </td>
+ <td>
+ (Not ported to V7, yet. Coming soon.)
+ </td>
+ </tr>
+ </table>
</body>
</html>
<script>
document.write('<frameset rows="18%,*" border="0" scrolling="no">');
document.write('<frame src="control.html?url=' + getParam('url') +'"/>');
- document.write('<frame src="' + unescape(getParam('url')) + '"/>');
+ document.write('<frame src="' + unescape(getParam('url')) + '" + name="result"/>');
/*
document.write('<frame src="control.html' +
'?topurl=' + location.protocol + "//" + location.host + location.pathname +
--- /dev/null
+<html>
+
+<head>
+<title>???</title>
+
+<style type="text/css">
+#normal { background-color: #e6e6fa; font-family: sans-serif }
+td.head { font-weight: bold; background-color: #e6e6fa; color: brown }
+td.back { background-color: #e6e6fa; color: brown }
+#indent { margin-left: 1cm; margin-right: 1cm }
+#centered { text-align: center }
+</style>
+
+<script language="JavaScript" src="../../javascript/defaults.js"></script>
+<script language="JavaScript" src="../../javascript/utils.js"></script>
+<script language="JavaScript" src="../../javascript/control.js"></script>
+
+</head>
+
+<body id="normal">
+ <h1>Theory:
+ "<script>document.write(extractParam(unescape(getParam('url')),'param.CICURI'))</script>"
+ <font size="+1">[Annotations have no meaning for theories, yet]</font>
+ </h1>
+ <table>
+ <tr>
+ <td>
+ View its metadata
+ </td>
+ <td>(Not implemented, yet. Coming soon.)</td>
+ </tr>
+ <tr>
+ <td>
+ Proof-check it
+ </td>
+ <td>
+ (Not ported to V7, yet. Coming soon.)
+ </td>
+ </tr>
+ </table>
+</body>
+</html>
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
+"http://www.w3.org/TR/REC-html40/loose.dtd">
+<html>
+<head>
+ <script language="JavaScript" src="../../javascript/defaults.js"></script>
+ <script language="JavaScript" src="../../javascript/utils.js"></script>
+ <title>???</script></title>
+</head>
+<script>
+ document.write('<frameset rows="18%,*" border="0" scrolling="no">');
+ document.write('<frame src="control.html?url=' + getParam('url') +'"/>');
+ document.write('<frame src="' + unescape(getParam('url')) + '" + name="result"/>');
+ document.write('</frameset>');
+</script>
+
+</html>
return true;
}
+function getCICMathMLKeys()
+{
+ //Important note: do not modify this function without modifying makeURL
+ return escape("C1,C2,L");
+}
+
function makeURL(type,uri,cicflags,typesflags)
{
var mode = top.mode;
var keys = "";
var url = "";
- var interfaceURL = chopSlash(chopSlash(top.topurl)) + "/cic/index.html";
+ var interfaceURL = chopSlash(chopSlash(top.topurl)) +
+ ((type == "cic") ? "/cic/index.html" : "/theory/index.html");
var output = mode_list[0];
var format;
"&patch_dtd=" + mode_list[6];
} else {
if (format == "html" && type == "cic") {
+ //Important note: do not modify this function without modifying
+ //getCICMathMLKeys
keys = escape("C1,HC2,L")+"¶m.processorURL=" + escape(processorURL) +
"¶m.getterURL=" + escape(getterURL) +
"&prop.doctype-public="+escape("-//W3C//DTD XHTML 1.0 Transitional//EN")+
url = processorURL + "apply?xmluri=" + escape(getterURL + "getxml?uri=" + uri) + "&keys=" + keys + "¶m.CICURI=" + uri + "¶m.naturalLanguage=" + naturalLanguage + "¶m.annotations=" + annotations;
}
- return interfaceURL + "?url=" + escape(url);
+ if (output == "raw")
+ return url
+ else
+ return interfaceURL + "?url=" + escape(url);
}
return url.slice(0,url.lastIndexOf('/'));
}
+function setParam(url,name,value)
+{
+ var urla = url.split("?");
+ var search = urla[1];
+ var args = search.split("&");
+
+ for (var i = 0 ; i < args.length ; i++) {
+ var couple = args[i].split("=");
+ if (couple[0] == name) args[i] = name + "=" + value;
+ }
+
+
+ return (urla[0] + "?" + args.join("&"));
+}
+
+function extractParam(url,name)
+{
+ var search = url.split("?")[1];
+ var args = search.split("&");
+ var value = "???";
+
+ for (var i = 0 ; i < args.length ; i++) {
+ var couple = args[i].split("=");
+ if (couple[0] == name) value = couple[1];
+ }
+
+ if (value == "???") value = getDefaultParam(name);
+
+ return value;
+}
+
function getParam(name)
{
var search = location.search;