diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-01-11 16:14:23 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-01-11 16:14:23 -0600 |
commit | 7439a4b0e05832e047040ab8bf9ef13abd9288b2 (patch) | |
tree | 3a15e3033fa66b2d947daa14e6807b39f3dc84d1 /kate/data/relaxng.xml | |
parent | 783973a7d6910fee50d90fcfaf439ae3bbb15b8c (diff) | |
download | tdelibs-7439a4b0e05832e047040ab8bf9ef13abd9288b2.tar.gz tdelibs-7439a4b0e05832e047040ab8bf9ef13abd9288b2.zip |
Update kate synatax highlighting files
This closes Bug 764
Diffstat (limited to 'kate/data/relaxng.xml')
-rw-r--r-- | kate/data/relaxng.xml | 117 |
1 files changed, 117 insertions, 0 deletions
diff --git a/kate/data/relaxng.xml b/kate/data/relaxng.xml new file mode 100644 index 000000000..974f37ff5 --- /dev/null +++ b/kate/data/relaxng.xml @@ -0,0 +1,117 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE language SYSTEM "language.dtd" +[ + <!ENTITY qname "[A-Za-z_:][\w.:_-]*"> + <!ENTITY entref "&(#[0-9]+|#[xX][0-9A-Fa-f]+|&qname;);"> +]> + +<!-- + Kate syntax highlighting for RELAX NG + 2007 by Thomas Schraitle (tom_schr AT web DOT de) + Derived from the XSLT syntax file from Peter Lammich + Published under the LGPL + + TODO: + - More modularization (how?) + - Namespace rules +--> + +<language version="0.8" + kateversion="2.1" + name="RELAX NG" + section="Markup" + extensions="*.rng;*.RNG" + license="LGPL" + author="Thomas Schraitle (tom_schr AT web DOT de)"> + <highlighting> + <list name="relaxngnames"> + <item> anyName </item> + <item> attribute </item> + <item> choice </item> + <item> data </item> + <item> define </item> + <item> div </item> + <item> element </item> + <item> empty </item> + <item> except </item> + <item> externalRef </item> + <item> grammar </item> + <item> group </item> + <item> include </item> + <item> interleave </item> + <item> list </item> + <item> mixed </item> + <item> name </item> + <item> notAllowed </item> + <item> nsName </item> + <item> oneOrMore </item> + <item> optional </item> + <item> param </item> + <item> parentRef </item> + <item> ref </item> + <item> start </item> + <item> text </item> + <item> value </item> + <item> zeroOrMore </item> + </list> + + <contexts> + <context name="normalText" attribute="Normal Text" lineEndContext="#stay"> + <StringDetect attribute="Comment" context="comment" String="<!--" beginRegion="comment"/> + <DetectChar attribute="Tag" context="tagname" char="<" /> + <RegExpr attribute="Entity Reference" context="#stay" String="&entref;" /> + </context> + + <context name="detectEntRef" attribute="Normal Text" lineEndContext="#stay"> + <RegExpr attribute="Entity Reference" context="#stay" String="&entref;" /> + </context> + + <context name="tagname" attribute="Tag" lineEndContext="#stay"> + <keyword attribute="RELAX NG Tag" context="attributes" String="relaxngnames" /> + <RegExpr attribute="Attribute" context="attributes" String="\s*" /> + <DetectChar attribute="Tag" context="#pop" char=">" /> + </context> + + <context name="attributes" attribute="Attribute" lineEndContext="#stay"> + <Detect2Chars attribute="Tag" context="#pop#pop" char="/" char1=">" /> + <DetectChar attribute="Tag" context="#pop#pop" char=">" /> + <RegExpr attribute="Normal Text" context="attrValue" String="\s*=\s*" /> + </context> + + <context name="attrValue" attribute="Invalid" lineEndContext="#stay"> + <Detect2Chars attribute="Invalid" context="#pop#pop#pop" char="/" char1=">" /> + <DetectChar attribute="Invalid" context="#pop#pop#pop" char=">" /> + <DetectChar attribute="Attribute Value" context="string" char=""" /> + </context> + + <context name="string" attribute="Attribute Value" lineEndContext="#stay"> + <DetectChar attribute="Attribute Value" context="#pop#pop" char=""" /> + <IncludeRules context="detectEntRef" /> + </context> + + <context name="comment" attribute="Comment" lineEndContext="#stay"> + <DetectSpaces/> + <StringDetect attribute="Comment" context="#pop" String="-->" endRegion="comment"/> + <RegExpr attribute="Error" context="#stay" String="-(-(?!->))+"/> + <IncludeRules context="##Alerts"/> + <DetectIdentifier/> + </context> + </contexts> + + <itemDatas> + <itemData name="Normal Text" defStyleNum="dsNormal"/> + <itemData name="Tag" defStyleNum="dsKeyword"/> + <itemData name="Invalid" defStyleNum="dsError"/> + <itemData name="Attribute" defStyleNum="dsOthers"/> + <itemData name="Attribute Value" defStyleNum="dsString" color="#800000" selColor="#ffffff" bold="0" italic="0"/> + <itemData name="Comment" defStyleNum="dsComment"/> + <itemData name="RELAX NG Tags" defStyleNum="dsKeyword" color="#000080" selColor="#ffffff" bold="1" italic="0" /> + </itemDatas> + </highlighting> + <general> + <comments> + <comment name="multiLine" start="<!--" end="-->" /> + </comments> + <keywords casesensitive="0" weakDeliminator="-:" additionalDeliminator=""{}"/> + </general> +</language> |