X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=helm%2Fon-line%2Fjavascript%2Fcontrol.js;h=6734d4a133f5e6fc9ab60961b87fae73995bfc3a;hb=10434de696a721d9ea1b4eddc4169d601ee671e5;hp=3384875c6aedb950c2bb7a8d32fa38b7d691b0a0;hpb=de7919bc2f1c068734c6760af0cb44c6d7022804;p=helm.git diff --git a/helm/on-line/javascript/control.js b/helm/on-line/javascript/control.js index 3384875c6..6734d4a13 100644 --- a/helm/on-line/javascript/control.js +++ b/helm/on-line/javascript/control.js @@ -114,7 +114,6 @@ function refreshReload() 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; } @@ -127,10 +126,24 @@ function refreshtheoryHeader(headerURL) function getCICMathMLKeys() { - //Important note: do not modify this function without modifying makeURL return escape("d_c,C1,G,C2,L"); } +function getTheoryKeys() +{ + return escape("T1,T2,L,E"); +} + +function getEmbedKeys() +{ + return escape("d_c,TC1,HC2,L"); +} + +function getCICHTMLKeys() +{ + return escape("d_c,C1,HC2,L"); +} + function makeURL(type,uri,cicflags,typesflags) { var mode = top.mode; @@ -154,15 +167,16 @@ function makeURL(type,uri,cicflags,typesflags) if (output == "raw") { var ext = ""; + var rdfprefix = ""; if (format == "types") ext = ".types" - else if (format == "ann") ext = ".ann"; - url = getterURL + "getxml?uri=" + uri + ext + "&format=" + mode_list[5] + - "&patch_dtd=" + mode_list[6]; + else if (format == "ann") ext = ".ann" + else if (format == "fwd") rdfprefix = "helm:rdf:www.cs.unibo.it/helm/rdf/forward//" + else if (format == "bwd") rdfprefix = "helm:rdf:www.cs.unibo.it/helm/rdf/backward//"; + url = getterURL + "getxml?uri=" + rdfprefix + uri + ext + "&format=" + + mode_list[5] + "&patch_dtd=" + mode_list[6]; } else { if (format == "html" && type == "cic") { - //Important note: do not modify this function without modifying - //getCICMathMLKeys - keys = escape("d_c,C1,HC2,L") + + keys = getCICHTMLKeys() + "¶m.processorURL=" + escape(processorURL) + "¶m.getterURL=" + escape(getterURL) + "¶m.draw_graphURL=" + escape(draw_graphURL) + @@ -174,18 +188,18 @@ 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("d_c,C1,HC2,L") + + "¶m.keys=" + getCICHTMLKeys() + "¶m.interfaceURL=" + escape(interfaceURL); } else if (format == "html" && type == "theory") { - keys = escape("T1,T2,L,E")+ + keys = getTheoryKeys()+ "¶m.processorURL=" + escape(processorURL) + "¶m.getterURL=" + escape(getterURL) + "¶m.draw_graphURL=" + escape(draw_graphURL) + "¶m.uri_set_queueURL=" + escape(uri_set_queueURL) + "¶m.UNICODEvsSYMBOL=" + escape(UNICODEvsSYMBOL) + - "¶m.keys=" + escape("d_c,C1,HC2,L") + - "¶m.thkeys=" + escape("T1,T2,L,E") + - "¶m.embedkeys=" + escape("d_c,TC1,HC2,L") + + "¶m.keys=" + getCICHTMLKeys() + + "¶m.thkeys=" + getTheoryKeys() + + "¶m.embedkeys=" + getEmbedKeys() + "¶m.doctype-public="+escape("-//W3C//DTD XHTML 1.0 Transitional//EN")+ "¶m.encoding=iso-8859-1" + "¶m.thencoding=iso-8859-1" + @@ -194,7 +208,13 @@ function makeURL(type,uri,cicflags,typesflags) "¶m.interfaceURL=" + escape(interfaceURL) + "¶m.thinterfaceURL=" + escape(thinterfaceURL); } else if (format == "mml_cont" && type == "cic") { - keys = escape("d_c,C1"); + keys = escape("d_c,C1")+ + "&prop.doctype-public="+ + "&prop.encoding=" + + "&prop.media-type=text/xml" + + "¶m.doctype-public=" + + "¶m.encoding=" + + "¶m.media-type=text/xml"; } else if (format == "mml_cont" && type == "theory") { keys = escape("T1,L,E")+ "¶m.keys=" + escape("d_c,C1") + @@ -213,7 +233,7 @@ function makeURL(type,uri,cicflags,typesflags) "¶m.interfaceURL=" + escape(interfaceURL) + "¶m.thinterfaceURL=" + escape(thinterfaceURL); } else if (format == "mml_pres" && type == "cic") { - keys = escape("d_c,C1,G,C2,L")+ + keys = getCICMathMLKeys()+ "¶m.processorURL=" + escape(processorURL) + "¶m.getterURL=" + escape(getterURL) + "¶m.draw_graphURL=" + escape(draw_graphURL) + @@ -224,13 +244,13 @@ function makeURL(type,uri,cicflags,typesflags) "¶m.doctype-public=" + "¶m.encoding=" + "¶m.media-type=text/xml" + - "¶m.keys=" + escape("d_c,C1,G,C2,L") + + "¶m.keys=" + getCICMathMLKeys() + "¶m.interfaceURL=" + escape(interfaceURL); } else if (format == "mml_pres" && type == "theory") { - keys = escape("T1,T2,L,E")+ - "¶m.keys=d_c,C1,G,C2,L" + - "¶m.thkeys=T1,T2,L,E" + - "¶m.embedkeys=d_c,TC1,G,C2,L" + + keys = getTheoryKeys()+ + "¶m.keys=" + getCICMathMLKeys() + + "¶m.thkeys=" + getTheoryKeys() + + "¶m.embedkeys=" + escape("d_c,TC1,G,C2,L") + "¶m.processorURL=" + escape(processorURL) + "¶m.getterURL=" + escape(getterURL) + "¶m.draw_graphURL=" + escape(draw_graphURL) + @@ -244,11 +264,11 @@ function makeURL(type,uri,cicflags,typesflags) "¶m.thinterfaceURL=" + escape(thinterfaceURL); } - var naturalLanguage = typesflags; + var naturalLanguage = typesflags.toLowerCase(); if (typesflags != "NO" || type == "theory") { naturalLanguage = mode_list[3]; } - var annotations = cicflags; + var annotations = cicflags.toLowerCase(); if (cicflags != "NO" || type == "theory") { annotations = mode_list[4]; }