1<?xml version="1.0" encoding="UTF-8"?> 2<!DOCTYPE language SYSTEM "language.dtd"> 3<language version="5" kateversion="5.0" name="JSP" section="Markup" extensions="*.jsp;*.JSP" mimetype="text/html" casesensitive="false" author="Rob Martin (rob@gamepimp.com)" 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="<%@\s*[a-zA-Z0-9_\.]*" attribute="Jsp Directive" context="Jsp Standard Directive"/> 28 <RegExpr String="<\s*jsp:(declaration|expression|scriptlet)\s*>" attribute="Jsp Scriptlet" context="Jsp Scriptlet"/> 29 <RegExpr String="<\s*\/?s*jsp:[a-zA-Z0-9_\.]*" attribute="Jsp Directive" context="Jsp Xml Directive"/> 30 <StringDetect String="<%--" attribute="Jsp Comment" context="Jsp Comment"/> 31 <RegExpr String="<%(!|=)?" attribute="Jsp Scriptlet" context="Jsp Scriptlet"/> 32 <StringDetect String="<!--" attribute="Html Comment" context="Html Comment"/> 33 <Detect2Chars char="$" char1="{" attribute="Jsp Expression" context="Jsp Expression"/> 34 <RegExpr String="<\s*\/?\s*\$?[a-zA-Z0-9_]*:\$?[a-zA-Z0-9_]*" attribute="Keyword" context="Jsp Custom Tag"/> 35 <StringDetect String="<![CDATA[" attribute="Normal Text" context="#stay"/> 36 <StringDetect String="]]>" attribute="Normal Text" context="#stay"/> 37 <RegExpr String="<script\b" attribute="Normal Text" context="JS" beginRegion="script" /> 38 <RegExpr String="<style\b" attribute="Normal Text" context="CSS" beginRegion="style" /> 39 <RegExpr String="<\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=">" /> 44 <Detect2Chars attribute="Normal Text" context="#pop" char="/" char1=">" 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="</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=">" /> 55 <Detect2Chars attribute="Normal Text" context="#pop" char="/" char1=">" 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="</script\b" endRegion="script" /> 61 <RegExpr attribute="Jsp Comment" context="JS comment close" String="//(?=.*</script)" /> 62 <IncludeRules context="Normal##JavaScript" includeAttrib="true"/> 63 </context> 64 <context name="JS comment close" attribute="Jsp Comment" lineEndContext="#stay"> 65 <DetectSpaces/> 66 <DetectIdentifier/> 67 <StringDetect attribute="Normal Text" context="#pop#pop#pop" String="</script" endRegion="script" /> 68 </context> 69 70 <context name="Jsp Standard Directive" attribute="Jsp Param Name" lineEndContext="#stay"> 71 <Detect2Chars char="%" char1=">" attribute="Jsp Directive" context="#pop"/> 72 <RegExpr String="\s*=\s*" attribute="Normal Text" context="Jsp Standard Directive Value"/> 73 <StringDetect String="<%--" attribute="Jsp Comment" context="Jsp Comment"/> 74 <RegExpr String="<%(!|=)?" attribute="Jsp Scriptlet" context="Jsp Scriptlet"/> 75 <Detect2Chars char="$" char1="{" attribute="Jsp Expression" context="Jsp Expression"/> 76 <RegExpr String="<\s*\/?\s*\$?\w*:\$?\w*" attribute="Keyword" context="Jsp Custom Tag"/> 77 </context> 78 79 <context name="Jsp Xml Directive" attribute="Jsp Param Name" lineEndContext="#stay"> 80 <RegExpr String="\s*\/?\s*>" attribute="Jsp Directive" context="#pop"/> 81 <RegExpr String="\s*=\s*" attribute="Normal Text" context="Jsp Xml Directive Value"/> 82 <StringDetect String="<%--" attribute="Jsp Comment" context="Jsp Comment"/> 83 <RegExpr String="<%(!|=)?" attribute="Jsp Scriptlet" context="Jsp Scriptlet"/> 84 <Detect2Chars char="$" char1="{" attribute="Jsp Expression" context="Jsp Expression"/> 85 </context> 86 87 <context name="Jsp Comment" attribute="Jsp Comment" lineEndContext="#stay"> 88 <StringDetect String="--%>" attribute="Jsp Comment" context="#pop"/> 89 </context> 90 91 <context name="Jsp Custom Tag" attribute="Identifier" lineEndContext="#stay"> 92 <RegExpr String="\/?>" attribute="Keyword" context="#pop"/> 93 <RegExpr String="\s*=\s*" attribute="Normal Text" context="Jsp Custom Tag Value"/> 94 <StringDetect String="<%--" attribute="Jsp Comment" context="Jsp Comment"/> 95 <RegExpr String="<%(!|=)?" attribute="Jsp Scriptlet" context="Jsp Scriptlet"/> 96 <Detect2Chars char="$" char1="{" attribute="Jsp Expression" context="Jsp Expression"/> 97 </context> 98 99 <context name="Jsp Standard Directive Value" attribute="Jsp Param Value" lineEndContext="#stay"> 100 <StringDetect String="<%--" attribute="Jsp Comment" context="Jsp Comment"/> 101 <RegExpr String="<%(!|=)?" attribute="Jsp Scriptlet" context="Jsp Scriptlet"/> 102 <Detect2Chars char="$" char1="{" attribute="Jsp Expression" context="Jsp Expression"/> 103 <DetectChar char=""" attribute="Jsp Param Value" context="Jsp Double Quoted Param Value"/> 104 <DetectChar char="'" attribute="Jsp Param Value" context="Jsp Single Quoted Param Value"/> 105 <Detect2Chars char="%" char1=">" attribute="Jsp Directive" context="#pop#pop"/> 106 </context> 107 108 <context name="Jsp Xml Directive Value" attribute="Jsp Param Value" lineEndContext="#stay"> 109 <StringDetect String="<%--" attribute="Jsp Comment" context="Jsp Comment"/> 110 <RegExpr String="<%(!|=)?" attribute="Jsp Scriptlet" context="Jsp Scriptlet"/> 111 <Detect2Chars char="$" char1="{" attribute="Jsp Expression" context="Jsp Expression"/> 112 <DetectChar char=""" attribute="Jsp Param Value" context="Jsp Double Quoted Param Value"/> 113 <DetectChar char="'" attribute="Jsp Param Value" context="Jsp Single Quoted Param Value"/> 114 <RegExpr String="\s*\/?\s*>" attribute="Jsp Directive" context="#pop#pop"/> 115 </context> 116 117 <context name="Jsp Custom Tag Value" attribute="Normal Text" lineEndContext="#stay"> 118 <StringDetect String="<%--" attribute="Jsp Comment" context="Jsp Comment"/> 119 <RegExpr String="<%(!|=)?" attribute="Jsp Scriptlet" context="Jsp Scriptlet"/> 120 <Detect2Chars char="$" char1="{" attribute="Jsp Expression" context="Jsp Expression"/> 121 <DetectChar char=""" attribute="Types" context="Jsp Double Quoted Custom Tag Value"/> 122 <DetectChar char="'" attribute="Types" context="Jsp Single Quoted Custom Tag Value"/> 123 <RegExpr String="\/?>" attribute="Normal Text" context="#pop#pop"/> 124 </context> 125 126 <context name="Jsp Double Quoted Param Value" attribute="Jsp Param Value" lineEndContext="#stay"> 127 <DetectChar char=""" attribute="Jsp Param Value" context="#pop#pop"/> 128 <StringDetect String="<%--" attribute="Jsp Comment" context="Jsp Comment"/> 129 <RegExpr String="<%(!|=)?" attribute="Jsp Scriptlet" context="Jsp Scriptlet"/> 130 <Detect2Chars char="$" char1="{" attribute="Jsp Expression" context="Jsp Expression"/> 131 </context> 132 133 <context name="Jsp Single Quoted Param Value" attribute="Jsp Param Value" lineEndContext="#stay"> 134 <DetectChar char="'" attribute="Jsp Param Value" context="#pop#pop"/> 135 <StringDetect String="<%--" attribute="Jsp Comment" context="Jsp Comment"/> 136 <RegExpr String="<%(!|=)?" attribute="Jsp Scriptlet" context="Jsp Scriptlet"/> 137 <Detect2Chars char="$" char1="{" attribute="Jsp Expression" context="Jsp Expression"/> 138 </context> 139 140 <context name="Jsp Double Quoted Custom Tag Value" attribute="Types" lineEndContext="#stay"> 141 <DetectChar char=""" attribute="Types" context="#pop#pop"/> 142 <StringDetect String="<%--" attribute="Jsp Comment" context="Jsp Comment"/> 143 <RegExpr String="<%(!|=)?" attribute="Jsp Scriptlet" context="Jsp Scriptlet"/> 144 <Detect2Chars char="$" char1="{" attribute="Jsp Expression" context="Jsp Expression"/> 145 </context> 146 147 <context name="Jsp Single Quoted Custom Tag Value" attribute="Types" lineEndContext="#stay"> 148 <DetectChar char="'" attribute="Types" context="#pop#pop"/> 149 <StringDetect String="<%--" attribute="Jsp Comment" context="Jsp Comment"/> 150 <RegExpr String="<%(!|=)?" attribute="Jsp Scriptlet" context="Jsp Scriptlet"/> 151 <Detect2Chars char="$" char1="{" attribute="Jsp Expression" context="Jsp Expression"/> 152 </context> 153 154 <context name="Jsp Scriptlet" attribute="Normal Text" lineEndContext="#stay"> 155 <Detect2Chars char="%" char1=">" attribute="Jsp Scriptlet" context="#pop"/> 156 <RegExpr String="<\s*jsp:(declaration|expression|scriptlet)\s*>" attribute="Jsp Scriptlet" context="Jsp Scriptlet"/> 157 <keyword String="jsp-reserved-words" attribute="Keyword" context="#stay"/> 158 <IncludeRules context="##Java" includeAttrib="true"/> 159 </context> 160 161 <context name="Jsp Expression" attribute="Normal Text" lineEndContext="#stay"> 162 <DetectChar char="}" attribute="Jsp Expression" context="#pop"/> 163 <keyword String="jsp-reserved-words" attribute="Keyword" context="#stay"/> 164 <IncludeRules context="##Java" includeAttrib="true"/> 165 </context> 166 167 <context name="Html Attribute" attribute="Identifier" lineEndContext="#stay"> 168 <RegExpr String="\/?>" attribute="Normal Text" context="#pop"/> 169 <RegExpr String="\s*=\s*" attribute="Normal Text" context="Html Value"/> 170 <StringDetect String="<%--" attribute="Jsp Comment" context="Jsp Comment"/> 171 <RegExpr String="<%(!|=)?" attribute="Jsp Scriptlet" context="Jsp Scriptlet"/> 172 <Detect2Chars char="$" char1="{" attribute="Jsp Expression" context="Jsp Expression"/> 173 </context> 174 175 <context name="Html Value" attribute="Types" lineEndContext="#stay"> 176 <StringDetect String="<%--" attribute="Jsp Comment" context="Jsp Comment"/> 177 <RegExpr String="<%(!|=)?" attribute="Jsp Scriptlet" context="Jsp Scriptlet"/> 178 <Detect2Chars char="$" char1="{" attribute="Jsp Expression" context="Jsp Expression"/> 179 <RegExpr String="<\s*\/?\s*\$?\w*:\$?\w*" attribute="Keyword" context="Jsp Custom Tag"/> 180 <RegExpr String="("|&quot;|&#34;)" attribute="Types" context="Html Double Quoted Value"/> 181 <RegExpr String="('|&#39;)" attribute="Types" context="Html Single Quoted Value"/> 182 <RegExpr String="\s*#?-?_?\.?[a-zA-Z0-9]*" attribute="Types" context="Html Unquoted Value"/> 183 <RegExpr String="\/?>" attribute="Normal Text" context="#pop#pop"/> 184 </context> 185 186 <context name="Html Double Quoted Value" attribute="Types" lineEndContext="#stay"> 187 <StringDetect String="<%--" attribute="Jsp Comment" context="Jsp Comment"/> 188 <RegExpr String="<%(!|=)?" attribute="Jsp Scriptlet" context="Jsp Scriptlet"/> 189 <Detect2Chars char="$" char1="{" attribute="Jsp Expression" context="Jsp Expression"/> 190 <RegExpr String="<\s*\/?\s*\$?\w*:\$?\w*" attribute="Keyword" context="Jsp Custom Tag"/> 191 <RegExpr String="("|&quot;|&#34;)" attribute="Types" context="#pop#pop"/> 192 </context> 193 194 <context name="Html Single Quoted Value" attribute="Types" lineEndContext="#stay"> 195 <StringDetect String="<%--" attribute="Jsp Comment" context="Jsp Comment"/> 196 <RegExpr String="<%(!|=)?" attribute="Jsp Scriptlet" context="Jsp Scriptlet"/> 197 <Detect2Chars char="$" char1="{" attribute="Jsp Expression" context="Jsp Expression"/> 198 <RegExpr String="<\s*\/?\s*\$?\w*:\$?\w*" attribute="Keyword" context="Jsp Custom Tag"/> 199 <RegExpr String="('|&#39;)" attribute="Types" context="#pop#pop"/> 200 </context> 201 202 <context name="Html Unquoted Value" attribute="Types" lineEndContext="#stay"> 203 <StringDetect String="<%--" attribute="Jsp Comment" context="Jsp Comment"/> 204 <RegExpr String="<%(!|=)?" attribute="Jsp Scriptlet" context="Jsp Scriptlet"/> 205 <Detect2Chars char="$" char1="{" attribute="Jsp Expression" context="Jsp Expression"/> 206 <RegExpr String="<\s*\/?\s*\$?\w*:\$?\w*" attribute="Keyword" context="Jsp Custom Tag"/> 207 <RegExpr String="\/?>" attribute="Normal Text" context="#pop#pop#pop"/> 208 <RegExpr String="\s+" attribute="Types" context="#pop#pop"/> 209 </context> 210 211 <context name="Html Comment" attribute="Html Comment" lineEndContext="#stay"> 212 <StringDetect String="<%--" attribute="Jsp Comment" context="Jsp Comment"/> 213 <RegExpr String="<%(!|=)?" attribute="Jsp Scriptlet" context="Jsp Scriptlet"/> 214 <Detect2Chars char="$" char1="{" attribute="Jsp Expression" context="Jsp Expression"/> 215 <RegExpr String="\/*-->" attribute="Html Comment" context="#pop"/> 216 </context> 217 218 </contexts> 219 220 221 <itemDatas> 222 <itemData name="Normal Text" defStyleNum="dsNormal"/> 223 <itemData name="Keyword" defStyleNum="dsKeyword"/> 224 <itemData name="Identifier" defStyleNum="dsOthers"/> 225 <itemData name="Types" defStyleNum="dsDataType"/> 226 227 <itemData name="Html Comment" defStyleNum="dsComment"/> 228 229 <itemData name="Jsp Directive" defStyleNum="dsBuiltIn" bold="true" italic="true"/> 230 <itemData name="Jsp Scriptlet" defStyleNum="dsPreprocessor" bold="true" italic="false"/> 231 <itemData name="Jsp Expression" defStyleNum="dsPreprocessor" bold="true" italic="false"/> 232 <itemData name="Jsp Comment" defStyleNum="dsComment"/> 233 234 <itemData name="Jsp Param Name" defStyleNum="dsOthers"/> 235 <itemData name="Jsp Param Value" defStyleNum="dsString"/> 236 </itemDatas> 237 </highlighting> 238 239 <general> 240 <comments> 241 <comment name="multiLine" start="<%-- " end=" --%>" /> 242 </comments> 243 <keywords casesensitive="1" /> 244 </general> 245</language> 246