source: dev/trunk/ab5.0/abdev/ProjectEditor/HtmlAnalysis.cpp@ 479

Last change on this file since 479 was 475, checked in by dai_9181, 17 years ago

構成管理を変更中・・・(いったんコミット)

File size: 18.9 KB
Line 
1#include "stdafx.h"
2
3#include "common.h"
4
5extern COMPLEMENT_WINDOW_INFO ComplementWndInfo;
6
7#define ADD_TAG_PARAM(str) AddComplimentInfo(str,ACCESS_HTML_PARAM);
8
9int IsHtmlTagWord(char *str){
10 if(str[0]=='a'||str[0]=='A'){
11 if(lstrcmpi(str,"a")==0) return 1;
12 if(lstrcmpi(str,"abbr")==0) return 1;
13 if(lstrcmpi(str,"acronym")==0) return 1;
14 if(lstrcmpi(str,"address")==0) return 1;
15 if(lstrcmpi(str,"applet")==0) return 1;
16 if(lstrcmpi(str,"area")==0) return 1;
17 }
18 else if(str[0]=='b'||str[0]=='B'){
19 if(lstrcmpi(str,"b")==0) return 1;
20 if(lstrcmpi(str,"base")==0) return 1;
21 if(lstrcmpi(str,"basefont")==0) return 1;
22 if(lstrcmpi(str,"bdo")==0) return 1;
23 if(lstrcmpi(str,"bgsound")==0) return 1;
24 if(lstrcmpi(str,"big")==0) return 1;
25 if(lstrcmpi(str,"blink")==0) return 1;
26 if(lstrcmpi(str,"blockquote")==0) return 1;
27 if(lstrcmpi(str,"body")==0) return 1;
28 if(lstrcmpi(str,"br")==0) return 1;
29 if(lstrcmpi(str,"button")==0) return 1;
30 }
31 else if(str[0]=='c'||str[0]=='C'){
32 if(lstrcmpi(str,"caption")==0) return 1;
33 if(lstrcmpi(str,"center")==0) return 1;
34 if(lstrcmpi(str,"cite")==0) return 1;
35 if(lstrcmpi(str,"code")==0) return 1;
36 if(lstrcmpi(str,"col")==0) return 1;
37 if(lstrcmpi(str,"colgroup")==0) return 1;
38 if(lstrcmpi(str,"comment")==0) return 1;
39 }
40 else if(str[0]=='d'||str[0]=='D'){
41 if(lstrcmpi(str,"dd")==0) return 1;
42 if(lstrcmpi(str,"del")==0) return 1;
43 if(lstrcmpi(str,"dfn")==0) return 1;
44 if(lstrcmpi(str,"dir")==0) return 1;
45 if(lstrcmpi(str,"div")==0) return 1;
46 if(lstrcmpi(str,"dl")==0) return 1;
47 if(lstrcmpi(str,"dt")==0) return 1;
48 }
49 else if(str[0]=='e'||str[0]=='E'){
50 if(lstrcmpi(str,"em")==0) return 1;
51 if(lstrcmpi(str,"embed")==0) return 1;
52 }
53 else if(str[0]=='f'||str[0]=='F'){
54 if(lstrcmpi(str,"fieldset")==0) return 1;
55 if(lstrcmpi(str,"font")==0) return 1;
56 if(lstrcmpi(str,"form")==0) return 1;
57 if(lstrcmpi(str,"frame")==0) return 1;
58 if(lstrcmpi(str,"frameset")==0) return 1;
59 }
60 else if(str[0]=='h'||str[0]=='H'){
61 if(lstrcmpi(str,"h1")==0) return 1;
62 if(lstrcmpi(str,"h2")==0) return 1;
63 if(lstrcmpi(str,"h3")==0) return 1;
64 if(lstrcmpi(str,"h4")==0) return 1;
65 if(lstrcmpi(str,"h5")==0) return 1;
66 if(lstrcmpi(str,"h6")==0) return 1;
67 if(lstrcmpi(str,"head")==0) return 1;
68 if(lstrcmpi(str,"hr")==0) return 1;
69 if(lstrcmpi(str,"html")==0) return 1;
70 }
71 else if(str[0]=='i'||str[0]=='I'){
72 if(lstrcmpi(str,"i")==0) return 1;
73 if(lstrcmpi(str,"iframe")==0) return 1;
74 if(lstrcmpi(str,"ilayer")==0) return 1;
75 if(lstrcmpi(str,"img")==0) return 1;
76 if(lstrcmpi(str,"input")==0) return 1;
77 if(lstrcmpi(str,"ins")==0) return 1;
78 if(lstrcmpi(str,"isindex")==0) return 1;
79 }
80 else if(str[0]=='k'||str[0]=='K'){
81 if(lstrcmpi(str,"kbd")==0) return 1;
82 if(lstrcmpi(str,"keygen")==0) return 1;
83 }
84 else if(str[0]=='l'||str[0]=='L'){
85 if(lstrcmpi(str,"label")==0) return 1;
86 if(lstrcmpi(str,"layer")==0) return 1;
87 if(lstrcmpi(str,"legend")==0) return 1;
88 if(lstrcmpi(str,"li")==0) return 1;
89 if(lstrcmpi(str,"link")==0) return 1;
90 if(lstrcmpi(str,"listing")==0) return 1;
91 }
92 else if(str[0]=='m'||str[0]=='M'){
93 if(lstrcmpi(str,"map")==0) return 1;
94 if(lstrcmpi(str,"marquee")==0) return 1;
95 if(lstrcmpi(str,"menu")==0) return 1;
96 if(lstrcmpi(str,"meta")==0) return 1;
97 if(lstrcmpi(str,"multicol")==0) return 1;
98 }
99 else if(str[0]=='n'||str[0]=='N'){
100 if(lstrcmpi(str,"nobr")==0) return 1;
101 if(lstrcmpi(str,"noembed")==0) return 1;
102 if(lstrcmpi(str,"noframes")==0) return 1;
103 if(lstrcmpi(str,"nolayer")==0) return 1;
104 if(lstrcmpi(str,"noscript")==0) return 1;
105 }
106 else if(str[0]=='o'||str[0]=='O'){
107 if(lstrcmpi(str,"object")==0) return 1;
108 if(lstrcmpi(str,"ol")==0) return 1;
109 if(lstrcmpi(str,"optgroup")==0) return 1;
110 if(lstrcmpi(str,"option")==0) return 1;
111 }
112 else if(str[0]=='p'||str[0]=='P'){
113 if(lstrcmpi(str,"p")==0) return 1;
114 if(lstrcmpi(str,"param")==0) return 1;
115 if(lstrcmpi(str,"plaintext")==0) return 1;
116 if(lstrcmpi(str,"pre")==0) return 1;
117 }
118 else if(str[0]=='q'||str[0]=='Q'){
119 if(lstrcmpi(str,"q")==0) return 1;
120 }
121 else if(str[0]=='r'||str[0]=='R'){
122 if(lstrcmpi(str,"rb")==0) return 1;
123 if(lstrcmpi(str,"rp")==0) return 1;
124 if(lstrcmpi(str,"rt")==0) return 1;
125 if(lstrcmpi(str,"ruby")==0) return 1;
126 }
127 else if(str[0]=='s'||str[0]=='S'){
128 if(lstrcmpi(str,"s")==0) return 1;
129 if(lstrcmpi(str,"samp")==0) return 1;
130 if(lstrcmpi(str,"script")==0) return 1;
131 if(lstrcmpi(str,"select")==0) return 1;
132 if(lstrcmpi(str,"server")==0) return 1;
133 if(lstrcmpi(str,"small")==0) return 1;
134 if(lstrcmpi(str,"span")==0) return 1;
135 if(lstrcmpi(str,"strike")==0) return 1;
136 if(lstrcmpi(str,"strong")==0) return 1;
137 if(lstrcmpi(str,"style")==0) return 1;
138 if(lstrcmpi(str,"sub")==0) return 1;
139 if(lstrcmpi(str,"sup")==0) return 1;
140 }
141 else if(str[0]=='t'||str[0]=='T'){
142 if(lstrcmpi(str,"table")==0) return 1;
143 if(lstrcmpi(str,"tbody")==0) return 1;
144 if(lstrcmpi(str,"td")==0) return 1;
145 if(lstrcmpi(str,"textarea")==0) return 1;
146 if(lstrcmpi(str,"tfoot")==0) return 1;
147 if(lstrcmpi(str,"th")==0) return 1;
148 if(lstrcmpi(str,"thead")==0) return 1;
149 if(lstrcmpi(str,"title")==0) return 1;
150 if(lstrcmpi(str,"tr")==0) return 1;
151 if(lstrcmpi(str,"tt")==0) return 1;
152 }
153 else if(str[0]=='u'||str[0]=='U'){
154 if(lstrcmpi(str,"u")==0) return 1;
155 if(lstrcmpi(str,"ul")==0) return 1;
156 }
157 else if(str[0]=='v'||str[0]=='V'){
158 if(lstrcmpi(str,"var")==0) return 1;
159 }
160 else if(str[0]=='w'||str[0]=='W'){
161 if(lstrcmpi(str,"wbr")==0) return 1;
162 }
163 else if(str[0]=='x'||str[0]=='X'){
164 if(lstrcmpi(str,"xmp")==0) return 1;
165 }
166
167
168 return 0;
169}
170int IsHtmlReservedWord(char *str){
171 return IsHtmlTagWord(str);
172}
173
174void AddComplimentInfo(char *str,DWORD dwAccess){
175 ComplementWndInfo.pMemberInfo=(MEMBERINFO *)HeapReAlloc(hHeap,0,
176 ComplementWndInfo.pMemberInfo,
177 (ComplementWndInfo.MemberNum+1)*sizeof(MEMBERINFO));
178
179 ComplementWndInfo.pMemberInfo[ComplementWndInfo.MemberNum].pName=
180 (char *)HeapAlloc(hHeap,0,lstrlen(str)+1);
181 lstrcpy(
182 ComplementWndInfo.pMemberInfo[ComplementWndInfo.MemberNum].pName,
183 str);
184
185 ComplementWndInfo.pMemberInfo[ComplementWndInfo.MemberNum].dwProc=0;
186
187 ComplementWndInfo.pMemberInfo[ComplementWndInfo.MemberNum].dwAccess=dwAccess;
188
189 ComplementWndInfo.MemberNum++;
190}
191
192BOOL GetNowTagInfo(char *buffer,int p){
193 int i,i2,i3;
194 for(i=p;i>0;i--){
195 if(buffer[i]=='\r'&&buffer[i+1]=='\n') break;
196 }
197
198 int IsStr=0;
199 char szTag[1024];
200 szTag[0]=0;
201 for(;i<p;i++){
202 if(buffer[i]=='\0') break;
203 if(buffer[i]=='<'){
204 IsStr=0;
205
206 i2=i+1;
207 while(buffer[i2]==' '||buffer[i2]=='\t') i2++;
208
209 if(IsAlphabet(buffer[i2])){
210 for(i3=0;;i2++,i3++){
211 if(!IsAlphabet(buffer[i2])){
212 szTag[i3]=0;
213 break;
214 }
215 szTag[i3]=buffer[i2];
216 }
217 }
218 else szTag[0]=0;
219 }
220 if(buffer[i]=='>'&&IsStr==0){
221 szTag[0]=0;
222 }
223
224 if(buffer[i]=='\"'&&szTag[0]){
225 //タグ内のダブルクォート
226 IsStr^=1;
227 }
228 }
229
230 if(IsStr){
231 //文字列内では補完しない
232 return 0;
233 }
234
235 if(!IsHtmlTagWord(szTag)){
236 //未登録のタグはサポートしない
237 return 0;
238 }
239
240 ComplementWndInfo.pMemberInfo=(MEMBERINFO *)HeapAlloc(hHeap,0,1);
241 ComplementWndInfo.MemberNum=0;
242
243 BOOL bUseGeneralParam=1;
244 if(lstrcmpi(szTag,"a")==0){
245 ADD_TAG_PARAM("href");
246 ADD_TAG_PARAM("name");
247 ADD_TAG_PARAM("target");
248 }
249 else if(lstrcmpi(szTag,"applet")==0){
250 ADD_TAG_PARAM("alt");
251 ADD_TAG_PARAM("archive");
252 ADD_TAG_PARAM("code");
253 ADD_TAG_PARAM("codebase");
254 ADD_TAG_PARAM("mayscript");
255 ADD_TAG_PARAM("object");
256 ADD_TAG_PARAM("src");
257 ADD_TAG_PARAM("align");
258 ADD_TAG_PARAM("height");
259 ADD_TAG_PARAM("hspace");
260 ADD_TAG_PARAM("vspace");
261 ADD_TAG_PARAM("width");
262 }
263 else if(lstrcmpi(szTag,"area")==0){
264 ADD_TAG_PARAM("shape");
265 ADD_TAG_PARAM("coords");
266 ADD_TAG_PARAM("href");
267 ADD_TAG_PARAM("alt");
268 ADD_TAG_PARAM("accesskey");
269 ADD_TAG_PARAM("nohref");
270 ADD_TAG_PARAM("hreflang");
271 ADD_TAG_PARAM("methods");
272 ADD_TAG_PARAM("rel");
273 ADD_TAG_PARAM("rev");
274 ADD_TAG_PARAM("tabindex");
275 ADD_TAG_PARAM("target");
276 }
277 else if(lstrcmpi(szTag,"base")==0){
278 ADD_TAG_PARAM("href");
279 ADD_TAG_PARAM("target");
280
281 bUseGeneralParam=0;
282 }
283 else if(lstrcmpi(szTag,"basefont")==0){
284 ADD_TAG_PARAM("size");
285 ADD_TAG_PARAM("color");
286 ADD_TAG_PARAM("face");
287 }
288 else if(lstrcmpi(szTag,"bgsound")==0){
289 ADD_TAG_PARAM("balance");
290 ADD_TAG_PARAM("loop");
291 ADD_TAG_PARAM("src");
292 ADD_TAG_PARAM("volume");
293 }
294 else if(lstrcmpi(szTag,"blockquote")==0){
295 ADD_TAG_PARAM("cite");
296 }
297 else if(lstrcmpi(szTag,"body")==0){
298 ADD_TAG_PARAM("text");
299 ADD_TAG_PARAM("link");
300 ADD_TAG_PARAM("vlink");
301 ADD_TAG_PARAM("alink");
302 ADD_TAG_PARAM("bgcolor");
303 ADD_TAG_PARAM("background");
304 ADD_TAG_PARAM("bgproperties");
305 ADD_TAG_PARAM("marginheight");
306 ADD_TAG_PARAM("marginwidth");
307 ADD_TAG_PARAM("topmargin");
308 ADD_TAG_PARAM("leftmargin");
309 ADD_TAG_PARAM("bottommargin");
310 ADD_TAG_PARAM("rightmargin");
311 ADD_TAG_PARAM("scroll");
312 }
313 else if(lstrcmpi(szTag,"br")==0){
314 ADD_TAG_PARAM("/");
315 ADD_TAG_PARAM("clear");
316 }
317 else if(lstrcmpi(szTag,"button")==0){
318 ADD_TAG_PARAM("accesskey");
319 ADD_TAG_PARAM("disabled");
320 ADD_TAG_PARAM("tabindex");
321 ADD_TAG_PARAM("type");
322 ADD_TAG_PARAM("value");
323 }
324 else if(lstrcmpi(szTag,"caption")==0){
325 ADD_TAG_PARAM("align");
326 ADD_TAG_PARAM("valign");
327 }
328 else if(lstrcmpi(szTag,"col")==0){
329 ADD_TAG_PARAM("align");
330 ADD_TAG_PARAM("bgcolor");
331 ADD_TAG_PARAM("char");
332 ADD_TAG_PARAM("charoff");
333 ADD_TAG_PARAM("span");
334 ADD_TAG_PARAM("valign");
335 ADD_TAG_PARAM("width");
336 }
337 else if(lstrcmpi(szTag,"colgroup")==0){
338 ADD_TAG_PARAM("align");
339 ADD_TAG_PARAM("bgcolor");
340 ADD_TAG_PARAM("char");
341 ADD_TAG_PARAM("charoff");
342 ADD_TAG_PARAM("span");
343 ADD_TAG_PARAM("valign");
344 ADD_TAG_PARAM("width");
345 }
346 else if(lstrcmpi(szTag,"del")==0){
347 ADD_TAG_PARAM("cite");
348 ADD_TAG_PARAM("datetime");
349 }
350 else if(lstrcmpi(szTag,"div")==0){
351 ADD_TAG_PARAM("align");
352 }
353 else if(lstrcmpi(szTag,"dl")==0){
354 ADD_TAG_PARAM("compact");
355 }
356 else if(lstrcmpi(szTag,"embed")==0){
357 ADD_TAG_PARAM("src");
358 ADD_TAG_PARAM("align");
359 ADD_TAG_PARAM("height");
360 ADD_TAG_PARAM("width");
361 ADD_TAG_PARAM("hspace");
362 ADD_TAG_PARAM("vspace");
363 ADD_TAG_PARAM("compact");
364 ADD_TAG_PARAM("units");
365 ADD_TAG_PARAM("border");
366 ADD_TAG_PARAM("frameborder");
367 ADD_TAG_PARAM("hidden");
368 ADD_TAG_PARAM("alt");
369 ADD_TAG_PARAM("code");
370 ADD_TAG_PARAM("codebase");
371 ADD_TAG_PARAM("type");
372 ADD_TAG_PARAM("palette");
373 ADD_TAG_PARAM("pluginspage");
374 ADD_TAG_PARAM("pluginurl");
375 ADD_TAG_PARAM("autostart");
376 ADD_TAG_PARAM("autoplay");
377 ADD_TAG_PARAM("control");
378 ADD_TAG_PARAM("loop");
379 ADD_TAG_PARAM("repeat");
380 ADD_TAG_PARAM("textfocus");
381 }
382 else if(lstrcmpi(szTag,"fieldset")==0){
383 ADD_TAG_PARAM("align");
384 }
385 else if(lstrcmpi(szTag,"font")==0){
386 ADD_TAG_PARAM("size");
387 ADD_TAG_PARAM("color");
388 ADD_TAG_PARAM("face");
389 }
390 else if(lstrcmpi(szTag,"form")==0){
391 ADD_TAG_PARAM("action");
392 ADD_TAG_PARAM("method");
393 ADD_TAG_PARAM("target");
394 ADD_TAG_PARAM("accept");
395 ADD_TAG_PARAM("accept-charset");
396 ADD_TAG_PARAM("autocomplete");
397 ADD_TAG_PARAM("enctype");
398 ADD_TAG_PARAM("urn");
399 }
400 else if(lstrcmpi(szTag,"frame")==0){
401 ADD_TAG_PARAM("src");
402 ADD_TAG_PARAM("height");
403 ADD_TAG_PARAM("width");
404 ADD_TAG_PARAM("bordercolor");
405 ADD_TAG_PARAM("frameborder");
406 ADD_TAG_PARAM("marginheight");
407 ADD_TAG_PARAM("marginwidth");
408 ADD_TAG_PARAM("noresize");
409 ADD_TAG_PARAM("longdesc");
410 ADD_TAG_PARAM("scrolling");
411 ADD_TAG_PARAM("allowtransparency");
412 }
413 else if(lstrcmpi(szTag,"frameset")==0){
414 ADD_TAG_PARAM("border");
415 ADD_TAG_PARAM("bordercolor");
416 ADD_TAG_PARAM("cols");
417 ADD_TAG_PARAM("frameborder");
418 ADD_TAG_PARAM("framespacing");
419 ADD_TAG_PARAM("rows");
420 }
421 else if(lstrcmpi(szTag,"h1")==0||
422 lstrcmpi(szTag,"h2")==0||
423 lstrcmpi(szTag,"h3")==0||
424 lstrcmpi(szTag,"h4")==0||
425 lstrcmpi(szTag,"h5")==0||
426 lstrcmpi(szTag,"h6")==0){
427 ADD_TAG_PARAM("align");
428 }
429 else if(lstrcmpi(szTag,"hr")==0){
430 ADD_TAG_PARAM("/");
431 ADD_TAG_PARAM("align");
432 ADD_TAG_PARAM("color");
433 ADD_TAG_PARAM("noshade");
434 ADD_TAG_PARAM("size");
435 ADD_TAG_PARAM("width");
436 }
437 else if(lstrcmpi(szTag,"iframe")==0){
438 ADD_TAG_PARAM("src");
439 ADD_TAG_PARAM("align");
440 ADD_TAG_PARAM("height");
441 ADD_TAG_PARAM("width");
442 ADD_TAG_PARAM("hspace");
443 ADD_TAG_PARAM("vspace");
444 ADD_TAG_PARAM("marginheight");
445 ADD_TAG_PARAM("marginwidth");
446 ADD_TAG_PARAM("border");
447 ADD_TAG_PARAM("bordercolor");
448 ADD_TAG_PARAM("frameborder");
449 ADD_TAG_PARAM("framespacing");
450 ADD_TAG_PARAM("longdesc");
451 ADD_TAG_PARAM("scrolling");
452 }
453 else if(lstrcmpi(szTag,"img")==0){
454 ADD_TAG_PARAM("src");
455 ADD_TAG_PARAM("alt");
456 ADD_TAG_PARAM("height");
457 ADD_TAG_PARAM("width");
458 ADD_TAG_PARAM("align");
459 ADD_TAG_PARAM("border");
460 ADD_TAG_PARAM("galleryimg");
461 ADD_TAG_PARAM("hspace");
462 ADD_TAG_PARAM("longdesc");
463 ADD_TAG_PARAM("lowsrc");
464 ADD_TAG_PARAM("suppress");
465 ADD_TAG_PARAM("vspace");
466 ADD_TAG_PARAM("ismap");
467 ADD_TAG_PARAM("usemap");
468 ADD_TAG_PARAM("controls");
469 ADD_TAG_PARAM("dynsrc");
470 ADD_TAG_PARAM("loop");
471 ADD_TAG_PARAM("start");
472 }
473 else if(lstrcmpi(szTag,"input")==0){
474 ADD_TAG_PARAM("accesskey");
475 ADD_TAG_PARAM("disabled");
476 ADD_TAG_PARAM("tabindex");
477 ADD_TAG_PARAM("type");
478 ADD_TAG_PARAM("autocomplete");
479 ADD_TAG_PARAM("istyle");
480 ADD_TAG_PARAM("maxlength");
481 ADD_TAG_PARAM("readonly");
482 ADD_TAG_PARAM("value");
483 ADD_TAG_PARAM("accept");
484 ADD_TAG_PARAM("checked");
485 ADD_TAG_PARAM("align");
486 ADD_TAG_PARAM("alt");
487 ADD_TAG_PARAM("border");
488 ADD_TAG_PARAM("dynsrc");
489 ADD_TAG_PARAM("height");
490 ADD_TAG_PARAM("ismap");
491 ADD_TAG_PARAM("lowsrc");
492 ADD_TAG_PARAM("src");
493 ADD_TAG_PARAM("width");
494 }
495 else if(lstrcmpi(szTag,"ins")==0){
496 ADD_TAG_PARAM("cite");
497 ADD_TAG_PARAM("datetime");
498 }
499 else if(lstrcmpi(szTag,"label")==0){
500 ADD_TAG_PARAM("accesskey");
501 ADD_TAG_PARAM("for");
502 }
503 else if(lstrcmpi(szTag,"legend")==0){
504 ADD_TAG_PARAM("accesskey");
505 ADD_TAG_PARAM("align");
506 }
507 else if(lstrcmpi(szTag,"li")==0){
508 ADD_TAG_PARAM("type");
509 ADD_TAG_PARAM("value");
510 }
511 else if(lstrcmpi(szTag,"link")==0){
512 ADD_TAG_PARAM("rel");
513 ADD_TAG_PARAM("href");
514 ADD_TAG_PARAM("src");
515 ADD_TAG_PARAM("charset");
516 ADD_TAG_PARAM("media");
517 ADD_TAG_PARAM("type");
518 }
519 else if(lstrcmpi(szTag,"marquee")==0){
520 ADD_TAG_PARAM("behavior");
521 ADD_TAG_PARAM("bgcolor");
522 ADD_TAG_PARAM("direction");
523 ADD_TAG_PARAM("height");
524 ADD_TAG_PARAM("hspace");
525 ADD_TAG_PARAM("loop");
526 ADD_TAG_PARAM("scrollamount");
527 ADD_TAG_PARAM("scrolldelay");
528 ADD_TAG_PARAM("truespeed");
529 ADD_TAG_PARAM("vspace");
530 ADD_TAG_PARAM("width");
531 }
532 else if(lstrcmpi(szTag,"meta")==0){
533 ADD_TAG_PARAM("name");
534 ADD_TAG_PARAM("http-equiv");
535 ADD_TAG_PARAM("content");
536 }
537 else if(lstrcmpi(szTag,"object")==0){
538 ADD_TAG_PARAM("alt");
539 ADD_TAG_PARAM("archive");
540 ADD_TAG_PARAM("border");
541 ADD_TAG_PARAM("classid");
542 ADD_TAG_PARAM("code");
543 ADD_TAG_PARAM("codebase");
544 ADD_TAG_PARAM("codetype");
545 ADD_TAG_PARAM("data");
546 ADD_TAG_PARAM("declare");
547 ADD_TAG_PARAM("name");
548 ADD_TAG_PARAM("standby");
549 ADD_TAG_PARAM("tabindex");
550 ADD_TAG_PARAM("type");
551 ADD_TAG_PARAM("usemap");
552 ADD_TAG_PARAM("align");
553 ADD_TAG_PARAM("width");
554 ADD_TAG_PARAM("height");
555 ADD_TAG_PARAM("hspace");
556 ADD_TAG_PARAM("vspace");
557 }
558 else if(lstrcmpi(szTag,"ol")==0){
559 ADD_TAG_PARAM("compact");
560 ADD_TAG_PARAM("start");
561 ADD_TAG_PARAM("type");
562 }
563 else if(lstrcmpi(szTag,"option")==0){
564 ADD_TAG_PARAM("disabled");
565 ADD_TAG_PARAM("label");
566 ADD_TAG_PARAM("selected");
567 ADD_TAG_PARAM("value");
568 }
569 else if(lstrcmpi(szTag,"p")==0){
570 ADD_TAG_PARAM("align");
571 }
572 else if(lstrcmpi(szTag,"param")==0){
573 ADD_TAG_PARAM("name");
574 ADD_TAG_PARAM("value");
575 ADD_TAG_PARAM("valuetype");
576 ADD_TAG_PARAM("type");
577 }
578 else if(lstrcmpi(szTag,"pre")==0){
579 ADD_TAG_PARAM("cols");
580 ADD_TAG_PARAM("width");
581 ADD_TAG_PARAM("wrap");
582 }
583 else if(lstrcmpi(szTag,"script")==0){
584 ADD_TAG_PARAM("charset");
585 ADD_TAG_PARAM("defer");
586 ADD_TAG_PARAM("event");
587 ADD_TAG_PARAM("for");
588 ADD_TAG_PARAM("src");
589 ADD_TAG_PARAM("type");
590 }
591 else if(lstrcmpi(szTag,"select")==0){
592 ADD_TAG_PARAM("accesskey");
593 ADD_TAG_PARAM("align");
594 ADD_TAG_PARAM("disabled");
595 ADD_TAG_PARAM("multiple");
596 ADD_TAG_PARAM("size");
597 ADD_TAG_PARAM("tabindex");
598 }
599 else if(lstrcmpi(szTag,"style")==0){
600 ADD_TAG_PARAM("disabled");
601 ADD_TAG_PARAM("media");
602 ADD_TAG_PARAM("type");
603 }
604 else if(lstrcmpi(szTag,"table")==0){
605 ADD_TAG_PARAM("border");
606 ADD_TAG_PARAM("bordercolor");
607 ADD_TAG_PARAM("bordercolordark");
608 ADD_TAG_PARAM("bordercolorlight");
609 ADD_TAG_PARAM("frame");
610 ADD_TAG_PARAM("rules");
611 ADD_TAG_PARAM("background");
612 ADD_TAG_PARAM("bgcolor");
613 ADD_TAG_PARAM("align");
614 ADD_TAG_PARAM("cellpadding");
615 ADD_TAG_PARAM("cellspacing");
616 ADD_TAG_PARAM("height");
617 ADD_TAG_PARAM("hspace");
618 ADD_TAG_PARAM("vspace");
619 ADD_TAG_PARAM("width");
620 ADD_TAG_PARAM("cols");
621 ADD_TAG_PARAM("summary");
622 }
623 else if(lstrcmpi(szTag,"tbody")==0||
624 lstrcmpi(szTag,"tfoot")==0||
625 lstrcmpi(szTag,"thead")==0){
626 ADD_TAG_PARAM("align");
627 ADD_TAG_PARAM("bgcolor");
628 ADD_TAG_PARAM("char");
629 ADD_TAG_PARAM("charoff");
630 ADD_TAG_PARAM("valign");
631 }
632 else if(lstrcmpi(szTag,"td")==0||
633 lstrcmpi(szTag,"th")==0){
634 ADD_TAG_PARAM("bordercolor");
635 ADD_TAG_PARAM("bordercolordark");
636 ADD_TAG_PARAM("bordercolorlight");
637 ADD_TAG_PARAM("background");
638 ADD_TAG_PARAM("bgcolor");
639 ADD_TAG_PARAM("align");
640 ADD_TAG_PARAM("valign");
641 ADD_TAG_PARAM("height");
642 ADD_TAG_PARAM("width");
643 ADD_TAG_PARAM("nowrap");
644 ADD_TAG_PARAM("char");
645 ADD_TAG_PARAM("charoff");
646 ADD_TAG_PARAM("colspan");
647 ADD_TAG_PARAM("rowspan");
648 ADD_TAG_PARAM("abbr");
649 ADD_TAG_PARAM("axis");
650 ADD_TAG_PARAM("headers");
651 ADD_TAG_PARAM("scope");
652 }
653 else if(lstrcmpi(szTag,"textarea")==0){
654 ADD_TAG_PARAM("accesskey");
655 ADD_TAG_PARAM("align");
656 ADD_TAG_PARAM("cols");
657 ADD_TAG_PARAM("istyle");
658 ADD_TAG_PARAM("readonly");
659 ADD_TAG_PARAM("rows");
660 ADD_TAG_PARAM("wrap");
661 ADD_TAG_PARAM("tabindex");
662 }
663 else if(lstrcmpi(szTag,"title")==0){
664 bUseGeneralParam=0;
665 }
666 else if(lstrcmpi(szTag,"tr")==0){
667 ADD_TAG_PARAM("bordercolor");
668 ADD_TAG_PARAM("bordercolordark");
669 ADD_TAG_PARAM("bordercolorlight");
670 ADD_TAG_PARAM("bgcolor");
671 ADD_TAG_PARAM("align");
672 ADD_TAG_PARAM("char");
673 ADD_TAG_PARAM("charoff");
674 ADD_TAG_PARAM("height");
675 ADD_TAG_PARAM("valign");
676 }
677 else if(lstrcmpi(szTag,"ul")==0){
678 ADD_TAG_PARAM("compact");
679 ADD_TAG_PARAM("type");
680 }
681
682
683
684
685 if(bUseGeneralParam){
686 //一般属性
687 AddComplimentInfo("class",ACCESS_HTML_GENERAL_PARAM);
688 AddComplimentInfo("id",ACCESS_HTML_GENERAL_PARAM);
689 AddComplimentInfo("style",ACCESS_HTML_GENERAL_PARAM);
690 }
691
692 return 1;
693}
Note: See TracBrowser for help on using the repository browser.