| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<!DOCTYPE language |
| 3 |
[ |
| 4 |
<!-- names must start with a letter, ideogram or underscore. \w matches any |
| 5 |
word character *or* a number, hence the lookahead --> |
| 6 |
<!ENTITY name "(?![0-9])[\w_:][\w.:_-]*"> |
| 7 |
<!ENTITY entref "&(?:#[0-9]+|#[xX][0-9A-Fa-f]+|&name;);"> |
| 8 |
]> |
| 9 |
<language name="XML" version="20" kateversion="5.0" section="Markup" extensions="*.page;*.docbook;*.xml;*ui.rc;*.daml;*.rdf;*.rss;*.xspf;*.xsd;*.svg;*.ui;*.kcfg;*.qrc;*.wsdl;*.scxml;*.xbel;*.dae;*.sch;*.brd" mimetype="text/xml;text/book;text/daml;text/rdf;application/rss+xml;application/xspf+xml;image/svg+xml;application/x-designer;application/x-xbel;application/xml;application/scxml+xml;application/vnd.oasis.opendocument.text-flat-xml;application/vnd.oasis.opendocument.graphics-flat-xml;application/vnd.oasis.opendocument.presentation-flat-xml;application/vnd.oasis.opendocument.spreadsheet-flat-xml;application/gpx+xml" casesensitive="1" indenter="xml" author="Wilbert Berendsen ([email protected])" license="LGPL"> |
| 10 |
|
| 11 |
<highlighting> |
| 12 |
<contexts> |
| 13 |
<context name="Start" attribute="Normal Text" lineEndContext="#stay"> |
| 14 |
<IncludeRules context="FindXML" /> |
| 15 |
</context> |
| 16 |
|
| 17 |
<context name="FindXML" attribute="Normal Text" lineEndContext="#stay"> |
| 18 |
<DetectSpaces /> |
| 19 |
<DetectIdentifier /> |
| 20 |
<RegExpr attribute="Element Symbols" context="ElementTagName" String="<(?=(&name;))" beginRegion="element" /> |
| 21 |
<StringDetect attribute="Comment" context="Comment" String="<!--" beginRegion="comment" /> |
| 22 |
<StringDetect attribute="CDATA" context="CDATAStart" String="<![CDATA[" lookAhead="true" /> |
| 23 |
<RegExpr attribute="Doctype Symbols" context="DoctypeTagName" String="<!(?=DOCTYPE(\s|$))" beginRegion="doctype" /> |
| 24 |
<IncludeRules context="FindProcessingInstruction" /> |
| 25 |
<IncludeRules context="FindEntityRefs" /> |
| 26 |
</context> |
| 27 |
|
| 28 |
<context name="FindEntityRefs" attribute="Other Text" lineEndContext="#stay"> |
| 29 |
<RegExpr attribute="EntityRef" context="#stay" String="&entref;" /> |
| 30 |
<AnyChar attribute="Error" context="#stay" String="&<" /> |
| 31 |
</context> |
| 32 |
|
| 33 |
<context name="FindPEntityRefs" attribute="Other Text" lineEndContext="#stay"> |
| 34 |
<RegExpr attribute="EntityRef" context="#stay" String="&entref;" /> |
| 35 |
<RegExpr attribute="PEntityRef" context="#stay" String="%&name;;" /> |
| 36 |
<AnyChar attribute="Error" context="#stay" String="&%<" /> |
| 37 |
</context> |
| 38 |
|
| 39 |
|
| 40 |
<context name="Comment" attribute="Comment" lineEndContext="#stay"> |
| 41 |
<DetectSpaces /> |
| 42 |
<StringDetect attribute="Comment" context="#pop" String="-->" endRegion="comment" /> |
| 43 |
<RegExpr attribute="Error" context="#stay" String="-(?:\-(?!->))+" /> |
| 44 |
<IncludeRules context="##Comments" /> |
| 45 |
<DetectIdentifier /> |
| 46 |
</context> |
| 47 |
|
| 48 |
<context name="CDATAStart" attribute="Other Text" lineEndContext="#pop"> |
| 49 |
<StringDetect attribute="CDATA Symbols" context="#stay" String="<![" beginRegion="cdata" /> |
| 50 |
<StringDetect attribute="CDATA" context="#stay" String="CDATA" /> |
| 51 |
<DetectChar attribute="CDATA Symbols" context="#pop!CDATA" char="[" /> |
| 52 |
</context> |
| 53 |
<context name="CDATA" attribute="Other Text" lineEndContext="#stay"> |
| 54 |
<DetectSpaces /> |
| 55 |
<DetectIdentifier /> |
| 56 |
<StringDetect attribute="CDATA Symbols" context="#pop" String="]]>" endRegion="cdata" /> |
| 57 |
<StringDetect attribute="EntityRef" context="#stay" String="]]&gt;" /> |
| 58 |
</context> |
| 59 |
|
| 60 |
<context name="FindProcessingInstruction" attribute="Other Text" lineEndContext="#stay"> |
| 61 |
<RegExpr attribute="PI Symbols" context="PI TagName" String="<\?(?=([\w:_-]*))" beginRegion="pi" /> |
| 62 |
</context> |
| 63 |
<context name="PI TagName" attribute="Other Text" lineEndContext="#pop!PI" fallthrough="true" fallthroughContext="#pop!PI"> |
| 64 |
<RegExpr attribute="Processing Instruction" context="#pop!PI-XML" String="xml(?=\s|$)" insensitive="true" /> |
| 65 |
<StringDetect attribute="Processing Instruction" context="#pop!PI" String="%1" dynamic="true" /> |
| 66 |
</context> |
| 67 |
<context name="PI" attribute="Other Text" lineEndContext="#stay"> |
| 68 |
<Detect2Chars attribute="PI Symbols" context="#pop" char="?" char1=">" endRegion="pi" /> |
| 69 |
</context> |
| 70 |
<context name="PI-XML" attribute="Other Text" lineEndContext="#stay"> |
| 71 |
<IncludeRules context="PI" /> |
| 72 |
<RegExpr attribute="Attribute" context="#stay" String="(?:^|\s+)&name;" /> |
| 73 |
<DetectChar attribute="Attribute Separator" context="Value" char="=" /> |
| 74 |
</context> |
| 75 |
|
| 76 |
<context name="DoctypeTagName" attribute="Other Text" lineEndContext="#pop"> |
| 77 |
<StringDetect attribute="Doctype" context="#pop!DoctypeVariableName" String="DOCTYPE" /> |
| 78 |
</context> |
| 79 |
<context name="DoctypeVariableName" attribute="Other Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop!Doctype"> |
| 80 |
<DetectSpaces /> |
| 81 |
<RegExpr attribute="Doctype Name" context="#pop!Doctype" String="&name;" /> |
| 82 |
</context> |
| 83 |
<context name="Doctype" attribute="Other Text" lineEndContext="#stay"> |
| 84 |
<DetectChar attribute="Doctype Symbols" context="#pop" char=">" endRegion="doctype" /> |
| 85 |
<DetectChar attribute="Doctype Symbols" context="Doctype Internal Subset" char="[" beginRegion="int_subset" /> |
| 86 |
</context> |
| 87 |
|
| 88 |
<context name="Doctype Internal Subset" attribute="Other Text" lineEndContext="#stay"> |
| 89 |
<DetectSpaces /> |
| 90 |
<DetectChar attribute="Doctype Symbols" context="#pop" char="]" endRegion="int_subset" /> |
| 91 |
<RegExpr attribute="Doctype Symbols" context="Doctype Markupdecl TagName" String="<!(?=(ELEMENT|ENTITY|ATTLIST|NOTATION)\b)" /> |
| 92 |
<StringDetect attribute="Comment" context="Comment" String="<!--" beginRegion="comment" /> |
| 93 |
<IncludeRules context="FindProcessingInstruction" /> |
| 94 |
<IncludeRules context="FindPEntityRefs" /> |
| 95 |
</context> |
| 96 |
|
| 97 |
<context name="Doctype Markupdecl TagName" attribute="Other Text" lineEndContext="#pop"> |
| 98 |
<DetectIdentifier attribute="Doctype" context="#pop!Doctype Markupdecl VariableName" /> |
| 99 |
</context> |
| 100 |
<context name="Doctype Markupdecl VariableName" attribute="Other Text" lineEndContext="#pop!Doctype Markupdecl" fallthrough="true" fallthroughContext="#pop!Doctype Markupdecl"> |
| 101 |
<DetectSpaces /> |
| 102 |
<RegExpr attribute="Doctype Name" context="#pop!Doctype Markupdecl" String="&name;" /> |
| 103 |
</context> |
| 104 |
<context name="Doctype Markupdecl" attribute="Other Text" lineEndContext="#stay"> |
| 105 |
<DetectChar attribute="Doctype Symbols" context="#pop" char=">" /> |
| 106 |
<DetectChar attribute="Value" context="Doctype Markupdecl DQ" char=""" /> |
| 107 |
<DetectChar attribute="Value" context="Doctype Markupdecl SQ" char="'" /> |
| 108 |
</context> |
| 109 |
|
| 110 |
<context name="Doctype Markupdecl DQ" attribute="Value" lineEndContext="#stay"> |
| 111 |
<DetectChar attribute="Value" context="#pop" char=""" /> |
| 112 |
<IncludeRules context="FindPEntityRefs" /> |
| 113 |
</context> |
| 114 |
|
| 115 |
<context name="Doctype Markupdecl SQ" attribute="Value" lineEndContext="#stay"> |
| 116 |
<DetectChar attribute="Value" context="#pop" char="'" /> |
| 117 |
<IncludeRules context="FindPEntityRefs" /> |
| 118 |
</context> |
| 119 |
|
| 120 |
<context name="ElementTagName" attribute="Other Text" lineEndContext="#pop!Element"> |
| 121 |
<StringDetect attribute="Element" context="#pop!Element" String="%1" dynamic="true" /> |
| 122 |
</context> |
| 123 |
<context name="Element" attribute="Other Text" lineEndContext="#stay"> |
| 124 |
<Detect2Chars attribute="Element Symbols" context="#pop" char="/" char1=">" endRegion="element" /> |
| 125 |
<DetectChar attribute="Element Symbols" context="El Content" char=">" /> |
| 126 |
<RegExpr attribute="Attribute" context="Attribute" String="(?:^|\s+)&name;" /> |
| 127 |
<RegExpr attribute="Error" context="#stay" String="\S" /> |
| 128 |
</context> |
| 129 |
|
| 130 |
<context name="El Content" attribute="Other Text" lineEndContext="#stay"> |
| 131 |
<RegExpr attribute="Element Symbols" context="El End TagName" String="</(?=(&name;))" /> |
| 132 |
<IncludeRules context="FindXML" /> |
| 133 |
</context> |
| 134 |
|
| 135 |
<context name="El End TagName" attribute="Other Text" lineEndContext="#pop!El End"> |
| 136 |
<StringDetect attribute="Element" context="#pop!El End" String="%1" dynamic="true" /> |
| 137 |
</context> |
| 138 |
<context name="El End" attribute="Other Text" lineEndContext="#stay"> |
| 139 |
<DetectChar attribute="Element Symbols" context="#pop#pop#pop" char=">" endRegion="element" /> |
| 140 |
<RegExpr attribute="Error" context="#stay" String="\S" /> |
| 141 |
</context> |
| 142 |
|
| 143 |
<context name="Attribute" attribute="Other Text" lineEndContext="#stay"> |
| 144 |
<DetectChar attribute="Attribute Separator" context="#pop!Value" char="=" /> |
| 145 |
<RegExpr attribute="Error" context="#stay" String="\S" /> |
| 146 |
</context> |
| 147 |
|
| 148 |
<context name="Value" attribute="Other Text" lineEndContext="#stay"> |
| 149 |
<DetectChar attribute="Value" context="Value DQ" char=""" /> |
| 150 |
<DetectChar attribute="Value" context="Value SQ" char="'" /> |
| 151 |
<RegExpr attribute="Error" context="#stay" String="\S" /> |
| 152 |
</context> |
| 153 |
|
| 154 |
<context name="Value DQ" attribute="Value" lineEndContext="#stay"> |
| 155 |
<DetectChar attribute="Value" context="#pop#pop" char=""" /> |
| 156 |
<IncludeRules context="FindEntityRefs" /> |
| 157 |
</context> |
| 158 |
|
| 159 |
<context name="Value SQ" attribute="Value" lineEndContext="#stay"> |
| 160 |
<DetectChar attribute="Value" context="#pop#pop" char="'" /> |
| 161 |
<IncludeRules context="FindEntityRefs" /> |
| 162 |
</context> |
| 163 |
|
| 164 |
</contexts> |
| 165 |
<itemDatas> |
| 166 |
<itemData name="Normal Text" defStyleNum="dsNormal" /> |
| 167 |
<itemData name="Other Text" defStyleNum="dsNormal" /> |
| 168 |
<itemData name="Comment" defStyleNum="dsComment" spellChecking="true" /> |
| 169 |
<itemData name="CDATA" defStyleNum="dsBaseN" bold="1" italic="0" spellChecking="false" /> |
| 170 |
<itemData name="CDATA Symbols" defStyleNum="dsBaseN" bold="0" italic="0" spellChecking="false" /> |
| 171 |
<itemData name="Processing Instruction" defStyleNum="dsFunction" bold="1" italic="0" spellChecking="false" /> |
| 172 |
<itemData name="PI Symbols" defStyleNum="dsFunction" bold="0" italic="0" spellChecking="false" /> |
| 173 |
<itemData name="Doctype" defStyleNum="dsDataType" bold="1" italic="0" spellChecking="false" /> |
| 174 |
<itemData name="Doctype Name" defStyleNum="dsDataType" bold="0" italic="0" spellChecking="false" /> |
| 175 |
<itemData name="Doctype Symbols" defStyleNum="dsDataType" bold="0" italic="0" spellChecking="false" /> |
| 176 |
<itemData name="Element" defStyleNum="dsKeyword" spellChecking="false" /> |
| 177 |
<itemData name="Element Symbols" defStyleNum="dsNormal" spellChecking="false" /> |
| 178 |
<itemData name="Attribute" defStyleNum="dsOthers" spellChecking="false" /> |
| 179 |
<itemData name="Attribute Separator" defStyleNum="dsOthers" spellChecking="false" /> |
| 180 |
<itemData name="Value" defStyleNum="dsString" spellChecking="false" /> |
| 181 |
<itemData name="EntityRef" defStyleNum="dsDecVal" spellChecking="false" /> |
| 182 |
<itemData name="PEntityRef" defStyleNum="dsDecVal" spellChecking="false" /> |
| 183 |
<itemData name="Error" defStyleNum="dsError" spellChecking="false" /> |
| 184 |
</itemDatas> |
| 185 |
|
| 186 |
</highlighting> |
| 187 |
<general> |
| 188 |
<comments> |
| 189 |
<comment name="multiLine" start="<!--" end="-->" region="comment" /> |
| 190 |
</comments> |
| 191 |
</general> |
| 192 |
</language> |
| 193 |
<!-- kate: replace-tabs on; tab-width 2; indent-width 2; --> |