Warning, /frameworks/syntax-highlighting/data/syntax/html.xml is written in an unsupported language. File is not indexed.

0001 <?xml version="1.0" encoding="UTF-8"?>
0002 <!DOCTYPE language
0003 [
0004         <!ENTITY name          "[A-Za-z_:][\w.:_-]*">
0005         <!ENTITY attributeName "[A-Za-z_:*#\(\[][\)\]\w.:_-]*">
0006         <!ENTITY entref        "&amp;(?:#[0-9]+|#[xX][0-9A-Fa-f]+|&name;);">
0007 ]>
0008 <language name="HTML" version="15" kateversion="5.53" section="Markup" extensions="*.htm;*.html;*.shtml;*.shtm;*.aspx" mimetype="text/html"  author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL" priority="10">
0009 
0010 <highlighting>
0011 <contexts>
0012   <context name="Start" attribute="Normal Text" lineEndContext="#stay">
0013     <IncludeRules context="FindHTML" />
0014   </context>
0015 
0016   <context name="FindHTML" attribute="Normal Text" lineEndContext="#stay">
0017     <DetectSpaces/>
0018     <DetectIdentifier/>
0019     <StringDetect attribute="Comment" context="Comment" String="&lt;!--" beginRegion="comment" />
0020     <StringDetect attribute="CDATA" context="CDATA" String="&lt;![CDATA[" beginRegion="cdata" />
0021     <RegExpr attribute="Doctype" context="Doctype" String="&lt;!DOCTYPE\s+" insensitive="true" beginRegion="doctype"  />
0022     <RegExpr attribute="Processing Instruction" context="PI" String="&lt;\?[\w:-]*" beginRegion="pi" />
0023     <IncludeRules context="FindSpecialHTMLTags" />
0024     <IncludeRules context="FindHTMLTags" />
0025     <!-- as long as kde gives DTDs the text/html mimetype--><IncludeRules context="FindDTDRules" />
0026     <IncludeRules context="FindEntityRefs" />
0027   </context>
0028 
0029   <!-- This allows you to insert HTML tags in other syntax definitions -->
0030   <context name="FindSpecialHTMLTags" attribute="Normal Text" lineEndContext="#stay">
0031     <RegExpr attribute="Element" context="CSS" String="&lt;style\b" insensitive="true" beginRegion="style" />
0032     <RegExpr attribute="Element" context="JS" String="&lt;script\b" insensitive="true" beginRegion="script" />
0033   </context>
0034 
0035   <context name="FindHTMLTags" attribute="Normal Text" lineEndContext="#stay">
0036     <WordDetect attribute="Element" context="El Open" String="&lt;pre" insensitive="true" beginRegion="pre" />
0037     <WordDetect attribute="Element" context="El Open" String="&lt;div" insensitive="true" beginRegion="div" />
0038     <WordDetect attribute="Element" context="El Open" String="&lt;table" insensitive="true" beginRegion="table" />
0039     <WordDetect attribute="Element" context="El Open" String="&lt;ul" insensitive="true" beginRegion="ul" />
0040     <WordDetect attribute="Element" context="El Open" String="&lt;ol" insensitive="true" beginRegion="ol" />
0041     <WordDetect attribute="Element" context="El Open" String="&lt;dl" insensitive="true" beginRegion="dl" />
0042     <WordDetect attribute="Element" context="El Open" String="&lt;article" insensitive="true" beginRegion="article" />
0043     <WordDetect attribute="Element" context="El Open" String="&lt;aside" insensitive="true" beginRegion="aside" />
0044     <WordDetect attribute="Element" context="El Open" String="&lt;details" insensitive="true" beginRegion="details" />
0045     <WordDetect attribute="Element" context="El Open" String="&lt;figure" insensitive="true" beginRegion="figure" />
0046     <WordDetect attribute="Element" context="El Open" String="&lt;footer" insensitive="true" beginRegion="footer" />
0047     <WordDetect attribute="Element" context="El Open" String="&lt;header" insensitive="true" beginRegion="header" />
0048     <WordDetect attribute="Element" context="El Open" String="&lt;main" insensitive="true" beginRegion="main" />
0049     <WordDetect attribute="Element" context="El Open" String="&lt;nav" insensitive="true" beginRegion="nav" />
0050     <WordDetect attribute="Element" context="El Open" String="&lt;section" insensitive="true" beginRegion="section" />
0051     <RegExpr attribute="Element" context="El Open" String="&lt;&name;" />
0052     <WordDetect attribute="Element" context="El Close" String="&lt;/pre" insensitive="true" endRegion="pre" />
0053     <WordDetect attribute="Element" context="El Close" String="&lt;/div" insensitive="true" endRegion="div" />
0054     <WordDetect attribute="Element" context="El Close" String="&lt;/table" insensitive="true" endRegion="table" />
0055     <WordDetect attribute="Element" context="El Close" String="&lt;/ul" insensitive="true" endRegion="ul" />
0056     <WordDetect attribute="Element" context="El Close" String="&lt;/ol" insensitive="true" endRegion="ol" />
0057     <WordDetect attribute="Element" context="El Close" String="&lt;/dl" insensitive="true" endRegion="dl" />
0058     <WordDetect attribute="Element" context="El Close" String="&lt;/article" insensitive="true" endRegion="article" />
0059     <WordDetect attribute="Element" context="El Close" String="&lt;/aside" insensitive="true" endRegion="aside" />
0060     <WordDetect attribute="Element" context="El Close" String="&lt;/details" insensitive="true" endRegion="details" />
0061     <WordDetect attribute="Element" context="El Close" String="&lt;/figure" insensitive="true" endRegion="figure" />
0062     <WordDetect attribute="Element" context="El Close" String="&lt;/footer" insensitive="true" endRegion="footer" />
0063     <WordDetect attribute="Element" context="El Close" String="&lt;/header" insensitive="true" endRegion="header" />
0064     <WordDetect attribute="Element" context="El Close" String="&lt;/main" insensitive="true" endRegion="main" />
0065     <WordDetect attribute="Element" context="El Close" String="&lt;/nav" insensitive="true" endRegion="nav" />
0066     <WordDetect attribute="Element" context="El Close" String="&lt;/section" insensitive="true" endRegion="section" />
0067     <RegExpr attribute="Element" context="El Close" String="&lt;/&name;" />
0068   </context>
0069 
0070   <context name="FindEntityRefs" attribute="Other Text" lineEndContext="#stay">
0071     <RegExpr attribute="EntityRef" context="#stay" String="&entref;" />
0072     <AnyChar attribute="Error" context="#stay" String="&amp;&lt;" />
0073   </context>
0074 
0075   <context name="FindPEntityRefs" attribute="Other Text" lineEndContext="#stay">
0076     <RegExpr attribute="EntityRef" context="#stay" String="&entref;" />
0077     <RegExpr attribute="PEntityRef" context="#stay" String="%&name;;" />
0078     <AnyChar attribute="Error" context="#stay" String="&amp;%" />
0079   </context>
0080 
0081   <context name="FindAttributes" attribute="Other Text" lineEndContext="#stay">
0082     <RegExpr attribute="Attribute" context="#stay" String="^&attributeName;|\s+&attributeName;" />
0083     <DetectChar attribute="Attribute" context="Value" char="=" />
0084   </context>
0085 
0086   <context name="FindDTDRules" attribute="Other Text" lineEndContext="#stay">
0087     <RegExpr attribute="Doctype" context="Doctype Markupdecl" String="&lt;!(?:ELEMENT|ENTITY|ATTLIST|NOTATION)\b" />
0088   </context>
0089 
0090 
0091   <context name="Comment" attribute="Comment" lineEndContext="#stay">
0092     <DetectSpaces/>
0093     <StringDetect attribute="Comment" context="#pop" String="--&gt;" endRegion="comment" />
0094     <IncludeRules context="##Comments" />
0095     <DetectIdentifier/>
0096     <RegExpr attribute="Error" context="#stay" String="-(?:-(?!-&gt;))+" />
0097   </context>
0098 
0099   <context name="CDATA" attribute="Other Text" lineEndContext="#stay">
0100     <DetectSpaces/>
0101     <DetectIdentifier/>
0102     <StringDetect attribute="CDATA" context="#pop" String="]]&gt;" endRegion="cdata" />
0103     <StringDetect attribute="EntityRef" context="#stay" String="]]&amp;gt;" />
0104   </context>
0105 
0106   <context name="PI" attribute="Other Text" lineEndContext="#stay">
0107     <Detect2Chars attribute="Processing Instruction" context="#pop" char="?" char1="&gt;" endRegion="pi" />
0108   </context>
0109 
0110   <context name="Doctype" attribute="Other Text" lineEndContext="#stay">
0111     <DetectChar attribute="Doctype" context="#pop" char="&gt;" endRegion="doctype" />
0112     <DetectChar attribute="Doctype" context="Doctype Internal Subset" char="[" beginRegion="int_subset" />
0113   </context>
0114 
0115   <context name="Doctype Internal Subset" attribute="Other Text" lineEndContext="#stay">
0116     <DetectChar attribute="Doctype" context="#pop" char="]" endRegion="int_subset" />
0117     <IncludeRules context="FindDTDRules" />
0118     <StringDetect attribute="Comment" context="Comment" String="&lt;!--" beginRegion="comment" />
0119     <RegExpr attribute="Processing Instruction" context="PI" String="&lt;\?[\w:-]*" beginRegion="pi" />
0120     <IncludeRules context="FindPEntityRefs" />
0121   </context>
0122 
0123   <context name="Doctype Markupdecl" attribute="Other Text" lineEndContext="#stay">
0124     <DetectChar attribute="Doctype" context="#pop" char="&gt;" />
0125     <DetectChar attribute="Value" context="Doctype Markupdecl DQ" char="&quot;" />
0126     <DetectChar attribute="Value" context="Doctype Markupdecl SQ" char="&apos;" />
0127   </context>
0128 
0129   <context name="Doctype Markupdecl DQ" attribute="Value" lineEndContext="#stay">
0130     <DetectChar attribute="Value" context="#pop" char="&quot;" />
0131     <IncludeRules context="FindPEntityRefs" />
0132   </context>
0133 
0134   <context name="Doctype Markupdecl SQ" attribute="Value" lineEndContext="#stay">
0135     <DetectChar attribute="Value" context="#pop" char="&apos;" />
0136     <IncludeRules context="FindPEntityRefs" />
0137   </context>
0138 
0139   <context name="El Open" attribute="Other Text" lineEndContext="#stay">
0140     <Detect2Chars attribute="Element" context="#pop" char="/" char1="&gt;" />
0141     <DetectChar attribute="Element" context="#pop" char="&gt;" />
0142     <IncludeRules context="FindAttributes" />
0143     <RegExpr attribute="Error" context="#stay" String="\S" />
0144   </context>
0145 
0146   <context name="El Close" attribute="Other Text" lineEndContext="#stay">
0147     <DetectChar attribute="Element" context="#pop" char="&gt;" />
0148     <RegExpr attribute="Error" context="#stay" String="\S" />
0149   </context>
0150 
0151   <context name="El Close 2" attribute="Other Text" lineEndContext="#stay">
0152     <DetectChar attribute="Element" context="#pop#pop#pop" char="&gt;" />
0153     <RegExpr attribute="Error" context="#stay" String="\S" />
0154   </context>
0155 
0156   <context name="El Close 3" attribute="Other Text" lineEndContext="#stay">
0157     <DetectChar attribute="Element" context="#pop#pop#pop#pop" char="&gt;" />
0158     <RegExpr attribute="Error" context="#stay" String="\S" />
0159   </context>
0160 
0161   <context name="CSS" attribute="Other Text" lineEndContext="#stay">
0162     <Detect2Chars attribute="Element" context="#pop" char="/" char1="&gt;" endRegion="style" />
0163     <DetectChar attribute="Element" context="CSS content" char="&gt;" />
0164     <IncludeRules context="FindAttributes" />
0165     <RegExpr attribute="Error" context="#stay" String="\S" />
0166   </context>
0167 
0168   <context name="CSS content" attribute="Other Text" lineEndContext="#stay">
0169     <RegExpr attribute="Element" context="El Close 2" String="&lt;/style\b" insensitive="true" endRegion="style" />
0170     <IncludeRules context="##CSS" includeAttrib="true"/>
0171   </context>
0172 
0173   <context name="JS" attribute="Other Text" lineEndContext="#stay">
0174     <RegExpr attribute="Attribute" context="Script-Type" String="(?:\s+|^)type(?=\=|\s|$)" insensitive="true"/>
0175     <DetectChar attribute="Element" context="JS content" char="&gt;" />
0176     <IncludeRules context="DefaultJS" />
0177   </context>
0178   <context name="DefaultJS" attribute="Other Text" lineEndContext="#stay">
0179     <Detect2Chars attribute="Element" context="#pop" char="/" char1="&gt;" endRegion="script" />
0180     <IncludeRules context="FindAttributes" />
0181     <RegExpr attribute="Error" context="#stay" String="\S" />
0182   </context>
0183 
0184   <context name="JS content" attribute="Other Text" lineEndContext="#stay">
0185     <IncludeRules context="Default JS content"/>
0186     <IncludeRules context="Normal##JavaScript" includeAttrib="true"/>
0187   </context>
0188   <context name="Default JS content" attribute="Other Text" lineEndContext="#stay">
0189     <RegExpr attribute="Element" context="El Close 2" String="&lt;/script\b" insensitive="true" endRegion="script" />
0190     <RegExpr attribute="Comment" context="JS comment close" String="//(?=.*&lt;/script\b)" insensitive="true" />
0191   </context>
0192 
0193   <context name="JS comment close" attribute="Comment" lineEndContext="#pop">
0194     <RegExpr attribute="Element" context="El Close 3" String="&lt;/script\b" insensitive="true" endRegion="script" />
0195     <DetectSpaces />
0196     <IncludeRules context="##Comments" />
0197   </context>
0198 
0199   <context name="Value" attribute="Other Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="Value NQ">
0200     <DetectChar attribute="Value" context="Value DQ" char="&quot;" />
0201     <DetectChar attribute="Value" context="Value SQ" char="&apos;" />
0202     <DetectSpaces />
0203   </context>
0204 
0205   <context name="Value NQ" attribute="Other Text" lineEndContext="#pop#pop" fallthrough="true" fallthroughContext="#pop#pop">
0206     <IncludeRules context="FindEntityRefs" />
0207     <RegExpr attribute="Value" context="#stay" String="/(?!&gt;)|[^/&gt;&lt;&quot;&apos;\s]" />
0208   </context>
0209 
0210   <context name="Value DQ" attribute="Value" lineEndContext="#stay">
0211     <DetectChar attribute="Value" context="#pop#pop" char="&quot;" />
0212     <IncludeRules context="FindEntityRefs" />
0213   </context>
0214 
0215   <context name="Value SQ" attribute="Value" lineEndContext="#stay">
0216     <DetectChar attribute="Value" context="#pop#pop" char="&apos;" />
0217     <IncludeRules context="FindEntityRefs" />
0218   </context>
0219 
0220   <!-- Read content from the "type" attribute to change the language to
0221        highlight in the <script> tag. The default language is JavaScript. -->
0222 
0223   <context name="Script-Type" attribute="Other Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop">
0224     <DetectSpaces />
0225     <DetectChar attribute="Attribute" context="#pop!Script-Type Value" char="=" />
0226   </context>
0227   <context name="Script-Type Value" attribute="Other Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop!Value">
0228     <DetectSpaces />
0229     <!-- TypeScript -->
0230     <StringDetect attribute="Value" context="#pop#pop!TypeScript" String="&quot;text/typescript&quot;"/>
0231     <StringDetect attribute="Value" context="#pop#pop!TypeScript" String="&apos;text/typescript&apos;"/>
0232     <!-- JSX (JavaScript React) -->
0233     <StringDetect attribute="Value" context="#pop#pop!JSX" String="&quot;text/jsx&quot;"/>
0234     <StringDetect attribute="Value" context="#pop#pop!JSX" String="&apos;text/jsx&apos;"/>
0235     <StringDetect attribute="Value" context="#pop#pop!JSX" String="&quot;text/babel&quot;"/>
0236     <StringDetect attribute="Value" context="#pop#pop!JSX" String="&apos;text/babel&apos;"/>
0237     <!-- MustacheJS / HandlebarsJS / RactiveJS -->
0238     <StringDetect attribute="Value" context="#pop#pop!MustacheJS" String="&quot;x-tmpl-mustache&quot;"/>
0239     <StringDetect attribute="Value" context="#pop#pop!MustacheJS" String="&apos;x-tmpl-mustache&apos;"/>
0240     <StringDetect attribute="Value" context="#pop#pop!MustacheJS" String="&quot;text/mustache&quot;"/>
0241     <StringDetect attribute="Value" context="#pop#pop!MustacheJS" String="&apos;text/mustache&apos;"/>
0242     <StringDetect attribute="Value" context="#pop#pop!MustacheJS" String="&quot;text/x-mustache-template&quot;"/>
0243     <StringDetect attribute="Value" context="#pop#pop!MustacheJS" String="&apos;text/x-mustache-template&apos;"/>
0244     <StringDetect attribute="Value" context="#pop#pop!MustacheJS" String="&quot;text/x-handlebars-template&quot;"/>
0245     <StringDetect attribute="Value" context="#pop#pop!MustacheJS" String="&apos;text/x-handlebars-template&apos;"/>
0246     <StringDetect attribute="Value" context="#pop#pop!MustacheJS" String="&quot;text/ractive&quot;"/>
0247     <StringDetect attribute="Value" context="#pop#pop!MustacheJS" String="&apos;text/ractive&apos;"/>
0248     <!-- HTML templates -->
0249     <StringDetect attribute="Value" context="#pop#pop!Script HTML template" String="&quot;text/html&quot;"/>
0250     <StringDetect attribute="Value" context="#pop#pop!Script HTML template" String="&apos;text/html&apos;"/>
0251   </context>
0252 
0253   <context name="JSX" attribute="Other Text" lineEndContext="#stay">
0254     <DetectChar attribute="Element" context="JSX content" char="&gt;" />
0255     <IncludeRules context="DefaultJS" />
0256   </context>
0257   <context name="JSX content" attribute="Other Text" lineEndContext="#stay">
0258     <IncludeRules context="Default JS content"/>
0259     <IncludeRules context="Normal##JavaScript React (JSX)" includeAttrib="true"/>
0260   </context>
0261 
0262   <context name="TypeScript" attribute="Other Text" lineEndContext="#stay">
0263     <DetectChar attribute="Element" context="TypeScript content" char="&gt;" />
0264     <IncludeRules context="DefaultJS" />
0265   </context>
0266   <context name="TypeScript content" attribute="Other Text" lineEndContext="#stay">
0267     <IncludeRules context="Default JS content"/>
0268     <IncludeRules context="Normal##TypeScript" includeAttrib="true"/>
0269   </context>
0270 
0271   <context name="MustacheJS" attribute="Other Text" lineEndContext="#stay">
0272     <DetectChar attribute="Element" context="MustacheJS content" char="&gt;" />
0273     <IncludeRules context="DefaultJS" />
0274   </context>
0275   <context name="MustacheJS content" attribute="Other Text" lineEndContext="#stay">
0276     <RegExpr attribute="Element" context="El Close 2" String="&lt;/script\b" insensitive="true" endRegion="script" />
0277     <StringDetect attribute="Error" context="#stay" String="&lt;script&gt;" insensitive="true" />
0278     <RegExpr attribute="Error" context="#stay" String="&lt;script\b" insensitive="true" />
0279     <IncludeRules context="Base##Mustache/Handlebars (HTML)" includeAttrib="true"/>
0280   </context>
0281 
0282   <context name="Script HTML template" attribute="Other Text" lineEndContext="#stay">
0283     <DetectChar attribute="Element" context="Script HTML template content" char="&gt;" />
0284     <IncludeRules context="DefaultJS" />
0285   </context>
0286   <context name="Script HTML template content" attribute="Other Text" lineEndContext="#stay">
0287     <RegExpr attribute="Element" context="El Close 2" String="&lt;/script\b" insensitive="true" endRegion="script" />
0288     <StringDetect attribute="Error" context="#stay" String="&lt;script&gt;" insensitive="true" />
0289     <RegExpr attribute="Error" context="#stay" String="&lt;script\b" insensitive="true" />
0290     <IncludeRules context="FindHTML" />
0291   </context>
0292 
0293 </contexts>
0294 <itemDatas>
0295   <itemData name="Normal Text" defStyleNum="dsNormal" />
0296   <itemData name="Other Text" defStyleNum="dsNormal" spellChecking="false" />
0297   <itemData name="Comment" defStyleNum="dsComment" />
0298   <itemData name="CDATA" defStyleNum="dsBaseN" bold="1" spellChecking="false" />
0299   <itemData name="Processing Instruction" defStyleNum="dsKeyword" spellChecking="false" />
0300   <itemData name="Doctype" defStyleNum="dsDataType" bold="1" spellChecking="false" />
0301   <itemData name="Element" defStyleNum="dsKeyword" spellChecking="false" />
0302   <itemData name="Attribute" defStyleNum="dsOthers" spellChecking="false" />
0303   <itemData name="Value" defStyleNum="dsString" spellChecking="false" />
0304   <itemData name="EntityRef" defStyleNum="dsDecVal" spellChecking="false" />
0305   <itemData name="PEntityRef" defStyleNum="dsDecVal" spellChecking="false" />
0306   <itemData name="Error" defStyleNum="dsError" spellChecking="false" />
0307 </itemDatas>
0308 
0309 </highlighting>
0310 <general>
0311   <comments>
0312     <comment name="multiLine" start="&lt;!--" end="--&gt;" region="comment" />
0313   </comments>
0314 </general>
0315 </language>
0316 <!-- kate: replace-tabs on; tab-width 2; indent-width 2; -->