X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fon-line%2Fjavascript%2Fcontrol.js;h=de22891cc09b3fc74d4fa2c11b17448bfe30116a;hb=a3e1fdeba3b71604dc8adaa3c06e4cece00ea1c9;hp=9e1fe8982fcc87e4a92fd79e9e72f86f3a0f3fc7;hpb=37bc283f9c7b75ed10e7a7b7130d41a56b0f8f17;p=helm.git diff --git a/helm/on-line/javascript/control.js b/helm/on-line/javascript/control.js index 9e1fe8982..de22891cc 100644 --- a/helm/on-line/javascript/control.js +++ b/helm/on-line/javascript/control.js @@ -113,6 +113,8 @@ function makeURL(type,uri,cicflags,typesflags) var keys = ""; var url = ""; + var interfaceURL = chopSlash(chopSlash(top.topurl)) + "/cic/index.html"; + var output = mode_list[0]; var format; if (output == "raw") format = mode_list[1]; @@ -126,7 +128,7 @@ function makeURL(type,uri,cicflags,typesflags) "&patch_dtd=" + mode_list[6]; } else { if (format == "html" && type == "cic") { - keys = "C1,HC2,L¶m.processorURL=" + escape(processorURL) + + keys = escape("C1,HC2,L")+"¶m.processorURL=" + escape(processorURL) + "¶m.getterURL=" + escape(getterURL) + "&prop.doctype-public="+escape("-//W3C//DTD XHTML 1.0 Transitional//EN")+ "&prop.encoding=iso-8859-1" + @@ -134,21 +136,23 @@ function makeURL(type,uri,cicflags,typesflags) "¶m.doctype-public="+escape("-//W3C//DTD XHTML 1.0 Transitional//EN")+ "¶m.encoding=iso-8859-1" + "¶m.media-type=text/html" + - "¶m.keys=" + escape("C1,HC2,L"); + "¶m.keys=" + escape("C1,HC2,L") + + "¶m.interfaceURL=" + escape(interfaceURL); } else if (format == "html" && type == "theory") { - keys = "T1,T2,L,E¶m.processorURL=" + escape(processorURL) + + keys = escape("T1,T2,L,E")+"¶m.processorURL=" + escape(processorURL) + "¶m.getterURL=" + escape(getterURL) + "¶m.thkeys=" + escape("TC1,HC2,L") + "¶m.doctype-public="+escape("-//W3C//DTD XHTML 1.0 Transitional//EN")+ "¶m.encoding=iso-8859-1" + "¶m.media-type=text/html" + - "¶m.keys=" + escape("C1,HC2,L"); + "¶m.keys=" + escape("C1,HC2,L") + + "¶m.interfaceURL=" + escape(interfaceURL); } else if (format == "mml_cont" && type == "cic") { keys = "C1"; } else if (format == "mml_cont" && type == "theory") { - keys = "T1,E¶m.keys=C1¶m.thkeys=TC1"; + keys = escape("T1,E")+"¶m.keys=C1¶m.thkeys=TC1"; } else if (format == "mml_pres" && type == "cic") { - keys = "C1,C2,L¶m.processorURL=" + escape(processorURL) + + keys = escape("C1,C2,L")+"¶m.processorURL=" + escape(processorURL) + "¶m.getterURL=" + escape(getterURL) + "&prop.doctype-public="+ "&prop.encoding=" + @@ -156,12 +160,16 @@ function makeURL(type,uri,cicflags,typesflags) "¶m.doctype-public=" + "¶m.encoding=" + "¶m.media-type=text/xml" + - "¶m.keys=" + escape("C1,C2,L"); + "¶m.keys=" + escape("C1,C2,L") + + "¶m.interfaceURL=" + escape(interfaceURL); } else if (format == "mml_pres" && type == "theory") { - keys = "T1,T2,L,E¶m.keys=C1,C2¶m.thkeys=TC1,C2,L" + + keys = escape("T1,T2,L,E")+"¶m.keys=C1,C2,L¶m.thkeys=TC1,C2,L" + + "¶m.processorURL=" + escape(processorURL) + + "¶m.getterURL=" + escape(getterURL) + "¶m.doctype-public=" + "¶m.encoding=" + - "¶m.media-type=text/xml"; + "¶m.media-type=text/xml" + + "¶m.interfaceURL=" + escape(interfaceURL); } var naturalLanguage = typesflags; @@ -175,6 +183,6 @@ function makeURL(type,uri,cicflags,typesflags) url = processorURL + "apply?xmluri=" + escape(getterURL + "getxml?uri=" + uri) + "&keys=" + keys + "¶m.CICURI=" + uri + "¶m.naturalLanguage=" + naturalLanguage + "¶m.annotations=" + annotations; } - return url; + return interfaceURL + "?url=" + escape(url); }