1 function updateMode(i, s)
4 var mode_list = mode.split(",");
8 for (j = 0; j < mode_list.length; j++) {
10 else res += mode_list[j];
11 if (j < mode_list.length - 1) res += ",";
17 function updateOutput(output,format)
19 var theoryuri = top.theoryuri;
20 var cicuri = top.cicuri;
22 var topurl = top.topurl;
23 var processorURL = top.processorURL;
24 var getterURL = top.getterURL;
25 var mode_list = mode.split(",");
26 var new_mode = output.options[output.selectedIndex].value;
27 var dest = "?theoryuri=" + theoryuri + "&cicuri=" + cicuri + "&topurl=" + topurl + "&processorURL=" + processorURL + "&getterURL=" + getterURL + "&mode=";
29 if (new_mode != mode_list[0]) {
30 updateMode(0, new_mode);
31 if (new_mode == "raw") updateMode(2, format.options[format.selectedIndex].value);
32 else updateMode(1, format.options[format.selectedIndex].value);
35 top.processorURL + 'apply' +
37 '¶m.topurl=' + topurl +
39 escape(top.topurl + '/html/library/control.html' + dest + top.mode);
45 function updateFormat(format)
48 var mode_list = mode.split(",");
50 if (mode_list[0] == "raw") {
51 updateMode(1, format.options[format.selectedIndex].value);
53 updateMode(2, format.options[format.selectedIndex].value);
59 function updateNatural(checkbox)
61 if (checkbox.checked) updateMode(3, "yes");
62 else updateMode(3, "no");
66 function updateAnnotations(checkbox)
68 if (checkbox.checked) updateMode(4, "yes");
69 else updateMode(4, "no");
73 function updateCompressed(checkbox)
75 if (checkbox.checked) updateMode(5, "gz");
76 else updateMode(5, "normal");
80 function updateDTDPatched(checkbox)
82 if (checkbox.checked) updateMode(6, "yes");
83 else updateMode(6, "no");
87 function refreshReload()
91 "&cicuri=" + top.cicuri +
92 "&theoryuri=" + top.theoryuri +
93 "&processorURL=" + top.processorURL +
94 "&getterURL=" + top.getterURL +
95 "&UNICODEvsSYMBOL=" + top.UNICODEvsSYMBOL;
98 top.processorURL + 'apply' +
100 '¶m.topurl=' + top.topurl +
102 escape(top.topurl + '/html/library/index.html' + search);
104 top.frames[0].document.links[0].href = href;
105 top.frames[0].document.links[1].href =
106 top.topurl + '/html/index.html' + search;
111 function refreshcicHeader(headerURL)
113 // Qui e sotto da modificare per usare UWOBO!!!
114 top.cicheader.location.search = "?keys=GP&xmluri=" + headerURL + "¶m.uri=" + top.cicuri;
118 function refreshtheoryHeader(headerURL)
120 top.theoryheader.location.search = "?keys=GP&xmluri=" + headerURL + "¶m.uri=" + top.theoryuri;
124 function getCICMathMLKeys()
126 //Important note: do not modify this function without modifying makeURL
127 return escape("d_c,C1,G,C2,L");
130 function makeURL(type,uri,cicflags,typesflags)
133 var processorURL = top.processorURL;
134 var getterURL = top.getterURL;
135 var UNICODEvsSYMBOL = top.UNICODEvsSYMBOL;
136 var mode_list = mode.split(",");
141 var interfaceURL = top.topurl + "/html/cic/index.html";
142 var thinterfaceURL = top.topurl + "/html/theory/index.html";
144 var output = mode_list[0];
146 if (output == "raw") format = mode_list[1];
147 else format = mode_list[2];
149 if (output == "raw") {
151 if (format == "types") ext = ".types"
152 else if (format == "ann") ext = ".ann";
153 url = getterURL + "getxml?uri=" + uri + ext + "&format=" + mode_list[5] +
154 "&patch_dtd=" + mode_list[6];
156 if (format == "html" && type == "cic") {
157 //Important note: do not modify this function without modifying
159 keys = escape("d_c,C1,HC2,L")+"¶m.processorURL=" + escape(processorURL) +
160 "¶m.getterURL=" + escape(getterURL) +
161 "¶m.UNICODEvsSYMBOL=" + escape(UNICODEvsSYMBOL) +
162 "&prop.doctype-public="+escape("-//W3C//DTD XHTML 1.0 Transitional//EN")+
163 "&prop.encoding=iso-8859-1" +
164 "&prop.media-type=text/html" +
165 "¶m.doctype-public="+escape("-//W3C//DTD XHTML 1.0 Transitional//EN")+
166 "¶m.encoding=iso-8859-1" +
167 "¶m.media-type=text/html" +
168 "¶m.keys=" + escape("C1,HC2,L") +
169 "¶m.interfaceURL=" + escape(interfaceURL);
170 } else if (format == "html" && type == "theory") {
171 keys = escape("T1,T2,L,E")+
172 "¶m.processorURL=" + escape(processorURL) +
173 "¶m.getterURL=" + escape(getterURL) +
174 "¶m.UNICODEvsSYMBOL=" + escape(UNICODEvsSYMBOL) +
175 "¶m.keys=" + escape("d_c,C1,HC2,L") +
176 "¶m.thkeys=" + escape("T1,T2,L,E") +
177 "¶m.embedkeys=" + escape("d_c,TC1,HC2,L") +
178 "¶m.doctype-public="+escape("-//W3C//DTD XHTML 1.0 Transitional//EN")+
179 "¶m.encoding=iso-8859-1" +
180 "¶m.thencoding=iso-8859-1" +
181 "¶m.media-type=text/html" +
182 "¶m.thmedia-type=text/html" +
183 "¶m.interfaceURL=" + escape(interfaceURL) +
184 "¶m.thinterfaceURL=" + escape(thinterfaceURL);
185 } else if (format == "mml_cont" && type == "cic") {
186 keys = escape("d_c,C1");
187 } else if (format == "mml_cont" && type == "theory") {
188 keys = escape("T1,L,E")+
189 "¶m.keys=" + escape("d_c,C1") +
190 "¶m.thkeys=T1,L,E" +
191 "¶m.embedkeys=" + escape("d_c,TC1") +
193 "¶m.processorURL=" + escape(processorURL) +
194 "¶m.getterURL=" + escape(getterURL) +
195 "¶m.doctype-public=" +
197 "¶m.thencoding=iso-8859-1" +
198 "¶m.media-type=text/xml" +
199 "¶m.thmedia-type=text/html" +
200 "¶m.interfaceURL=" + escape(interfaceURL) +
201 "¶m.thinterfaceURL=" + escape(thinterfaceURL);
202 } else if (format == "mml_pres" && type == "cic") {
203 keys = escape("d_c,C1,G,C2,L")+
204 "¶m.processorURL=" + escape(processorURL) +
205 "¶m.getterURL=" + escape(getterURL) +
206 "&prop.doctype-public="+
208 "&prop.media-type=text/xml" +
209 "¶m.doctype-public=" +
211 "¶m.media-type=text/xml" +
212 "¶m.keys=" + escape("d_c,C1,G,C2,L") +
213 "¶m.interfaceURL=" + escape(interfaceURL);
214 } else if (format == "mml_pres" && type == "theory") {
215 keys = escape("T1,T2,L,E")+
216 "¶m.keys=d_c,C1,G,C2,L" +
217 "¶m.thkeys=T1,T2,L,E" +
218 "¶m.embedkeys=d_c,TC1,G,C2,L" +
219 "¶m.processorURL=" + escape(processorURL) +
220 "¶m.getterURL=" + escape(getterURL) +
221 "¶m.doctype-public=" +
223 "¶m.thencoding=iso-8859-1" +
224 "¶m.media-type=text/xml" +
225 "¶m.thmedia-type=text/html" +
226 "¶m.interfaceURL=" + escape(interfaceURL) +
227 "¶m.thinterfaceURL=" + escape(thinterfaceURL);
230 var naturalLanguage = typesflags;
231 if (typesflags != "NO" || type == "theory") {
232 naturalLanguage = mode_list[3];
234 var annotations = cicflags;
235 if (cicflags != "NO" || type == "theory") {
236 annotations = mode_list[4];
238 url = processorURL + "apply?xmluri=" + escape(getterURL + "getxml?uri=" + uri) + "&keys=" + keys + "¶m.CICURI=" + uri + "¶m.naturalLanguage=" + naturalLanguage + "¶m.annotations=" + annotations + "¶m.topurl=" + top.topurl;
243 else if (type == "cic")
244 return interfaceURL + "?url=" + escape(url);
245 else if (type == "theory")
246 return thinterfaceURL + "?url=" + escape(url)