-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathhtml.xml
196 lines (179 loc) · 5.09 KB
/
html.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
<?xml version="1.0"?>
<!DOCTYPE MODE SYSTEM "xmode.dtd">
<MODE>
<PROPS>
<PROPERTY NAME="commentStart" VALUE="<!--" />
<PROPERTY NAME="commentEnd" VALUE="-->" />
</PROPS>
<RULES IGNORE_CASE="TRUE">
<!-- SGML comment -->
<SPAN TYPE="COMMENT1">
<BEGIN><!--</BEGIN>
<END>--></END>
</SPAN>
<!-- JavaScript -->
<SPAN TYPE="MARKUP" DELEGATE="JAVASCRIPT">
<BEGIN><SCRIPT</BEGIN>
<END></SCRIPT></END>
</SPAN>
<!-- stylesheet -->
<SPAN TYPE="MARKUP" DELEGATE="CSS">
<BEGIN><STYLE</BEGIN>
<END></STYLE></END>
</SPAN>
<!-- DTD instructions -->
<SPAN TYPE="KEYWORD2" DELEGATE="xml::DTD-TAGS">
<BEGIN><!</BEGIN>
<END>></END>
</SPAN>
<!-- markup tags -->
<SPAN TYPE="MARKUP" DELEGATE="TAGS">
<BEGIN><</BEGIN>
<END>></END>
</SPAN>
<!-- SGML entities -->
<SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
<BEGIN>&</BEGIN>
<END>;</END>
</SPAN>
</RULES>
<!-- ESCAPE is not exactly right but it is needed to correctly
handle JavaScript in on* parameters.
NOTE: ESCAPE moved from RULE to SPANs! -->
<RULES SET="TAGS" DEFAULT="MARKUP">
<!-- Inline CSS -->
<SPAN_REGEXP AT_WORD_START="TRUE" TYPE="MARKUP" DELEGATE="css::PROPERTIES" HASH_CHAR="style">
<BEGIN>style\s*=\s*(["'])</BEGIN>
<END>$1</END>
</SPAN_REGEXP>
<!-- Javascript: delegate on* attributes to Javascript mode -->
<SPAN_REGEXP AT_WORD_START="TRUE" DELEGATE="javascript::MAIN" HASH_CHAR="on" TYPE="MARKUP">
<BEGIN>on[a-z]+\s*=\s*(["'])</BEGIN>
<END>$1</END>
</SPAN_REGEXP>
<!-- NOTE: no ESCAPE for quotes, at least for attributes; e.g onclick="alert(\"foo\");" is invalid! -->
<SPAN TYPE="LITERAL1">
<BEGIN>"</BEGIN>
<END>"</END>
</SPAN>
<SPAN TYPE="LITERAL1">
<BEGIN>'</BEGIN>
<END>'</END>
</SPAN>
<SEQ TYPE="OPERATOR">=</SEQ>
<KEYWORDS>
<!-- HTML/XHTML elements, taken from http://de.selfhtml.org/html/referenz/elemente.htm -->
<MARKUP>a</MARKUP>
<MARKUP>abbr</MARKUP>
<MARKUP>acronym</MARKUP>
<MARKUP>address</MARKUP>
<MARKUP>applet</MARKUP>
<MARKUP>area</MARKUP>
<MARKUP>b</MARKUP>
<MARKUP>base</MARKUP>
<MARKUP>basefont</MARKUP>
<MARKUP>bdo</MARKUP>
<MARKUP>big</MARKUP>
<MARKUP>blockquote</MARKUP>
<MARKUP>body</MARKUP>
<MARKUP>br</MARKUP>
<MARKUP>button</MARKUP>
<MARKUP>caption</MARKUP>
<MARKUP>center</MARKUP>
<MARKUP>cite</MARKUP>
<MARKUP>code</MARKUP>
<MARKUP>col</MARKUP>
<MARKUP>colgroup</MARKUP>
<MARKUP>dd</MARKUP>
<MARKUP>del</MARKUP>
<MARKUP>dfn</MARKUP>
<MARKUP>dir</MARKUP>
<MARKUP>div</MARKUP>
<MARKUP>dl</MARKUP>
<MARKUP>dt</MARKUP>
<MARKUP>em</MARKUP>
<MARKUP>fieldset</MARKUP>
<MARKUP>font</MARKUP>
<MARKUP>form</MARKUP>
<MARKUP>frame</MARKUP>
<MARKUP>frameset</MARKUP>
<MARKUP>h1</MARKUP>
<MARKUP>h2</MARKUP>
<MARKUP>h3</MARKUP>
<MARKUP>h4</MARKUP>
<MARKUP>h5</MARKUP>
<MARKUP>h6</MARKUP>
<MARKUP>head</MARKUP>
<MARKUP>hr</MARKUP>
<MARKUP>html</MARKUP>
<MARKUP>i</MARKUP>
<MARKUP>iframe</MARKUP>
<MARKUP>img</MARKUP>
<MARKUP>input</MARKUP>
<MARKUP>ins</MARKUP>
<MARKUP>isindex</MARKUP>
<MARKUP>kbd</MARKUP>
<MARKUP>label</MARKUP>
<MARKUP>legend</MARKUP>
<MARKUP>li</MARKUP>
<MARKUP>link</MARKUP>
<MARKUP>map</MARKUP>
<MARKUP>menu</MARKUP>
<MARKUP>meta</MARKUP>
<MARKUP>noframes</MARKUP>
<MARKUP>noscript</MARKUP>
<MARKUP>object</MARKUP>
<MARKUP>ol</MARKUP>
<MARKUP>optgroup</MARKUP>
<MARKUP>option</MARKUP>
<MARKUP>p</MARKUP>
<MARKUP>param</MARKUP>
<MARKUP>pre</MARKUP>
<MARKUP>q</MARKUP>
<MARKUP>s</MARKUP>
<MARKUP>samp</MARKUP>
<MARKUP>script</MARKUP>
<MARKUP>select</MARKUP>
<MARKUP>small</MARKUP>
<MARKUP>span</MARKUP>
<MARKUP>strike</MARKUP>
<MARKUP>strong</MARKUP>
<MARKUP>style</MARKUP>
<MARKUP>sub</MARKUP>
<MARKUP>sup</MARKUP>
<MARKUP>table</MARKUP>
<MARKUP>tbody</MARKUP>
<MARKUP>td</MARKUP>
<MARKUP>textarea</MARKUP>
<MARKUP>tfoot</MARKUP>
<MARKUP>th</MARKUP>
<MARKUP>thead</MARKUP>
<MARKUP>title</MARKUP>
<MARKUP>tr</MARKUP>
<MARKUP>tt</MARKUP>
<MARKUP>u</MARKUP>
<MARKUP>ul</MARKUP>
<MARKUP>var</MARKUP>
</KEYWORDS>
</RULES>
<RULES SET="JAVASCRIPT" DEFAULT="MARKUP" IGNORE_CASE="TRUE">
<SPAN TYPE="COMMENT1" DELEGATE="JAVASCRIPT">
<BEGIN><![CDATA[</BEGIN>
<END>]]></END>
</SPAN>
<SEQ TYPE="MARKUP" DELEGATE="javascript::MAIN">></SEQ>
<!-- handle <SCRIPT SRC="..."> properly -->
<SEQ TYPE="MARKUP" DELEGATE="BACK_TO_HTML">SRC=</SEQ>
<!-- Inline CSS -->
<SPAN_REGEXP TYPE="MARKUP" DELEGATE="css::PROPERTIES" HASH_CHAR="style">
<BEGIN>style\s*=\s*(["'])</BEGIN>
<END>$1</END>
</SPAN_REGEXP>
</RULES>
<RULES SET="BACK_TO_HTML" DEFAULT="MARKUP">
<SEQ TYPE="MARKUP" DELEGATE="html::MAIN">></SEQ>
</RULES>
<RULES SET="CSS" DEFAULT="MARKUP">
<SEQ TYPE="MARKUP" DELEGATE="css::MAIN">></SEQ>
</RULES>
</MODE>