summaryrefslogtreecommitdiffstats
path: root/kate/data/xslt.xml
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2014-03-03 00:41:25 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2014-03-03 00:41:25 +0900
commitbb647dca1516a45ce18f2e040bd20528f588e2fe (patch)
tree0fe5d9a19e884335a14fdf9741f772b2474df43e /kate/data/xslt.xml
parenta7e4c6b5e7916d924c2a9b75a10e427b556b8d65 (diff)
downloadtdelibs-bb647dca1516a45ce18f2e040bd20528f588e2fe.tar.gz
tdelibs-bb647dca1516a45ce18f2e040bd20528f588e2fe.zip
Kate syntax highlighting files update - Feb 2014
Diffstat (limited to 'kate/data/xslt.xml')
-rw-r--r--kate/data/xslt.xml66
1 files changed, 63 insertions, 3 deletions
diff --git a/kate/data/xslt.xml b/kate/data/xslt.xml
index 4fa28eeea..bde62b050 100644
--- a/kate/data/xslt.xml
+++ b/kate/data/xslt.xml
@@ -15,7 +15,7 @@
- Is qname - entity correct ??
- - Integrate latest XML highlighting, that supports !DOCTYPE, ![CDATA[, Processing Instructions, ...
+ - Integrate latest XML highlighting, that supports ...
This version is mainly based on kate 2.1 XML highlighting file
- highlight functions only if they are followed by a '('. (How to do that ??)
@@ -28,7 +28,9 @@
- Highlight also XPath keywords, such as 'cast as'
-
+
+ DONE: !DOCTYPE, ![CDATA[, Processing Instructions support copied from latest XML-highlighting
+
DONE: Added XSLT 2.0 tag- and XPath2.0 and XSLT2.0 function keywords
FIXED: axis highlighting does not work, if identifier continues directly behind axis: (self::someWord)
@@ -50,7 +52,7 @@
-->
-<language version="1.04" kateversion="2.5" name="xslt" section="Markup" extensions="*.xsl;*.xslt" license="LGPL" author="Peter Lammich (views@gmx.de)">
+<language version="1.03" kateversion="2.1" name="xslt" section="Markup" extensions="*.xsl;*.xslt" license="LGPL" author="Peter Lammich (views@gmx.de)">
<highlighting>
<list name="keytags">
<item> xsl:value-of </item>
@@ -248,13 +250,65 @@
<context name="normalText" attribute="Normal Text" lineEndContext="#stay">
<StringDetect attribute="Comment" context="comment" String="&lt;!--" beginRegion="comment"/>
+
+ <StringDetect attribute="CDATA" context="CDATA" String="&lt;![CDATA[" beginRegion="cdata" />
+ <RegExpr attribute="Doctype" context="Doctype" String="&lt;!DOCTYPE\s+" beginRegion="doctype" />
+ <RegExpr attribute="Processing Instruction" context="PI" String="&lt;\?[\w:_-]*" beginRegion="pi" />
+
<DetectChar attribute="Tag" context="tagname" char="&lt;" />
<RegExpr attribute="Entity Reference" context="#stay" String="&entref;" />
</context>
+
+
+ <context name="CDATA" attribute="Normal Text" lineEndContext="#stay">
+ <DetectSpaces />
+ <DetectIdentifier />
+ <StringDetect attribute="CDATA" context="#pop" String="]]&gt;" endRegion="cdata" />
+ <StringDetect attribute="Entity Reference" context="#stay" String="]]&amp;gt;" />
+ </context>
+
+ <context name="PI" attribute="Normal Text" lineEndContext="#stay">
+ <Detect2Chars attribute="Processing Instruction" context="#pop" char="?" char1="&gt;" endRegion="pi" />
+ </context>
+
+ <context name="Doctype" attribute="Normal Text" lineEndContext="#stay">
+ <DetectChar attribute="Doctype" context="#pop" char="&gt;" endRegion="doctype" />
+ <DetectChar attribute="Doctype" context="Doctype Internal Subset" char="[" beginRegion="int_subset" />
+ </context>
+
+ <context name="Doctype Internal Subset" attribute="Normal Text" lineEndContext="#stay">
+ <DetectChar attribute="Doctype" context="#pop" char="]" endRegion="int_subset" />
+ <RegExpr attribute="Doctype" context="Doctype Markupdecl" String="&lt;!(ELEMENT|ENTITY|ATTLIST|NOTATION)\b" />
+ <StringDetect attribute="Comment" context="comment" String="&lt;!--" beginRegion="comment" />
+ <RegExpr attribute="Processing Instruction" context="PI" String="&lt;\?[\w:_-]*" beginRegion="pi" />
+ <IncludeRules context="FindPEntityRefs" />
+ </context>
+
+ <context name="Doctype Markupdecl" attribute="Normal Text" lineEndContext="#stay">
+ <DetectChar attribute="Doctype" context="#pop" char="&gt;" />
+ <DetectChar attribute="Value" context="Doctype Markupdecl DQ" char="&quot;" />
+ <DetectChar attribute="Value" context="Doctype Markupdecl SQ" char="&apos;" />
+ </context>
+
+ <context name="Doctype Markupdecl DQ" attribute="Value" lineEndContext="#stay">
+ <DetectChar attribute="Value" context="#pop" char="&quot;" />
+ <IncludeRules context="FindPEntityRefs" />
+ </context>
+
+ <context name="Doctype Markupdecl SQ" attribute="Value" lineEndContext="#stay">
+ <DetectChar attribute="Value" context="#pop" char="&apos;" />
+ <IncludeRules context="FindPEntityRefs" />
+ </context>
+
<context name="detectEntRef" attribute="Normal Text" lineEndContext="#stay">
<RegExpr attribute="Entity Reference" context="#stay" String="&entref;" />
</context>
+ <context name="FindPEntityRefs" attribute="Normal Text" lineEndContext="#stay">
+ <RegExpr attribute="Entity Reference" context="#stay" String="&entref;" />
+ <RegExpr attribute="PEntity Reference" context="#stay" String="%&qname;;" />
+ <AnyChar attribute="Error" context="#stay" String="&amp;%" />
+ </context>
<context name="tagname" attribute="Tag" lineEndContext="#stay">
<keyword attribute="XSLT Tag" context="xattributes" String="keytags" />
@@ -368,6 +422,12 @@
<itemData name="XSLT Tag" defStyleNum="dsKeyword" color="#000080" selColor="#ffffff" bold="1" italic="0" />
<itemData name="XSLT 2.0 Tag" defStyleNum="dsKeyword" color="#000080" selColor="#ffffff" bold="1" italic="0" />
<itemData name="Entity Reference" defStyleNum="dsDecVal" />
+
+ <itemData name="CDATA" defStyleNum="dsBaseN" bold="1" />
+ <itemData name="Processing Instruction" defStyleNum="dsKeyword" />
+ <itemData name="Doctype" defStyleNum="dsDataType" bold="1" />
+ <itemData name="PEntity Reference" defStyleNum="dsDecVal" />
+
</itemDatas>
</highlighting>
<general>