ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
HFile_xhtml11.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_xhtml11 extends HFile
8 {
9 public function HFile_xhtml11()
10 {
11 $this->HFile();
12 /*************************************/
13 // Beautifier Highlighting Configuration File
14 // XHTML 1.1
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");
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 "<bdo>" => "1",
66 "<bdo" => "1",
67 "</bdo>" => "1",
68 "<big>" => "1",
69 "<big" => "1",
70 "</big>" => "1",
71 "<blockquote>" => "1",
72 "<blockquote" => "1",
73 "</blockquote>" => "1",
74 "<body>" => "1",
75 "<body" => "1",
76 "</body>" => "1",
77 "<br" => "1",
78 "<button>" => "1",
79 "<button" => "1",
80 "</button>" => "1",
81 "<caption>" => "1",
82 "<caption" => "1",
83 "</caption>" => "1",
84 "<cite>" => "1",
85 "<cite" => "1",
86 "</cite>" => "1",
87 "<code>" => "1",
88 "<code" => "1",
89 "</code>" => "1",
90 "<col" => "1",
91 "<colgroup>" => "1",
92 "<colgroup" => "1",
93 "</colgroup>" => "1",
94 "<dd>" => "1",
95 "<dd" => "1",
96 "</dd>" => "1",
97 "<del>" => "1",
98 "<del" => "1",
99 "</del>" => "1",
100 "<dfn>" => "1",
101 "<dfn" => "1",
102 "</dfn>" => "1",
103 "<div>" => "1",
104 "<div" => "1",
105 "</div>" => "1",
106 "<dl>" => "1",
107 "<dl" => "1",
108 "</dl>" => "1",
109 "<dt>" => "1",
110 "<dt" => "1",
111 "</dt>" => "1",
112 "<em>" => "1",
113 "<em" => "1",
114 "</em>" => "1",
115 "<fieldset>" => "1",
116 "<fieldset" => "1",
117 "</fieldset>" => "1",
118 "<form>" => "1",
119 "<form" => "1",
120 "</form>" => "1",
121 "<h1>" => "1",
122 "<h1" => "1",
123 "</h1>" => "1",
124 "<h2>" => "1",
125 "<h2" => "1",
126 "</h2>" => "1",
127 "<h3>" => "1",
128 "<h3" => "1",
129 "</h3>" => "1",
130 "<h4>" => "1",
131 "<h4" => "1",
132 "</h4>" => "1",
133 "<h5>" => "1",
134 "<h5" => "1",
135 "</h5>" => "1",
136 "<h6>" => "1",
137 "<h6" => "1",
138 "</h6>" => "1",
139 "<head>" => "1",
140 "<head" => "1",
141 "</head>" => "1",
142 "<hr" => "1",
143 "<html>" => "1",
144 "<html" => "1",
145 "</html>" => "1",
146 "<i>" => "1",
147 "<i" => "1",
148 "</i>" => "1",
149 "<img" => "1",
150 "<input" => "1",
151 "<ins>" => "1",
152 "<ins" => "1",
153 "</ins>" => "1",
154 "<kbd>" => "1",
155 "<kbd" => "1",
156 "</kbd>" => "1",
157 "<label>" => "1",
158 "<label" => "1",
159 "</label>" => "1",
160 "<legend>" => "1",
161 "<legend" => "1",
162 "</legend>" => "1",
163 "<li>" => "1",
164 "<li" => "1",
165 "</li>" => "1",
166 "<link" => "1",
167 "<map>" => "1",
168 "<map" => "1",
169 "</map>" => "1",
170 "<meta" => "1",
171 "<object>" => "1",
172 "<object" => "1",
173 "</object>" => "1",
174 "<ol>" => "1",
175 "<ol" => "1",
176 "</ol>" => "1",
177 "<optgroup>" => "1",
178 "<optgroup" => "1",
179 "</optgroup>" => "1",
180 "<option>" => "1",
181 "<option" => "1",
182 "</option>" => "1",
183 "<p>" => "1",
184 "<p" => "1",
185 "</p>" => "1",
186 "<param" => "1",
187 "<pre>" => "1",
188 "<pre" => "1",
189 "</pre>" => "1",
190 "<q>" => "1",
191 "<q" => "1",
192 "</q>" => "1",
193 "<rb<" => "1",
194 "<rb" => "1",
195 "</rb>" => "1",
196 "<rbc>" => "1",
197 "<rbc" => "1",
198 "</rbc>" => "1",
199 "<rp>" => "1",
200 "<rp" => "1",
201 "</rp>" => "1",
202 "<rt>" => "1",
203 "<rt" => "1",
204 "</rt>" => "1",
205 "<rtc>" => "1",
206 "<rtc" => "1",
207 "</rtc>" => "1",
208 "<ruby>" => "1",
209 "<ruby" => "1",
210 "</ruby>" => "1",
211 "<samp>" => "1",
212 "<samp" => "1",
213 "</samp>" => "1",
214 "<script>" => "1",
215 "<script" => "1",
216 "</script>" => "1",
217 "<select>" => "1",
218 "<select" => "1",
219 "</select>" => "1",
220 "<small>" => "1",
221 "<small" => "1",
222 "</small>" => "1",
223 "<span>" => "1",
224 "<span" => "1",
225 "</span>" => "1",
226 "<strong>" => "1",
227 "<strong" => "1",
228 "</strong>" => "1",
229 "<style>" => "1",
230 "<style" => "1",
231 "</style>" => "1",
232 "<sub>" => "1",
233 "<sub" => "1",
234 "</sub>" => "1",
235 "<sup>" => "1",
236 "<sup" => "1",
237 "</sup>" => "1",
238 "<table>" => "1",
239 "<table" => "1",
240 "</table>" => "1",
241 "<tbody>" => "1",
242 "<tbody" => "1",
243 "</tbody>" => "1",
244 "<td>" => "1",
245 "<td" => "1",
246 "</td>" => "1",
247 "<textarea>" => "1",
248 "<textarea" => "1",
249 "</textarea>" => "1",
250 "<tfoot>" => "1",
251 "<tfoot" => "1",
252 "</tfoot>" => "1",
253 "<th>" => "1",
254 "<th" => "1",
255 "</th>" => "1",
256 "<thead>" => "1",
257 "<thead" => "1",
258 "</thead>" => "1",
259 "<title>" => "1",
260 "<title" => "1",
261 "</title>" => "1",
262 "<tr>" => "1",
263 "<tr" => "1",
264 "</tr>" => "1",
265 "<tt>" => "1",
266 "<tt" => "1",
267 "</tt>" => "1",
268 "<ul>" => "1",
269 "<ul" => "1",
270 "</ul>" => "1",
271 "<var>" => "1",
272 "<var" => "1",
273 "</var>" => "1",
274 "//" => "1",
275 "/>" => "1",
276 ">" => "1",
277 "abbr=" => "2",
278 "accept-charset=" => "2",
279 "accept=" => "2",
280 "accesskey=" => "2",
281 "action=" => "2",
282 "align=" => "2",
283 "alt=" => "2",
284 "archive=" => "2",
285 "axis=" => "2",
286 "border=" => "2",
287 "cellpadding=" => "2",
288 "cellspacing=" => "2",
289 "char=" => "2",
290 "charoff=" => "2",
291 "charset=" => "2",
292 "checked=" => "2",
293 "cite=" => "2",
294 "class=" => "2",
295 "code=" => "2",
296 "codebase=" => "2",
297 "colspan=" => "2",
298 "columns=" => "2",
299 "content=" => "2",
300 "coords=" => "2",
301 "datapagesize=" => "2",
302 "datetime=" => "2",
303 "defer=" => "2",
304 "dir=" => "2",
305 "disabled=" => "2",
306 "enctype=" => "2",
307 "frame=" => "2",
308 "headers=" => "2",
309 "height=" => "2",
310 "href=" => "2",
311 "hreflang=" => "2",
312 "http-equiv=" => "2",
313 "id=" => "2",
314 "ismap=" => "2",
315 "label=" => "2",
316 "longdesc=" => "2",
317 "maxlength=" => "2",
318 "media=" => "2",
319 "method=" => "2",
320 "multiple=" => "2",
321 "name=" => "2",
322 "nohref=" => "2",
323 "object=" => "2",
324 "onblur=" => "2",
325 "onchange=" => "2",
326 "onclick=" => "2",
327 "ondblclick=" => "2",
328 "onfocus=" => "2",
329 "onkeydown=" => "2",
330 "onkeypress=" => "2",
331 "onkeyup=" => "2",
332 "onload=" => "2",
333 "onmousedown=" => "2",
334 "onmousemove=" => "2",
335 "onmouseout=" => "2",
336 "onmouseover=" => "2",
337 "onmouseup=" => "2",
338 "onreset=" => "2",
339 "onselect=" => "2",
340 "onsubmit=" => "2",
341 "onunload=" => "2",
342 "profile=" => "2",
343 "rbspan=" => "2",
344 "readonly=" => "2",
345 "rel=" => "2",
346 "rev=" => "2",
347 "rows=" => "2",
348 "rowspan=" => "2",
349 "rules=" => "2",
350 "scheme=" => "2",
351 "scope=" => "2",
352 "selected=" => "2",
353 "shape=" => "2",
354 "size=" => "2",
355 "span=" => "2",
356 "src=" => "2",
357 "style=" => "2",
358 "summary=" => "2",
359 "tabindex=" => "2",
360 "title=" => "2",
361 "type=" => "2",
362 "usemap=" => "2",
363 "valign=" => "2",
364 "value=" => "2",
365 "valuetype=" => "2",
366 "version=" => "2",
367 "width=" => "2",
368 "xml:lang=" => "2",
369 "xmlns=" => "2",
370 "&;" => "3",
371 "<!DOCTYPE" => "4",
372 "<![CDATA[" => "4",
373 "<?phpxml" => "4",
374 "<?phpxml-stylesheet" => "4",
375 "?>" => "4",
376 "DTD" => "4",
377 "PUBLIC" => "4",
378 "SCHEMA" => "4",
379 "]]>" => "4");
380
381 // Special extensions
382
383 // Each category can specify a PHP function that returns an altered
384 // version of the keyword.
385
386
387
388 $this->linkscripts = array(
389 "1" => "donothing",
390 "2" => "donothing",
391 "3" => "donothing",
392 "4" => "donothing");
393 }
394
395
396 public function donothing($keywordin)
397 {
398 return $keywordin;
399 }
400 }
donothing($keywordin)
$BEAUT_PATH
An exception for terminatinating execution or to throw for unit testing.