ILIAS  Release_4_1_x_branch Revision 61804
 All Data Structures Namespaces Files Functions Variables Groups Pages
HFile_html.php
Go to the documentation of this file.
1 <?php
2 $BEAUT_PATH = realpath(".")."/Services/COPage/syntax_highlight/php";
3 if (!isset ($BEAUT_PATH)) return;
4 require_once("$BEAUT_PATH/Beautifier/HFile.php");
5  class HFile_html extends HFile{
6  function HFile_html(){
7  $this->HFile();
8 /*************************************/
9 // Beautifier Highlighting Configuration File
10 // HTML
11 /*************************************/
12 // Flags
13 
14 $this->nocase = "1";
15 $this->notrim = "0";
16 $this->perl = "0";
17 
18 // Colours
19 
20 $this->colours = array("blue", "purple");
21 $this->quotecolour = "blue";
22 $this->blockcommentcolour = "green";
23 $this->linecommentcolour = "green";
24 
25 // Indent Strings
26 
27 $this->indent = array();
28 $this->unindent = array();
29 
30 // String characters and delimiters
31 
32 $this->stringchars = array("\"", "'");
33 $this->delimiters = array("~", "@", "$", "%", "^", "&", "*", "(", ")", "+", "=", "|", "\\", "{", "}", "[", "]", ":", ";", "\"", "'", "<", ">", " ", ",", " ", ".", "?");
34 $this->escchar = "";
35 
36 // Comment settings
37 
38 $this->linecommenton = array("");
39 $this->blockcommenton = array("<!--");
40 $this->blockcommentoff = array("-->");
41 
42 // Keywords (keyword mapping to colour number)
43 
44 $this->keywords = array(
45  "<A>" => "1",
46  "</A>" => "1",
47  "<ABBR>" => "1",
48  "</ABBR>" => "1",
49  "<ABOVE>" => "1",
50  "<ACRONYM>" => "1",
51  "</ACRONYM>" => "1",
52  "<ADDRESS>" => "1",
53  "</ADDRESS>" => "1",
54  "<APPLET>" => "1",
55  "</APPLET>" => "1",
56  "<AREA>" => "1",
57  "<ARRAY>" => "1",
58  "<B>" => "1",
59  "</B>" => "1",
60  "<BASE>" => "1",
61  "<BASEFONT>" => "1",
62  "<BDO>" => "1",
63  "</BDO>" => "1",
64  "<BGSOUND>" => "1",
65  "<BIG>" => "1",
66  "</BIG>" => "1",
67  "<BLINK>" => "1",
68  "</BLINK>" => "1",
69  "<BLOCKQUOTE>" => "1",
70  "</BLOCKQUOTE>" => "1",
71  "<BODY>" => "1",
72  "</BODY>" => "1",
73  "<BOX>" => "1",
74  "<BR>" => "1",
75  "<BUTTON>" => "1",
76  "</BUTTON>" => "1",
77  "<CAPTION>" => "1",
78  "</CAPTION>" => "1",
79  "<CENTER>" => "1",
80  "</CENTER>" => "1",
81  "<CITE>" => "1",
82  "</CITE>" => "1",
83  "<CODE>" => "1",
84  "</CODE>" => "1",
85  "<COL>" => "1",
86  "<COLGROUP>" => "1",
87  "</COLGROUP>" => "1",
88  "<COMMENT>" => "1",
89  "</COMMENT>" => "1",
90  "<DD>" => "1",
91  "</DD>" => "1",
92  "<DEL>" => "1",
93  "</DEL>" => "1",
94  "<DFN>" => "1",
95  "</DFN>" => "1",
96  "<DIR>" => "1",
97  "</DIR>" => "1",
98  "<DIV>" => "1",
99  "</DIV>" => "1",
100  "<DL>" => "1",
101  "</DL>" => "1",
102  "<DT>" => "1",
103  "</DT>" => "1",
104  "<EM>" => "1",
105  "</EM>" => "1",
106  "<EMBED>" => "1",
107  "<FIELDSET>" => "1",
108  "</FIELDSET>" => "1",
109  "<FIG>" => "1",
110  "<FONT>" => "1",
111  "</FONT>" => "1",
112  "<FORM>" => "1",
113  "</FORM>" => "1",
114  "<FRAME>" => "1",
115  "<FRAMESET>" => "1",
116  "</FRAMESET>" => "1",
117  "<H1>" => "1",
118  "</H1>" => "1",
119  "<H2>" => "1",
120  "</H2>" => "1",
121  "<H3>" => "1",
122  "</H3>" => "1",
123  "<H4>" => "1",
124  "</H4>" => "1",
125  "<H5>" => "1",
126  "</H5>" => "1",
127  "<H6>" => "1",
128  "</H6>" => "1",
129  "<HEAD>" => "1",
130  "</HEAD>" => "1",
131  "<HR>" => "1",
132  "<HTML>" => "1",
133  "</HTML>" => "1",
134  "<I>" => "1",
135  "</I>" => "1",
136  "<IFRAME>" => "1",
137  "</IFRAME>" => "1",
138  "<ILAYER>" => "1",
139  "</ILAYER>" => "1",
140  "<IMG>" => "1",
141  "<INPUT>" => "1",
142  "<INS>" => "1",
143  "</INS>" => "1",
144  "<ISINDEX>" => "1",
145  "<KBD>" => "1",
146  "</KBD>" => "1",
147  "<LABEL>" => "1",
148  "</LABEL>" => "1",
149  "<LAYER>" => "1",
150  "<LEGEND>" => "1",
151  "</LEGEND>" => "1",
152  "<LI>" => "1",
153  "</LI>" => "1",
154  "<LINK>" => "1",
155  "<LISTING>" => "1",
156  "</LISTING>" => "1",
157  "<MAP>" => "1",
158  "</MAP>" => "1",
159  "<MARQUEE>" => "1",
160  "</MARQUEE>" => "1",
161  "<MENU>" => "1",
162  "</MENU>" => "1",
163  "<META>" => "1",
164  "<MULTICOL>" => "1",
165  "</MULTICOL>" => "1",
166  "<NEXTID>" => "1",
167  "<NOFRAMES>" => "1",
168  "</NOFRAMES>" => "1",
169  "<NOLAYER>" => "1",
170  "</NOLAYER>" => "1",
171  "<NOSCRIPT>" => "1",
172  "</NOSCRIPT>" => "1",
173  "<NOTE>" => "1",
174  "</NOTE>" => "1",
175  "<OBJECT>" => "1",
176  "</OBJECT>" => "1",
177  "<OL>" => "1",
178  "</OL>" => "1",
179  "<OPTGROUP>" => "1",
180  "</OPTGROUP>" => "1",
181  "<OPTION>" => "1",
182  "<P>" => "1",
183  "</P>" => "1",
184  "<PARAM>" => "1",
185  "<PRE>" => "1",
186  "</PRE>" => "1",
187  "<Q>" => "1",
188  "</Q>" => "1",
189  "<QUOTE>" => "1",
190  "<RANGE>" => "1",
191  "<ROOT>" => "1",
192  "<S>" => "1",
193  "</S>" => "1",
194  "<SAMP>" => "1",
195  "</SAMP>" => "1",
196  "<SCRIPT>" => "1",
197  "</SCRIPT>" => "1",
198  "<SELECT>" => "1",
199  "</SELECT>" => "1",
200  "<SMALL>" => "1",
201  "</SMALL>" => "1",
202  "<SOUND>" => "1",
203  "<SPACER>" => "1",
204  "<SPAN>" => "1",
205  "</SPAN>" => "1",
206  "<SQRT>" => "1",
207  "<STRIKE>" => "1",
208  "</STRIKE>" => "1",
209  "<STRONG>" => "1",
210  "</STRONG>" => "1",
211  "<STYLE>" => "1",
212  "<STYLE>" => "1",
213  "</STYLE>" => "1",
214  "<SUB>" => "1",
215  "</SUB>" => "1",
216  "<SUP>" => "1",
217  "</SUP>" => "1",
218  "<TABLE>" => "1",
219  "</TABLE>" => "1",
220  "<TBODY>" => "1",
221  "</TBODY>" => "1",
222  "<TD>" => "1",
223  "</TD>" => "1",
224  "<TEXT>" => "1",
225  "<TEXTAREA>" => "1",
226  "</TEXTAREA>" => "1",
227  "<TFOOT>" => "1",
228  "</TFOOT>" => "1",
229  "<TH>" => "1",
230  "</TH>" => "1",
231  "<THEAD>" => "1",
232  "</THEAD>" => "1",
233  "<TITLE>" => "1",
234  "</TITLE>" => "1",
235  "<TR>" => "1",
236  "</TR>" => "1",
237  "<TT>" => "1",
238  "</TT>" => "1",
239  "<TT>" => "1",
240  "<U>" => "1",
241  "</U>" => "1",
242  "<UL>" => "1",
243  "</UL>" => "1",
244  "<VAR>" => "1",
245  "</VAR>" => "1",
246  "<WBR>" => "1",
247  "<XMP>" => "1",
248  "</XMP>" => "1",
249  "<ABBR>" => "2",
250  "<ACCEPT-CHARSET>" => "2",
251  "<ACCEPT>" => "2",
252  "<ACCESSKEY>" => "2",
253  "<ACTION>" => "2",
254  "<ALIGN>" => "2",
255  "<ALINK>" => "2",
256  "<ALT>" => "2",
257  "<ARCHIVE>" => "2",
258  "<AXIS>" => "2",
259  "<BACKGROUND>" => "2",
260  "<BEHAVIOR>" => "2",
261  "<BELOW>" => "2",
262  "<BGCOLOR>" => "2",
263  "<BORDER>" => "2",
264  "<CELLPADDING>" => "2",
265  "<CELLSPACING>" => "2",
266  "<CHAR>" => "2",
267  "<CHAROFF>" => "2",
268  "<CHARSET>" => "2",
269  "<CHECKED>" => "2",
270  "<CITE>" => "2",
271  "<CLASS>" => "2",
272  "<CLASSID>" => "2",
273  "<CLEAR>" => "2",
274  "<CODE>" => "2",
275  "<CODEBASE>" => "2",
276  "<CODETYPE>" => "2",
277  "<COLOR>" => "2",
278  "<COLS>" => "2",
279  "<COLSPAN>" => "2",
280  "<COMPACT>" => "2",
281  "<CONTENT>" => "2",
282  "<COORDS>" => "2",
283  "<DATA>" => "2",
284  "<DATETIME>" => "2",
285  "<DECLARE>" => "2",
286  "<DEFER>" => "2",
287  "<DIR>" => "2",
288  "<DISABLED>" => "2",
289  "<ENCTYPE>" => "2",
290  "<FACE>" => "2",
291  "<FOR>" => "2",
292  "<FRAME>" => "2",
293  "<FRAMEBORDER>" => "2",
294  "<FRAMESPACING>" => "2",
295  "<HEADERS>" => "2",
296  "<HEIGHT>" => "2",
297  "<HIDDEN>" => "2",
298  "<HREF>" => "2",
299  "<HREFLANG>" => "2",
300  "<HSPACE>" => "2",
301  "<HTTP-EQUIV>" => "2",
302  "<ID>" => "2",
303  "<ISMAP>" => "2",
304  "<LABEL>" => "2",
305  "<LANG>" => "2",
306  "<LANGUAGE>" => "2",
307  "<LINK>" => "2",
308  "<LOOP>" => "2",
309  "<LONGDESC>" => "2",
310  "<MAILTO>" => "2",
311  "<MARGINHEIGHT>" => "2",
312  "<MARGINWIDTH>" => "2",
313  "<MAXLENGTH>" => "2",
314  "<MEDIA>" => "2",
315  "<METHOD>" => "2",
316  "<MULTIPLE>" => "2",
317  "<NAME>" => "2",
318  "<NOHREF>" => "2",
319  "<NORESIZE>" => "2",
320  "<NOSHADE>" => "2",
321  "<OBJECT>" => "2",
322  "<ONBLUR>" => "2",
323  "<ONCHANGE>" => "2",
324  "<ONFOCUS>" => "2",
325  "<ONKEYDOWN>" => "2",
326  "<ONKEYPRESS>" => "2",
327  "<ONKEYUP>" => "2",
328  "<ONLOAD>" => "2",
329  "<ONRESET>" => "2",
330  "<ONSELECT>" => "2",
331  "<ONSUBMIT>" => "2",
332  "<ONUNLOAD>" => "2",
333  "<ONCLICK>" => "2",
334  "<ONDBLCLICK>" => "2",
335  "<ONMOUSEDOWN>" => "2",
336  "<ONMOUSEMOVE>" => "2",
337  "<ONMOUSEOUT>" => "2",
338  "<ONMOUSEOVER>" => "2",
339  "<ONMOUSEUP>" => "2",
340  "<PROFILE>" => "2",
341  "<PROMPT>" => "2",
342  "<READONLY>" => "2",
343  "<REL>" => "2",
344  "<REV>" => "2",
345  "<ROWS>" => "2",
346  "<ROWSPAN>" => "2",
347  "<RULES>" => "2",
348  "<SCHEME>" => "2",
349  "<SCOPE>" => "2",
350  "<SCROLLING>" => "2",
351  "<SELECTED>" => "2",
352  "<SHAPE>" => "2",
353  "<SIZE>" => "2",
354  "<SPAN>" => "2",
355  "<SRC>" => "2",
356  "<STANDBY>" => "2",
357  "<START>" => "2",
358  "<STYLE>" => "2",
359  "<SUMMARY>" => "2",
360  "<TABINDEX>" => "2",
361  "<TARGET>" => "2",
362  "<TEXT>" => "2",
363  "<TITLE>" => "2",
364  "<TOPMARGIN>" => "2",
365  "<TYPE>" => "2",
366  "<URL>" => "2",
367  "<USEMAP>" => "2",
368  "<VALIGN>" => "2",
369  "<VALUE>" => "2",
370  "<VALUETYPE>" => "2",
371  "<VERSION>" => "2",
372  "<VLINK>" => "2",
373  "<VSPACE>" => "2",
374  "<WIDTH>" => "2");
375 
376 // Special extensions
377 
378 // Each category can specify a PHP function that returns an altered
379 // version of the keyword.
380 
381 
382 
383 $this->linkscripts = array(
384  "1>" => "donothing",
385  "2>" => "donothing");
386 }
387 
388 
389 function donothing($keywordin)
390 {
391  return $keywordin;
392 }
393 
394 }?>