Debian Codegraph @

data/syntax/jsp.xml

raw
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE language>
3 <language version="9" kateversion="5.62" name="JSP" section="Markup" extensions="*.jsp;*.JSP" mimetype="text/html" casesensitive="false" author="Rob Martin ([email protected])" license="LGPL">
4 <highlighting>
5
6 <list name="jsp-reserved-words">
7 <item>and</item>
8 <item>eq</item>
9 <item>gt</item>
10 <item>true</item>
11 <item>instanceof</item>
12 <item>or</item>
13 <item>ne</item>
14 <item>le</item>
15 <item>false</item>
16 <item>empty</item>
17 <item>not</item>
18 <item>lt</item>
19 <item>ge</item>
20 <item>null</item>
21 <item>div</item>
22 <item>mod</item>
23 </list>
24
25 <contexts>
26 <context name="Normal" attribute="Normal Text" lineEndContext="#stay">
27 <RegExpr String="&lt;%@\s*[a-zA-Z0-9_\.]*" attribute="Jsp Directive" context="Jsp Standard Directive"/>
28 <RegExpr String="&lt;\s*jsp:(declaration|expression|scriptlet)\s*&gt;" attribute="Jsp Scriptlet" context="Jsp Scriptlet"/>
29 <RegExpr String="&lt;\s*\/?s*jsp:[a-zA-Z0-9_\.]*" attribute="Jsp Directive" context="Jsp Xml Directive"/>
30 <StringDetect String="&lt;%--" attribute="Jsp Comment" context="Jsp Comment" beginRegion="JspComment"/>
31 <RegExpr String="&lt;%(!|=)?" attribute="Jsp Scriptlet" context="Jsp Scriptlet" beginRegion="JspScriptlet"/>
32 <StringDetect String="&lt;!--" attribute="Html Comment" context="Html Comment" beginRegion="HtmlComment"/>
33 <Detect2Chars char="$" char1="{" attribute="Jsp Expression" context="Jsp Expression"/>
34 <RegExpr String="&lt;\s*\/?\s*\$?[a-zA-Z0-9_]*:\$?[a-zA-Z0-9_]*" attribute="Keyword" context="Jsp Custom Tag"/>
35 <StringDetect String="&lt;![CDATA[" attribute="Normal Text" context="#stay"/>
36 <StringDetect String="]]&gt;" attribute="Normal Text" context="#stay"/>
37 <RegExpr String="&lt;script\b" attribute="Normal Text" context="JS" beginRegion="script" />
38 <RegExpr String="&lt;style\b" attribute="Normal Text" context="CSS" beginRegion="style" />
39 <RegExpr String="&lt;\s*\/?\s*[a-zA-Z0-9_]*" attribute="Normal Text" context="Html Attribute"/>
40 </context>
41
42 <context name="CSS" attribute="Normal Text" lineEndContext="#stay">
43 <DetectChar attribute="Normal Text" context="CSS content" char="&gt;" />
44 <Detect2Chars attribute="Normal Text" context="#pop" char="/" char1="&gt;" endRegion="style" />
45 <IncludeRules context="Html Attribute" />
46 </context>
47
48 <context name="CSS content" attribute="Normal Text" lineEndContext="#stay">
49 <StringDetect attribute="Normal Text" context="#pop#pop" String="&lt;/style>" endRegion="style" />
50 <IncludeRules context="##CSS" includeAttrib="true"/>
51 </context>
52
53 <context name="JS" attribute="Normal Text" lineEndContext="#stay">
54 <DetectChar attribute="Normal Text" context="JS content" char="&gt;" />
55 <Detect2Chars attribute="Normal Text" context="#pop" char="/" char1="&gt;" endRegion="script" />
56 <IncludeRules context="Html Attribute" />
57 </context>
58
59 <context name="JS content" attribute="Normal Text" lineEndContext="#stay">
60 <RegExpr attribute="Normal Text" context="#pop#pop!Html Attribute" String="&lt;/script\b" endRegion="script" />
61 <RegExpr attribute="Jsp Comment" context="JS comment close" String="//(?=.*&lt;/script)" />
62 <IncludeRules context="Normal##JavaScript" includeAttrib="true"/>
63 </context>
64 <context name="JS comment close" attribute="Jsp Comment" lineEndContext="#stay">
65 <DetectSpaces/>
66 <IncludeRules context="##Comments" />
67 <DetectIdentifier/>
68 <StringDetect attribute="Normal Text" context="#pop#pop#pop" String="&lt;/script" endRegion="script" />
69 </context>
70
71 <context name="Jsp Standard Directive" attribute="Jsp Param Name" lineEndContext="#stay">
72 <Detect2Chars char="%" char1="&gt;" attribute="Jsp Directive" context="#pop"/>
73 <RegExpr String="\s*=\s*" attribute="Normal Text" context="Jsp Standard Directive Value"/>
74 <StringDetect String="&lt;%--" attribute="Jsp Comment" context="Jsp Comment" beginRegion="JspComment"/>
75 <RegExpr String="&lt;%(!|=)?" attribute="Jsp Scriptlet" context="Jsp Scriptlet" beginRegion="JspScriptlet"/>
76 <Detect2Chars char="$" char1="{" attribute="Jsp Expression" context="Jsp Expression"/>
77 <RegExpr String="&lt;\s*\/?\s*\$?\w*:\$?\w*" attribute="Keyword" context="Jsp Custom Tag"/>
78 </context>
79
80 <context name="Jsp Xml Directive" attribute="Jsp Param Name" lineEndContext="#stay">
81 <RegExpr String="\s*\/?\s*&gt;" attribute="Jsp Directive" context="#pop"/>
82 <RegExpr String="\s*=\s*" attribute="Normal Text" context="Jsp Xml Directive Value"/>
83 <StringDetect String="&lt;%--" attribute="Jsp Comment" context="Jsp Comment" beginRegion="JspComment"/>
84 <RegExpr String="&lt;%(!|=)?" attribute="Jsp Scriptlet" context="Jsp Scriptlet" beginRegion="JspScriptlet"/>
85 <Detect2Chars char="$" char1="{" attribute="Jsp Expression" context="Jsp Expression"/>
86 </context>
87
88 <context name="Jsp Comment" attribute="Jsp Comment" lineEndContext="#stay">
89 <StringDetect String="--%&gt;" attribute="Jsp Comment" context="#pop" endRegion="JspComment"/>
90 <DetectSpaces />
91 <IncludeRules context="##Comments" />
92 </context>
93
94 <context name="Jsp Custom Tag" attribute="Identifier" lineEndContext="#stay">
95 <RegExpr String="\/?&gt;" attribute="Keyword" context="#pop"/>
96 <RegExpr String="\s*=\s*" attribute="Normal Text" context="Jsp Custom Tag Value"/>
97 <StringDetect String="&lt;%--" attribute="Jsp Comment" context="Jsp Comment" beginRegion="JspComment"/>
98 <RegExpr String="&lt;%(!|=)?" attribute="Jsp Scriptlet" context="Jsp Scriptlet" beginRegion="JspScriptlet"/>
99 <Detect2Chars char="$" char1="{" attribute="Jsp Expression" context="Jsp Expression"/>
100 </context>
101
102 <context name="Jsp Standard Directive Value" attribute="Jsp Param Value" lineEndContext="#stay">
103 <StringDetect String="&lt;%--" attribute="Jsp Comment" context="Jsp Comment" beginRegion="JspComment"/>
104 <RegExpr String="&lt;%(!|=)?" attribute="Jsp Scriptlet" context="Jsp Scriptlet" beginRegion="JspScriptlet"/>
105 <Detect2Chars char="$" char1="{" attribute="Jsp Expression" context="Jsp Expression"/>
106 <DetectChar char="&quot;" attribute="Jsp Param Value" context="Jsp Double Quoted Param Value"/>
107 <DetectChar char="'" attribute="Jsp Param Value" context="Jsp Single Quoted Param Value"/>
108 <Detect2Chars char="%" char1="&gt;" attribute="Jsp Directive" context="#pop#pop"/>
109 </context>
110
111 <context name="Jsp Xml Directive Value" attribute="Jsp Param Value" lineEndContext="#stay">
112 <StringDetect String="&lt;%--" attribute="Jsp Comment" context="Jsp Comment" beginRegion="JspComment"/>
113 <RegExpr String="&lt;%(!|=)?" attribute="Jsp Scriptlet" context="Jsp Scriptlet" beginRegion="JspScriptlet"/>
114 <Detect2Chars char="$" char1="{" attribute="Jsp Expression" context="Jsp Expression"/>
115 <DetectChar char="&quot;" attribute="Jsp Param Value" context="Jsp Double Quoted Param Value"/>
116 <DetectChar char="'" attribute="Jsp Param Value" context="Jsp Single Quoted Param Value"/>
117 <RegExpr String="\s*\/?\s*&gt;" attribute="Jsp Directive" context="#pop#pop"/>
118 </context>
119
120 <context name="Jsp Custom Tag Value" attribute="Normal Text" lineEndContext="#stay">
121 <StringDetect String="&lt;%--" attribute="Jsp Comment" context="Jsp Comment" beginRegion="JspComment"/>
122 <RegExpr String="&lt;%(!|=)?" attribute="Jsp Scriptlet" context="Jsp Scriptlet" beginRegion="JspScriptlet"/>
123 <Detect2Chars char="$" char1="{" attribute="Jsp Expression" context="Jsp Expression"/>
124 <DetectChar char="&quot;" attribute="Types" context="Jsp Double Quoted Custom Tag Value"/>
125 <DetectChar char="'" attribute="Types" context="Jsp Single Quoted Custom Tag Value"/>
126 <RegExpr String="\/?&gt;" attribute="Normal Text" context="#pop#pop"/>
127 </context>
128
129 <context name="Jsp Double Quoted Param Value" attribute="Jsp Param Value" lineEndContext="#stay">
130 <DetectChar char="&quot;" attribute="Jsp Param Value" context="#pop#pop"/>
131 <StringDetect String="&lt;%--" attribute="Jsp Comment" context="Jsp Comment" beginRegion="JspComment"/>
132 <RegExpr String="&lt;%(!|=)?" attribute="Jsp Scriptlet" context="Jsp Scriptlet" beginRegion="JspScriptlet"/>
133 <Detect2Chars char="$" char1="{" attribute="Jsp Expression" context="Jsp Expression"/>
134 </context>
135
136 <context name="Jsp Single Quoted Param Value" attribute="Jsp Param Value" lineEndContext="#stay">
137 <DetectChar char="'" attribute="Jsp Param Value" context="#pop#pop"/>
138 <StringDetect String="&lt;%--" attribute="Jsp Comment" context="Jsp Comment" beginRegion="JspComment"/>
139 <RegExpr String="&lt;%(!|=)?" attribute="Jsp Scriptlet" context="Jsp Scriptlet" beginRegion="JspScriptlet"/>
140 <Detect2Chars char="$" char1="{" attribute="Jsp Expression" context="Jsp Expression"/>
141 </context>
142
143 <context name="Jsp Double Quoted Custom Tag Value" attribute="Types" lineEndContext="#stay">
144 <DetectChar char="&quot;" attribute="Types" context="#pop#pop"/>
145 <StringDetect String="&lt;%--" attribute="Jsp Comment" context="Jsp Comment" beginRegion="JspComment"/>
146 <RegExpr String="&lt;%(!|=)?" attribute="Jsp Scriptlet" context="Jsp Scriptlet" beginRegion="JspScriptlet"/>
147 <Detect2Chars char="$" char1="{" attribute="Jsp Expression" context="Jsp Expression"/>
148 </context>
149
150 <context name="Jsp Single Quoted Custom Tag Value" attribute="Types" lineEndContext="#stay">
151 <DetectChar char="'" attribute="Types" context="#pop#pop"/>
152 <StringDetect String="&lt;%--" attribute="Jsp Comment" context="Jsp Comment" beginRegion="JspComment"/>
153 <RegExpr String="&lt;%(!|=)?" attribute="Jsp Scriptlet" context="Jsp Scriptlet" beginRegion="JspScriptlet"/>
154 <Detect2Chars char="$" char1="{" attribute="Jsp Expression" context="Jsp Expression"/>
155 </context>
156
157 <context name="Jsp Scriptlet" attribute="Normal Text" lineEndContext="#stay">
158 <Detect2Chars char="%" char1="&gt;" attribute="Jsp Scriptlet" context="#pop" endRegion="JspScriptlet"/>
159 <RegExpr String="&lt;\s*jsp:(declaration|expression|scriptlet)\s*&gt;" attribute="Jsp Scriptlet" context="Jsp Scriptlet"/>
160 <keyword String="jsp-reserved-words" attribute="Keyword" context="#stay"/>
161 <IncludeRules context="##Java" includeAttrib="true"/>
162 </context>
163
164 <context name="Jsp Expression" attribute="Normal Text" lineEndContext="#stay">
165 <DetectChar char="}" attribute="Jsp Expression" context="#pop"/>
166 <keyword String="jsp-reserved-words" attribute="Keyword" context="#stay"/>
167 <IncludeRules context="##Java" includeAttrib="true"/>
168 </context>
169
170 <context name="Html Attribute" attribute="Identifier" lineEndContext="#stay">
171 <RegExpr String="\/?&gt;" attribute="Normal Text" context="#pop"/>
172 <RegExpr String="\s*=\s*" attribute="Normal Text" context="Html Value"/>
173 <StringDetect String="&lt;%--" attribute="Jsp Comment" context="Jsp Comment" beginRegion="JspComment"/>
174 <RegExpr String="&lt;%(!|=)?" attribute="Jsp Scriptlet" context="Jsp Scriptlet" beginRegion="JspScriptlet"/>
175 <Detect2Chars char="$" char1="{" attribute="Jsp Expression" context="Jsp Expression"/>
176 </context>
177
178 <context name="Html Value" attribute="Types" lineEndContext="#stay">
179 <StringDetect String="&lt;%--" attribute="Jsp Comment" context="Jsp Comment" beginRegion="JspComment"/>
180 <RegExpr String="&lt;%(!|=)?" attribute="Jsp Scriptlet" context="Jsp Scriptlet" beginRegion="JspScriptlet"/>
181 <Detect2Chars char="$" char1="{" attribute="Jsp Expression" context="Jsp Expression"/>
182 <RegExpr String="&lt;\s*\/?\s*\$?\w*:\$?\w*" attribute="Keyword" context="Jsp Custom Tag"/>
183 <RegExpr String="(&quot;|&amp;quot;|&amp;#34;)" attribute="Types" context="Html Double Quoted Value"/>
184 <RegExpr String="('|&amp;#39;)" attribute="Types" context="Html Single Quoted Value"/>
185 <RegExpr String="\s*#?-?_?\.?[a-zA-Z0-9]*" attribute="Types" context="Html Unquoted Value"/>
186 <RegExpr String="\/?&gt;" attribute="Normal Text" context="#pop#pop"/>
187 </context>
188
189 <context name="Html Double Quoted Value" attribute="Types" lineEndContext="#stay">
190 <StringDetect String="&lt;%--" attribute="Jsp Comment" context="Jsp Comment" beginRegion="JspComment"/>
191 <RegExpr String="&lt;%(!|=)?" attribute="Jsp Scriptlet" context="Jsp Scriptlet" beginRegion="JspScriptlet"/>
192 <Detect2Chars char="$" char1="{" attribute="Jsp Expression" context="Jsp Expression"/>
193 <RegExpr String="&lt;\s*\/?\s*\$?\w*:\$?\w*" attribute="Keyword" context="Jsp Custom Tag"/>
194 <RegExpr String="(&quot;|&amp;quot;|&amp;#34;)" attribute="Types" context="#pop#pop"/>
195 </context>
196
197 <context name="Html Single Quoted Value" attribute="Types" lineEndContext="#stay">
198 <StringDetect String="&lt;%--" attribute="Jsp Comment" context="Jsp Comment" beginRegion="JspComment"/>
199 <RegExpr String="&lt;%(!|=)?" attribute="Jsp Scriptlet" context="Jsp Scriptlet" beginRegion="JspScriptlet"/>
200 <Detect2Chars char="$" char1="{" attribute="Jsp Expression" context="Jsp Expression"/>
201 <RegExpr String="&lt;\s*\/?\s*\$?\w*:\$?\w*" attribute="Keyword" context="Jsp Custom Tag"/>
202 <RegExpr String="('|&amp;#39;)" attribute="Types" context="#pop#pop"/>
203 </context>
204
205 <context name="Html Unquoted Value" attribute="Types" lineEndContext="#stay">
206 <StringDetect String="&lt;%--" attribute="Jsp Comment" context="Jsp Comment" beginRegion="JspComment"/>
207 <RegExpr String="&lt;%(!|=)?" attribute="Jsp Scriptlet" context="Jsp Scriptlet" beginRegion="JspScriptlet"/>
208 <Detect2Chars char="$" char1="{" attribute="Jsp Expression" context="Jsp Expression"/>
209 <RegExpr String="&lt;\s*\/?\s*\$?\w*:\$?\w*" attribute="Keyword" context="Jsp Custom Tag"/>
210 <RegExpr String="\/?&gt;" attribute="Normal Text" context="#pop#pop#pop"/>
211 <DetectSpaces attribute="Types" context="#pop#pop"/>
212 </context>
213
214 <context name="Html Comment" attribute="Html Comment" lineEndContext="#stay">
215 <StringDetect String="&lt;%--" attribute="Jsp Comment" context="Jsp Comment" beginRegion="JspComment"/>
216 <RegExpr String="&lt;%(!|=)?" attribute="Jsp Scriptlet" context="Jsp Scriptlet" beginRegion="JspScriptlet"/>
217 <Detect2Chars char="$" char1="{" attribute="Jsp Expression" context="Jsp Expression"/>
218 <RegExpr String="\/*--&gt;" attribute="Html Comment" context="#pop" endRegion="HtmlComment"/>
219 <IncludeRules context="##Comments" />
220 </context>
221
222 </contexts>
223
224
225 <itemDatas>
226 <itemData name="Normal Text" defStyleNum="dsNormal"/>
227 <itemData name="Keyword" defStyleNum="dsKeyword"/>
228 <itemData name="Identifier" defStyleNum="dsOthers"/>
229 <itemData name="Types" defStyleNum="dsDataType"/>
230
231 <itemData name="Html Comment" defStyleNum="dsComment"/>
232
233 <itemData name="Jsp Directive" defStyleNum="dsBuiltIn" bold="true" italic="true"/>
234 <itemData name="Jsp Scriptlet" defStyleNum="dsPreprocessor" bold="true" italic="false"/>
235 <itemData name="Jsp Expression" defStyleNum="dsPreprocessor" bold="true" italic="false"/>
236 <itemData name="Jsp Comment" defStyleNum="dsComment"/>
237
238 <itemData name="Jsp Param Name" defStyleNum="dsOthers"/>
239 <itemData name="Jsp Param Value" defStyleNum="dsString"/>
240 </itemDatas>
241 </highlighting>
242
243 <general>
244 <comments>
245 <comment name="multiLine" start="&lt;%--" end="--%&gt;" region="JspComment" />
246 </comments>
247 <keywords casesensitive="1" />
248 </general>
249 </language>
250 <!-- kate: replace-tabs on; tab-width 2; indent-width 2; -->