ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
HFile_xhtml10.php
Go to the documentation of this file.
1<?php
2$BEAUT_PATH = realpath(".") . "/Services/COPage/syntax_highlight/php";
3if (!isset($BEAUT_PATH)) {
4 return;
5}
6require_once("$BEAUT_PATH/Beautifier/HFile.php");
7 class HFile_xhtml10 extends HFile
8 {
9 public function HFile_xhtml10()
10 {
11 $this->HFile();
12 /*************************************/
13 // Beautifier Highlighting Configuration File
14 // XHTML 1.0
15 /*************************************/
16 // Flags
17
18 $this->nocase = "0";
19 $this->notrim = "0";
20 $this->perl = "0";
21
22 // Colours
23
24 $this->colours = array("blue", "purple", "gray", "brown", "blue");
25 $this->quotecolour = "blue";
26 $this->blockcommentcolour = "green";
27 $this->linecommentcolour = "green";
28
29 // Indent Strings
30
31 $this->indent = array();
32 $this->unindent = array();
33
34 // String characters and delimiters
35
36 $this->stringchars = array("\"", "'");
37 $this->delimiters = array("~", "@", "$", "%", "^", "&", "*", "(", ")", "+", "=", "|", "\\", "{", "}", ";", "\"", "'", "<", ">", " ", ",", " ", ".");
38 $this->escchar = "";
39
40 // Comment settings
41
42 $this->linecommenton = array("");
43 $this->blockcommenton = array("<!--");
44 $this->blockcommentoff = array("-->");
45
46 // Keywords (keyword mapping to colour number)
47
48 $this->keywords = array(
49 "<a>" => "1",
50 "<a" => "1",
51 "</a>" => "1",
52 "<abbr>" => "1",
53 "<abbr" => "1",
54 "</abbr>" => "1",
55 "<acronym>" => "1",
56 "<acronym" => "1",
57 "</acronym>" => "1",
58 "<address>" => "1",
59 "<address" => "1",
60 "</address>" => "1",
61 "<area" => "1",
62 "<b>" => "1",
63 "<b" => "1",
64 "</b>" => "1",
65 "<base" => "1",
66 "<bdo>" => "1",
67 "<bdo" => "1",
68 "</bdo>" => "1",
69 "<big>" => "1",
70 "<big" => "1",
71 "</big>" => "1",
72 "<blockquote>" => "1",
73 "<blockquote" => "1",
74 "</blockquote>" => "1",
75 "<body>" => "1",
76 "<body" => "1",
77 "</body>" => "1",
78 "<br" => "1",
79 "<button>" => "1",
80 "<button" => "1",
81 "</button>" => "1",
82 "<caption>" => "1",
83 "<caption" => "1",
84 "</caption>" => "1",
85 "<cite>" => "1",
86 "<cite" => "1",
87 "</cite>" => "1",
88 "<code>" => "1",
89 "<code" => "1",
90 "</code>" => "1",
91 "<col" => "1",
92 "<colgroup>" => "1",
93 "<colgroup" => "1",
94 "</colgroup>" => "1",
95 "<dd>" => "1",
96 "<dd" => "1",
97 "</dd>" => "1",
98 "<del>" => "1",
99 "<del" => "1",
100 "</del>" => "1",
101 "<dfn>" => "1",
102 "<dfn" => "1",
103 "</dfn>" => "1",
104 "<div>" => "1",
105 "<div" => "1",
106 "</div>" => "1",
107 "<dl>" => "1",
108 "<dl" => "1",
109 "</dl>" => "1",
110 "<dt>" => "1",
111 "<dt" => "1",
112 "</dt>" => "1",
113 "<em>" => "1",
114 "<em" => "1",
115 "</em>" => "1",
116 "<fieldset>" => "1",
117 "<fieldset" => "1",
118 "</fieldset>" => "1",
119 "<form>" => "1",
120 "<form" => "1",
121 "</form>" => "1",
122 "<frame" => "1",
123 "<frameset>" => "1",
124 "<frameset" => "1",
125 "</frameset>" => "1",
126 "<h1>" => "1",
127 "<h1" => "1",
128 "</h1>" => "1",
129 "<h2>" => "1",
130 "<h2" => "1",
131 "</h2>" => "1",
132 "<h3>" => "1",
133 "<h3" => "1",
134 "</h3>" => "1",
135 "<h4>" => "1",
136 "<h4" => "1",
137 "</h4>" => "1",
138 "<h5>" => "1",
139 "<h5" => "1",
140 "</h5>" => "1",
141 "<h6>" => "1",
142 "<h6" => "1",
143 "</h6>" => "1",
144 "<head>" => "1",
145 "<head" => "1",
146 "</head>" => "1",
147 "<hr" => "1",
148 "<html>" => "1",
149 "<html" => "1",
150 "</html>" => "1",
151 "<i>" => "1",
152 "<i" => "1",
153 "</i>" => "1",
154 "<iframe>" => "1",
155 "<iframe" => "1",
156 "</iframe>" => "1",
157 "<img" => "1",
158 "<input" => "1",
159 "<ins>" => "1",
160 "<ins" => "1",
161 "</ins>" => "1",
162 "<kbd>" => "1",
163 "<kbd" => "1",
164 "</kbd>" => "1",
165 "<label>" => "1",
166 "<label" => "1",
167 "</label>" => "1",
168 "<legend>" => "1",
169 "<legend" => "1",
170 "</legend>" => "1",
171 "<li>" => "1",
172 "<li" => "1",
173 "</li>" => "1",
174 "<link" => "1",
175 "<map>" => "1",
176 "<map" => "1",
177 "</map>" => "1",
178 "<meta" => "1",
179 "<noframes>" => "1",
180 "</noframes>" => "1",
181 "<noscript>" => "1",
182 "</noscript>" => "1",
183 "<object>" => "1",
184 "<object" => "1",
185 "</object>" => "1",
186 "<ol>" => "1",
187 "<ol" => "1",
188 "</ol>" => "1",
189 "<optgroup>" => "1",
190 "<optgroup" => "1",
191 "</optgroup>" => "1",
192 "<option>" => "1",
193 "<option" => "1",
194 "</option>" => "1",
195 "<p>" => "1",
196 "<p" => "1",
197 "</p>" => "1",
198 "<param" => "1",
199 "<pre>" => "1",
200 "<pre" => "1",
201 "</pre>" => "1",
202 "<q>" => "1",
203 "<q" => "1",
204 "</q>" => "1",
205 "<samp>" => "1",
206 "<samp" => "1",
207 "</samp>" => "1",
208 "<script>" => "1",
209 "<script" => "1",
210 "</script>" => "1",
211 "<select>" => "1",
212 "<select" => "1",
213 "</select>" => "1",
214 "<small>" => "1",
215 "<small" => "1",
216 "</small>" => "1",
217 "<span>" => "1",
218 "<span" => "1",
219 "</span>" => "1",
220 "<strong>" => "1",
221 "<strong" => "1",
222 "</strong>" => "1",
223 "<style>" => "1",
224 "<style" => "1",
225 "</style>" => "1",
226 "<sub>" => "1",
227 "<sub" => "1",
228 "</sub>" => "1",
229 "<sup>" => "1",
230 "<sup" => "1",
231 "</sup>" => "1",
232 "<table>" => "1",
233 "<table" => "1",
234 "</table>" => "1",
235 "<tbody>" => "1",
236 "<tbody" => "1",
237 "</tbody>" => "1",
238 "<td>" => "1",
239 "<td" => "1",
240 "</td>" => "1",
241 "<textarea>" => "1",
242 "<textarea" => "1",
243 "</textarea>" => "1",
244 "<tfoot>" => "1",
245 "<tfoot" => "1",
246 "</tfoot>" => "1",
247 "<th>" => "1",
248 "<th" => "1",
249 "</th>" => "1",
250 "<thead>" => "1",
251 "<thead" => "1",
252 "</thead>" => "1",
253 "<title>" => "1",
254 "<title" => "1",
255 "</title>" => "1",
256 "<tr>" => "1",
257 "<tr" => "1",
258 "</tr>" => "1",
259 "<tt>" => "1",
260 "<tt" => "1",
261 "</tt>" => "1",
262 "<ul>" => "1",
263 "<ul" => "1",
264 "</ul>" => "1",
265 "<var>" => "1",
266 "<var" => "1",
267 "</var>" => "1",
268 "//" => "1",
269 "/>" => "1",
270 ">" => "1",
271 "abbr=" => "2",
272 "accept-charset=" => "2",
273 "accept=" => "2",
274 "accesskey=" => "2",
275 "action=" => "2",
276 "align=" => "2",
277 "alt=" => "2",
278 "archive=" => "2",
279 "axis=" => "2",
280 "border=" => "2",
281 "cellpadding=" => "2",
282 "cellspacing=" => "2",
283 "char=" => "2",
284 "charoff=" => "2",
285 "charset=" => "2",
286 "checked=" => "2",
287 "cite=" => "2",
288 "class=" => "2",
289 "classid=" => "2",
290 "codebase=" => "2",
291 "codetype=" => "2",
292 "cols=" => "2",
293 "colspan=" => "2",
294 "content=" => "2",
295 "coords=" => "2",
296 "data=" => "2",
297 "datetime=" => "2",
298 "declare=" => "2",
299 "defer=" => "2",
300 "dir=" => "2",
301 "disabled=" => "2",
302 "encoding=" => "2",
303 "enctype=" => "2",
304 "for=" => "2",
305 "frame=" => "2",
306 "frameborder=" => "2",
307 "headers=" => "2",
308 "height=" => "2",
309 "href=" => "2",
310 "hreflang=" => "2",
311 "http-equiv=" => "2",
312 "id=" => "2",
313 "ismap=" => "2",
314 "label=" => "2",
315 "lang=" => "2",
316 "longdesc=" => "2",
317 "marginheight=" => "2",
318 "marginwidth=" => "2",
319 "maxlength=" => "2",
320 "media=" => "2",
321 "method=" => "2",
322 "multiple=" => "2",
323 "name=" => "2",
324 "nohref=" => "2",
325 "noresize=" => "2",
326 "onblur=" => "2",
327 "onchange=" => "2",
328 "onclick=" => "2",
329 "ondblclick=" => "2",
330 "onfocus=" => "2",
331 "onkeydown=" => "2",
332 "onkeypress=" => "2",
333 "onkeyup=" => "2",
334 "onload=" => "2",
335 "onmousedown=" => "2",
336 "onmousemove=" => "2",
337 "onmouseout=" => "2",
338 "onmouseover=" => "2",
339 "onmouseup=" => "2",
340 "onreset=" => "2",
341 "onselect=" => "2",
342 "onsubmit=" => "2",
343 "onunload=" => "2",
344 "profile=" => "2",
345 "readonly=" => "2",
346 "rel=" => "2",
347 "rev=" => "2",
348 "rows=" => "2",
349 "rowspan=" => "2",
350 "rules=" => "2",
351 "scheme=" => "2",
352 "scope=" => "2",
353 "scrolling=" => "2",
354 "selected=" => "2",
355 "shape=" => "2",
356 "size=" => "2",
357 "span=" => "2",
358 "src=" => "2",
359 "standby=" => "2",
360 "style=" => "2",
361 "summary=" => "2",
362 "tabindex=" => "2",
363 "target=" => "2",
364 "title=" => "2",
365 "type=" => "2",
366 "usemap=" => "2",
367 "valign=" => "2",
368 "value=" => "2",
369 "valuetype=" => "2",
370 "version=" => "2",
371 "width=" => "2",
372 "xmlns=" => "2",
373 "xmlns:isbn=" => "2",
374 "xml:lang=" => "2",
375 "=" => "2",
376 "<applet" => "3",
377 "</applet>" => "3",
378 "<basefont" => "3",
379 "<center>" => "3",
380 "<center" => "3",
381 "</center>" => "3",
382 "<dir>" => "3",
383 "<dir" => "3",
384 "</dir>" => "3",
385 "<font>" => "3",
386 "<font" => "3",
387 "</font>" => "3",
388 "<isindex" => "3",
389 "<menu>" => "3",
390 "<menu" => "3",
391 "</menu>" => "3",
392 "<s>" => "3",
393 "<s" => "3",
394 "<strike>" => "3",
395 "<strike" => "3",
396 "</strike>" => "3",
397 "<u>" => "3",
398 "<u" => "3",
399 "</u>" => "3",
400 "&;" => "3",
401 "<!DOCTYPE" => "4",
402 "<![CDATA[" => "4",
403 "<?phpxml" => "4",
404 "<?phpxml-stylesheet" => "4",
405 "?>" => "4",
406 "DTD" => "4",
407 "PUBLIC" => "4",
408 "SCHEMA" => "4",
409 "]]>" => "4",
410 "alink=" => "5",
411 "background=" => "5",
412 "bgcolor=" => "5",
413 "clear=" => "5",
414 "code=" => "5",
415 "color=" => "5",
416 "compact=" => "5",
417 "face=" => "5",
418 "hspace=" => "5",
419 "language=" => "5",
420 "link=" => "5",
421 "noshade=" => "5",
422 "nowrap=" => "5",
423 "object=" => "5",
424 "prompt=" => "5",
425 "start=" => "5",
426 "text=" => "5",
427 "vlink=" => "5",
428 "vspace=" => "5");
429
430 // Special extensions
431
432 // Each category can specify a PHP function that returns an altered
433 // version of the keyword.
434
435
436
437 $this->linkscripts = array(
438 "1" => "donothing",
439 "2" => "donothing",
440 "3" => "donothing",
441 "4" => "donothing",
442 "5" => "donothing");
443 }
444
445
446 public function donothing($keywordin)
447 {
448 return $keywordin;
449 }
450 }
donothing($keywordin)
$BEAUT_PATH
An exception for terminatinating execution or to throw for unit testing.