Changeset View
Changeset View
Standalone View
Standalone View
data/syntax/xml.xml
1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
---|---|---|---|---|---|
2 | <!DOCTYPE language SYSTEM "language.dtd" | 2 | <!DOCTYPE language SYSTEM "language.dtd" | ||
3 | [ | 3 | [ | ||
4 | <!-- names must start with a letter, ideogram or underscore. \w matches any | 4 | <!-- names must start with a letter, ideogram or underscore. \w matches any | ||
5 | word character *or* a number, hence the lookahead --> | 5 | word character *or* a number, hence the lookahead --> | ||
6 | <!ENTITY name "(?![0-9])[\w_:][\w.:_-]*"> | 6 | <!ENTITY name "(?![0-9])[\w_:][\w.:_-]*"> | ||
7 | <!ENTITY entref "&(#[0-9]+|#[xX][0-9A-Fa-f]+|&name;);"> | 7 | <!ENTITY entref "&(?:#[0-9]+|#[xX][0-9A-Fa-f]+|&name;);"> | ||
8 | ]> | 8 | ]> | ||
9 | <language name="XML" version="9" kateversion="3.4" section="Markup" extensions="*.docbook;*.xml;*.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" casesensitive="1" indenter="xml" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL"> | 9 | <language name="XML" version="10" kateversion="3.4" section="Markup" extensions="*.docbook;*.xml;*.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" casesensitive="1" indenter="xml" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL"> | ||
10 | 10 | | |||
11 | <highlighting> | 11 | <highlighting> | ||
12 | <contexts> | 12 | <contexts> | ||
13 | <context name="Start" attribute="Normal Text" lineEndContext="#stay"> | 13 | <context name="Start" attribute="Normal Text" lineEndContext="#stay"> | ||
14 | <IncludeRules context="FindXML" /> | 14 | <IncludeRules context="FindXML" /> | ||
15 | </context> | 15 | </context> | ||
16 | 16 | | |||
17 | <context name="FindXML" attribute="Normal Text" lineEndContext="#stay"> | 17 | <context name="FindXML" attribute="Normal Text" lineEndContext="#stay"> | ||
Show All 17 Lines | 33 | <context name="FindPEntityRefs" attribute="Other Text" lineEndContext="#stay"> | |||
35 | <RegExpr attribute="PEntityRef" context="#stay" String="%&name;;" /> | 35 | <RegExpr attribute="PEntityRef" context="#stay" String="%&name;;" /> | ||
36 | <AnyChar attribute="Error" context="#stay" String="&%" /> | 36 | <AnyChar attribute="Error" context="#stay" String="&%" /> | ||
37 | </context> | 37 | </context> | ||
38 | 38 | | |||
39 | 39 | | |||
40 | <context name="Comment" attribute="Comment" lineEndContext="#stay"> | 40 | <context name="Comment" attribute="Comment" lineEndContext="#stay"> | ||
41 | <DetectSpaces /> | 41 | <DetectSpaces /> | ||
42 | <StringDetect attribute="Comment" context="#pop" String="-->" endRegion="comment" /> | 42 | <StringDetect attribute="Comment" context="#pop" String="-->" endRegion="comment" /> | ||
43 | <RegExpr attribute="Error" context="#stay" String="-(-(?!->))+" /> | 43 | <RegExpr attribute="Error" context="#stay" String="-(?:\-(?!->))+" /> | ||
44 | <IncludeRules context="##Alerts" /> | 44 | <IncludeRules context="##Alerts" /> | ||
45 | <IncludeRules context="##Modelines" /> | ||||
45 | <DetectIdentifier /> | 46 | <DetectIdentifier /> | ||
46 | </context> | 47 | </context> | ||
47 | 48 | | |||
48 | <context name="CDATA" attribute="Other Text" lineEndContext="#stay"> | 49 | <context name="CDATA" attribute="Other Text" lineEndContext="#stay"> | ||
49 | <DetectSpaces /> | 50 | <DetectSpaces /> | ||
50 | <DetectIdentifier /> | 51 | <DetectIdentifier /> | ||
51 | <StringDetect attribute="CDATA" context="#pop" String="]]>" endRegion="cdata" /> | 52 | <StringDetect attribute="CDATA" context="#pop" String="]]>" endRegion="cdata" /> | ||
52 | <StringDetect attribute="EntityRef" context="#stay" String="]]&gt;" /> | 53 | <StringDetect attribute="EntityRef" context="#stay" String="]]&gt;" /> | ||
53 | </context> | 54 | </context> | ||
54 | 55 | | |||
55 | <context name="PI" attribute="Other Text" lineEndContext="#stay"> | 56 | <context name="PI" attribute="Other Text" lineEndContext="#stay"> | ||
56 | <Detect2Chars attribute="Processing Instruction" context="#pop" char="?" char1=">" endRegion="pi" /> | 57 | <Detect2Chars attribute="Processing Instruction" context="#pop" char="?" char1=">" endRegion="pi" /> | ||
57 | </context> | 58 | </context> | ||
58 | 59 | | |||
59 | <context name="Doctype" attribute="Other Text" lineEndContext="#stay"> | 60 | <context name="Doctype" attribute="Other Text" lineEndContext="#stay"> | ||
60 | <DetectChar attribute="Doctype" context="#pop" char=">" endRegion="doctype" /> | 61 | <DetectChar attribute="Doctype" context="#pop" char=">" endRegion="doctype" /> | ||
61 | <DetectChar attribute="Doctype" context="Doctype Internal Subset" char="[" beginRegion="int_subset" /> | 62 | <DetectChar attribute="Doctype" context="Doctype Internal Subset" char="[" beginRegion="int_subset" /> | ||
62 | </context> | 63 | </context> | ||
63 | 64 | | |||
64 | <context name="Doctype Internal Subset" attribute="Other Text" lineEndContext="#stay"> | 65 | <context name="Doctype Internal Subset" attribute="Other Text" lineEndContext="#stay"> | ||
65 | <DetectChar attribute="Doctype" context="#pop" char="]" endRegion="int_subset" /> | 66 | <DetectChar attribute="Doctype" context="#pop" char="]" endRegion="int_subset" /> | ||
66 | <RegExpr attribute="Doctype" context="Doctype Markupdecl" String="<!(ELEMENT|ENTITY|ATTLIST|NOTATION)\b" /> | 67 | <RegExpr attribute="Doctype" context="Doctype Markupdecl" String="<!(?:ELEMENT|ENTITY|ATTLIST|NOTATION)\b" /> | ||
67 | <StringDetect attribute="Comment" context="Comment" String="<!--" beginRegion="comment" /> | 68 | <StringDetect attribute="Comment" context="Comment" String="<!--" beginRegion="comment" /> | ||
68 | <RegExpr attribute="Processing Instruction" context="PI" String="<\?[\w:_-]*" beginRegion="pi" /> | 69 | <RegExpr attribute="Processing Instruction" context="PI" String="<\?[\w:_-]*" beginRegion="pi" /> | ||
69 | <IncludeRules context="FindPEntityRefs" /> | 70 | <IncludeRules context="FindPEntityRefs" /> | ||
70 | </context> | 71 | </context> | ||
71 | 72 | | |||
72 | <context name="Doctype Markupdecl" attribute="Other Text" lineEndContext="#stay"> | 73 | <context name="Doctype Markupdecl" attribute="Other Text" lineEndContext="#stay"> | ||
73 | <DetectChar attribute="Doctype" context="#pop" char=">" /> | 74 | <DetectChar attribute="Doctype" context="#pop" char=">" /> | ||
74 | <DetectChar attribute="Value" context="Doctype Markupdecl DQ" char=""" /> | 75 | <DetectChar attribute="Value" context="Doctype Markupdecl DQ" char=""" /> | ||
75 | <DetectChar attribute="Value" context="Doctype Markupdecl SQ" char="'" /> | 76 | <DetectChar attribute="Value" context="Doctype Markupdecl SQ" char="'" /> | ||
76 | </context> | 77 | </context> | ||
77 | 78 | | |||
78 | <context name="Doctype Markupdecl DQ" attribute="Value" lineEndContext="#stay"> | 79 | <context name="Doctype Markupdecl DQ" attribute="Value" lineEndContext="#stay"> | ||
79 | <DetectChar attribute="Value" context="#pop" char=""" /> | 80 | <DetectChar attribute="Value" context="#pop" char=""" /> | ||
80 | <IncludeRules context="FindPEntityRefs" /> | 81 | <IncludeRules context="FindPEntityRefs" /> | ||
81 | </context> | 82 | </context> | ||
82 | 83 | | |||
83 | <context name="Doctype Markupdecl SQ" attribute="Value" lineEndContext="#stay"> | 84 | <context name="Doctype Markupdecl SQ" attribute="Value" lineEndContext="#stay"> | ||
84 | <DetectChar attribute="Value" context="#pop" char="'" /> | 85 | <DetectChar attribute="Value" context="#pop" char="'" /> | ||
85 | <IncludeRules context="FindPEntityRefs" /> | 86 | <IncludeRules context="FindPEntityRefs" /> | ||
86 | </context> | 87 | </context> | ||
87 | 88 | | |||
88 | <context name="Element" attribute="Other Text" lineEndContext="#stay"> | 89 | <context name="Element" attribute="Other Text" lineEndContext="#stay"> | ||
89 | <Detect2Chars attribute="Element" context="#pop" char="/" char1=">" endRegion="element" /> | 90 | <Detect2Chars attribute="Element" context="#pop" char="/" char1=">" endRegion="element" /> | ||
90 | <DetectChar attribute="Element" context="El Content" char=">" /> | 91 | <DetectChar attribute="Element" context="El Content" char=">" /> | ||
91 | <RegExpr attribute="Attribute" context="Attribute" String="^&name;" /> | 92 | <RegExpr attribute="Attribute" context="Attribute" String="(?:^|\s+)&name;" /> | ||
92 | <RegExpr attribute="Attribute" context="Attribute" String="\s+&name;" /> | | |||
93 | <RegExpr attribute="Error" context="#stay" String="\S" /> | 93 | <RegExpr attribute="Error" context="#stay" String="\S" /> | ||
94 | </context> | 94 | </context> | ||
95 | 95 | | |||
96 | <context name="El Content" attribute="Other Text" lineEndContext="#stay"> | 96 | <context name="El Content" attribute="Other Text" lineEndContext="#stay"> | ||
97 | <RegExpr attribute="Element" context="El End" String="</&name;" /> | 97 | <RegExpr attribute="Element" context="El End" String="</&name;" /> | ||
98 | <IncludeRules context="FindXML" /> | 98 | <IncludeRules context="FindXML" /> | ||
99 | </context> | 99 | </context> | ||
100 | 100 | | |||
Show All 37 Lines | 128 | <itemDatas> | |||
138 | <itemData name="EntityRef" defStyleNum="dsDecVal" spellChecking="false" /> | 138 | <itemData name="EntityRef" defStyleNum="dsDecVal" spellChecking="false" /> | ||
139 | <itemData name="PEntityRef" defStyleNum="dsDecVal" spellChecking="false" /> | 139 | <itemData name="PEntityRef" defStyleNum="dsDecVal" spellChecking="false" /> | ||
140 | <itemData name="Error" defStyleNum="dsError" spellChecking="false" /> | 140 | <itemData name="Error" defStyleNum="dsError" spellChecking="false" /> | ||
141 | </itemDatas> | 141 | </itemDatas> | ||
142 | 142 | | |||
143 | </highlighting> | 143 | </highlighting> | ||
144 | <general> | 144 | <general> | ||
145 | <comments> | 145 | <comments> | ||
146 | <comment name="multiLine" start="<!--" end="-->" /> | 146 | <comment name="multiLine" start="<!--" end="-->" region="comment" /> | ||
147 | </comments> | 147 | </comments> | ||
148 | </general> | 148 | </general> | ||
149 | </language> | 149 | </language> |