<?xml version="1.0" encoding="UTF-8"?>

<!-- ***** THIS FILE WAS GENERATED BY A SCRIPT - DO NOT EDIT ***** -->

<!DOCTYPE language
[
  <!ENTITY name    "[[:alpha:]_:][\w.:_-]*">
  <!ENTITY entref  "&amp;(?:#[0-9]+|#[xX][0-9A-Fa-f]+|&name;);">

  <!ENTITY xsl_tags "(xsl:apply-imports|xsl:apply-templates|xsl:attribute-set|xsl:attribute|xsl:call-template|xsl:choose|xsl:comment|xsl:copy-of|xsl:copy|xsl:decimal-format|xsl:element|xsl:fallback|xsl:for-each|xsl:if|xsl:import|xsl:include|xsl:key|xsl:message|xsl:namespace-alias|xsl:number|xsl:otherwise|xsl:output|xsl:param|xsl:preserve-space|xsl:processing-instruction|xsl:sort|xsl:strip-space|xsl:stylesheet|xsl:template|xsl:text|xsl:transform|xsl:value-of|xsl:variable|xsl:when|xsl:with-param|xsl:apply-imports|xsl:apply-templates|xsl:attribute-set|xsl:attribute|xsl:call-template|xsl:choose|xsl:comment|xsl:copy-of|xsl:copy|xsl:decimal-format|xsl:element|xsl:fallback|xsl:for-each|xsl:if|xsl:import|xsl:include|xsl:key|xsl:message|xsl:namespace-alias|xsl:number|xsl:otherwise|xsl:output|xsl:param|xsl:preserve-space|xsl:processing-instruction|xsl:sort|xsl:strip-space|xsl:stylesheet|xsl:template|xsl:text|xsl:transform|xsl:value-of|xsl:variable|xsl:when|xsl:with-param)(?![\w.:_-])">
  <!ENTITY xsl_attrs "(select|test|match)(?![\w.:_-])">
  <!ENTITY axisname "ancestor|ancestor-or-self|attribute|child|descendant|descendant-or-self|following|following-sibling|namespace|parent|preceding|preceding-sibling|self">
]>

<!--
  This file contains XSLT-specific rules that are not in XML.
  The `generate-xslt.pl` script merges this file with the XML syntax
  to produce a complete XSLT syntax.
-->

<!--
  Kate syntax highlighting for XSLT 1 and 2
  2004 by Peter Lammich (views@gmx.de)
  Published under the LGPL
  
  TODO/FIXME

    - XSLT 3.0

    - highlight functions only if they are followed by a '('. (How to do that ??)
    - use <IncludeRules> to make things a bit more modular and cleaner 
      
    - Define own highlighting rules for patterns (Currently a pattern is highlighted as XPath)
    
    - Highlight also XPath keywords, such as 'cast as'
      
    FIXED: axis highlighting does not work, if identifier continues directly behind axis: (self::someWord)
    
    FIXED axis-names are even highlighted if there are characters in front of them, i.e. in "xxxself::", "self::" would 
      be highlighted.
        Now matching any names in XPath by own matcher

-->

<language version="13" kateversion="5.79" name="xslt" section="Markup" extensions="*.xsl;*.xslt" license="LGPL" author="Peter Lammich (views@gmx.de);Wilbert Berendsen (wilbert@kde.nl)">
  <highlighting>
    <list name="keytags">
      <item>xsl:apply-imports</item>
      <item>xsl:apply-templates</item>
      <item>xsl:attribute-set</item>
      <item>xsl:attribute</item>
      <item>xsl:call-template</item>
      <item>xsl:choose</item>
      <item>xsl:comment</item>
      <item>xsl:copy-of</item>
      <item>xsl:copy</item>
      <item>xsl:decimal-format</item>
      <item>xsl:element</item>
      <item>xsl:fallback</item>
      <item>xsl:for-each</item>
      <item>xsl:if</item>
      <item>xsl:import</item>
      <item>xsl:include</item>
      <item>xsl:key</item>
      <item>xsl:message</item>
      <item>xsl:namespace-alias</item>
      <item>xsl:number</item>
      <item>xsl:otherwise</item>
      <item>xsl:output</item>
      <item>xsl:param</item>
      <item>xsl:preserve-space</item>
      <item>xsl:processing-instruction</item>
      <item>xsl:sort</item>
      <item>xsl:strip-space</item>
      <item>xsl:stylesheet</item>
      <item>xsl:template</item>
      <item>xsl:text</item>
      <item>xsl:transform</item>
      <item>xsl:value-of</item>
      <item>xsl:variable</item>
      <item>xsl:when</item>
      <item>xsl:with-param</item>
    </list>
  
    <list name="keytags_2.0">
      <item>xsl:analyze-string</item>
      <item>xsl:character-map</item>
      <item>xsl:document</item>
      <item>xsl:for-each-group</item>
      <item>xsl:function</item>
      <item>xsl:import-schema</item>
      <item>xsl:matching-substring</item>
      <item>xsl:namespace</item>
      <item>xsl:next-match</item>
      <item>xsl:non-matching-substring</item>
      <item>xsl:output-character</item>
      <item>xsl:perform-sort</item>
      <item>xsl:result-document</item>
      <item>xsl:sequence</item>
    </list>
    
    <list name="functions">    
      <item>boolean</item>
      <item>ceiling</item>
      <item>concat</item>
      <item>contains</item>
      <item>count</item>
      <item>current</item>
      <item>document</item>
      <item>element-available</item>
      <item>false</item>
      <item>floor</item>
      <item>format-number</item>
      <item>function-available</item>
      <item>generate-id</item>
      <item>id</item>
      <item>key</item>
      <item>lang</item>
      <item>last</item>
      <item>local-name</item>
      <item>name</item>
      <item>namespace-uri</item>
      <item>normalize-space</item>
      <item>not</item>
      <item>number</item>
      <item>position</item>
      <item>round</item>
      <item>starts-with</item>
      <item>string-length</item>
      <item>string</item>
      <item>substring-after</item>
      <item>substring-before</item>
      <item>substring</item>
      <item>sum</item>
      <item>system-property</item>
      <item>text</item>
      <item>translate</item>
      <item>true</item>
      <item>unparsed-entity-uri</item>
    </list>

    <list name="functions_2.0">
      <item>QName</item>
      <item>abs</item>
      <item>adjust-date-to-timezone</item>
      <item>adjust-dateTime-to-timezone</item>
      <item>adjust-time-to-timezone</item>
      <item>avg</item>
      <item>base-uri</item>
      <item>codepoints-to-string</item>
      <item>collection</item>
      <item>compare</item>
      <item>current-date</item>
      <item>current-dateTime</item>
      <item>current-group</item>
      <item>current-grouping-key</item>
      <item>current-time</item>
      <item>data</item>
      <item>dateTime</item>
      <item>day-from-date</item>
      <item>day-from-dateTime</item>
      <item>days-from-duration</item>
      <item>deep-equal</item>
      <item>default-collation</item>
      <item>distinct-values</item>
      <item>doc</item>
      <item>document-uri</item>
      <item>empty</item>
      <item>ends-with</item>
      <item>error</item>
      <item>escape-uri</item>
      <item>exactly-one</item>
      <item>exists</item>
      <item>expanded-QName</item>
      <item>format-date</item>
      <item>format-dateTime</item>
      <item>format-time</item>
      <item>hours-from-dateTime</item>
      <item>hours-from-duration</item>
      <item>hours-from-time</item>
      <item>idref</item>
      <item>implicit-timezone</item>
      <item>in-scope-prefixes</item>
      <item>index-of</item>
      <item>input</item>
      <item>insert-before</item>
      <item>local-name-from-QName</item>
      <item>lower-case</item>
      <item>matches</item>
      <item>max</item>
      <item>min</item>
      <item>minutes-from-dateTime</item>
      <item>minutes-from-duration</item>
      <item>minutes-from-time</item>
      <item>month-from-date</item>
      <item>month-from-dateTime</item>
      <item>months-from-duration</item>
      <item>namespace-uri-for-prefix</item>
      <item>namespace-uri-from-QName</item>
      <item>node-kind</item>
      <item>node-name</item>
      <item>normalize-unicode</item>
      <item>one-or-more</item>
      <item>regex-group</item>
      <item>remove</item>
      <item>replace</item>
      <item>resolve-QName</item>
      <item>resolve-uri</item>
      <item>reverse</item>
      <item>root</item>
      <item>round-half-to-even</item>
      <item>seconds-from-dateTime</item>
      <item>seconds-from-duration</item>
      <item>seconds-from-time</item>
      <item>sequence-node-identical</item>
      <item>static-base-uri</item>
      <item>string-join</item>
      <item>string-to-codepoints</item>
      <item>subsequence</item>
      <item>subtract-dateTimes-yielding-dayTimeDuration</item>
      <item>subtract-dateTimes-yielding-yearMonthDuration</item>
      <item>subtract-dates-yielding-dayTimeDuration</item>
      <item>subtract-dates-yielding-yearMonthDuration</item>
      <item>timezone-from-date</item>
      <item>timezone-from-dateTime</item>
      <item>timezone-from-time</item>
      <item>tokenize</item>
      <item>trace</item>
      <item>unordered</item>
      <item>unparsed-entity-public-id</item>
      <item>unparsed-text</item>
      <item>upper-case</item>
      <item>year-from-date</item>
      <item>year-from-dateTime</item>
      <item>years-from-duration</item>
      <item>zero-or-one</item>
    </list>

    <list name="xsl-attributes">
      <item>select</item>
      <item>test</item>
      <item>match</item>
    </list>
    
    <contexts>

      
  <context name="normalText" attribute="Normal Text" lineEndContext="#stay">
    <IncludeRules context="FindText" />
    <IncludeRules context="FindElement" />
  </context>

  <context name="FindText" attribute="Normal Text" lineEndContext="#stay">
    <DetectSpaces />
    <DetectIdentifier />
    <Int />
  </context>

  <context name="FindElement" attribute="Normal Text" lineEndContext="#stay">
    <RegExpr attribute="Tag Symbols" context="ElementTagName" String="&lt;(?=(&name;))" beginRegion="element" />
    <RegExpr attribute="Tag Symbols" context="El End TagName" String="&lt;/(?=(&name;))" endRegion="element" />
    <IncludeRules context="FindComment" />
    <StringDetect attribute="CDATA" context="CDATAStart" String="&lt;![CDATA[" lookAhead="true" />
    <RegExpr attribute="Doctype Symbols" context="DoctypeTagName" String="&lt;!(?=DOCTYPE(\s|$))" beginRegion="doctype" />
    <IncludeRules context="FindEntityRefs" />
    <IncludeRules context="FindProcessingInstruction" />
    <IncludeRules context="FindError" />
  </context>

  <context name="FindError" attribute="Other Text" lineEndContext="#stay">
    <IncludeRules context="FindReservedChar" />
    <StringDetect attribute="Invalid" String="]]>" />
  </context>

  <context name="FindComment" attribute="Other Text" lineEndContext="#stay">
    <StringDetect attribute="Comment" context="Comment" String="&lt;!--" beginRegion="comment" />
  </context>

  <context name="FindEntityRefs" attribute="Other Text" lineEndContext="#stay">
    <RegExpr attribute="Entity Reference" context="#stay" String="&entref;" />
  </context>

  <context name="FindReservedChar" attribute="Other Text" lineEndContext="#stay">
    <AnyChar attribute="Invalid" context="#stay" String="&amp;&lt;" />
  </context>

  <context name="FindPEntityRefs" attribute="Other Text" lineEndContext="#stay">
    <RegExpr attribute="Entity Reference" context="#stay" String="&entref;" />
    <RegExpr attribute="PEntity Reference" context="#stay" String="%&name;;" />
    <AnyChar attribute="Invalid" context="#stay" String="&amp;%&lt;" />
  </context>


  <context name="Comment" attribute="Comment" lineEndContext="#stay">
    <DetectSpaces />
    <StringDetect context="EndComment" String="--" lookAhead="1"/>
    <IncludeRules context="##Comments" />
    <DetectIdentifier />
  </context>
  <context name="EndComment" attribute="Comment" lineEndContext="#pop" fallthroughContext="#pop">
    <StringDetect attribute="Comment" context="#pop#pop" String="-->" endRegion="comment" />
    <DetectChar attribute="Invalid" char="-" />
  </context>

  <context name="CDATAStart" attribute="Other Text" lineEndContext="#pop">
    <StringDetect attribute="CDATA Symbols" context="#stay" String="&lt;![" beginRegion="cdata" />
    <StringDetect attribute="CDATA" context="#stay" String="CDATA" />
    <DetectChar attribute="CDATA Symbols" context="#pop!CDATA" char="[" />
  </context>
  <context name="CDATA" attribute="Other Text" lineEndContext="#stay">
    <DetectSpaces />
    <DetectIdentifier />
    <StringDetect attribute="CDATA Symbols" context="#pop" String="]]&gt;" endRegion="cdata" />
  </context>

  <context name="FindProcessingInstruction" attribute="Other Text" lineEndContext="#stay">
    <RegExpr attribute="PI Symbols" context="PI TagName" String="&lt;\?(?=([\w:_-]*))" beginRegion="pi" />
  </context>
  <context name="PI TagName" attribute="Other Text" lineEndContext="#pop!PI" fallthroughContext="#pop!PI">
    <RegExpr attribute="Processing Instruction" context="#pop!PI-XML" String="xml(?=\s|$)" insensitive="true" />
    <StringDetect attribute="Processing Instruction" context="#pop!PI" String="%1" dynamic="true" />
  </context>
  <context name="PI" attribute="Other Text" lineEndContext="#stay">
    <Detect2Chars attribute="PI Symbols" context="#pop" char="?" char1="&gt;" endRegion="pi" />
  </context>
  <context name="PI-XML" attribute="Other Text" lineEndContext="#stay">
    <IncludeRules context="PI" />
    <DetectSpaces attribute="Other Text"/>
    <DetectChar attribute="Attribute Separator" context="Value" char="=" />
    <RegExpr attribute="Attribute" context="#stay" String="(?:^|(?&lt;=\s))&name;" />
  </context>

  <context name="DoctypeTagName" attribute="Other Text" lineEndContext="#pop">
    <StringDetect attribute="Doctype" context="#pop!DoctypeVariableName" String="DOCTYPE" />
  </context>
  <context name="DoctypeVariableName" attribute="Other Text" lineEndContext="#stay" fallthroughContext="#pop!Doctype">
    <DetectSpaces />
    <RegExpr attribute="Doctype Name" context="#pop!Doctype" String="&name;" />
  </context>
  <context name="Doctype" attribute="Other Text" lineEndContext="#stay">
    <DetectChar attribute="Doctype Symbols" context="#pop" char="&gt;" endRegion="doctype" />
    <DetectChar attribute="Doctype Symbols" context="Doctype Internal Subset" char="[" beginRegion="int_subset" />
  </context>

  <context name="Doctype Internal Subset" attribute="Other Text" lineEndContext="#stay">
    <DetectSpaces />
    <DetectChar attribute="Doctype Symbols" context="#pop" char="]" endRegion="int_subset" />
    <RegExpr attribute="Doctype Symbols" context="Doctype Markupdecl TagName" String="&lt;!(?=(ELEMENT|ENTITY|ATTLIST|NOTATION)\b)" />
    <IncludeRules context="FindComment" />
    <IncludeRules context="FindProcessingInstruction" />
    <IncludeRules context="FindPEntityRefs" />
  </context>

  <context name="Doctype Markupdecl TagName" attribute="Other Text" lineEndContext="#pop">
    <DetectIdentifier attribute="Doctype" context="#pop!Doctype Markupdecl VariableName" />
  </context>
  <context name="Doctype Markupdecl VariableName" attribute="Other Text" lineEndContext="#pop!Doctype Markupdecl" fallthroughContext="#pop!Doctype Markupdecl">
    <DetectSpaces />
    <DetectChar attribute="Doctype Symbols" char="%"/>
    <RegExpr attribute="Doctype Name" context="#pop!Doctype Markupdecl" String="&name;" />
  </context>
  <context name="Doctype Markupdecl" attribute="Other Text" lineEndContext="#stay">
    <DetectChar attribute="Doctype Symbols" 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="ElementTagName" attribute="Other Text" lineEndContext="#pop!Element">
    <keyword attribute="XSLT Tag" context="#pop!XSLT_Element" String="keytags"   weakDeliminator="-:."/>
    <keyword attribute="XSLT 2.0 Tag" context="#pop!XSLT_Element" String="keytags_2.0"   weakDeliminator="-:."/>
    <StringDetect attribute="Tag" context="#pop!Element" String="%1" dynamic="true" />
  </context>
  
  <context name="Element" attribute="Other Text" lineEndContext="#stay" fallthroughContext="ElementCommonError">
    <Detect2Chars attribute="Tag Symbols" context="#pop" char="/" char1=">" endRegion="element" />
    <DetectChar attribute="Tag Symbols" context="#pop" char=">" />
    <DetectSpaces attribute="Other Text"/>
    <RegExpr attribute="Attribute" context="Attribute" String="(?:^|(?&lt;=\s))&name;" />

    <!-- the following rules limit the number of characters or lines marked as an error,
      which can become very large -->
    <!-- assume that '>' will be typed afterwards -->
    <DetectChar attribute="Invalid" context="#pop" char="/" endRegion="element" />
    <!-- assume no attribute name, but value -->
    <DetectChar attribute="Invalid" context="Value" char="=" />
    <!-- assume attribute preceded by an invalid character, e.g. <tag foo="x"invalid="y"> -->
    <RegExpr attribute="Invalid" context="Attribute" String="&name;" />
  </context>
  <context name="XSLT_Element" attribute="Other Text" lineEndContext="#stay" fallthroughContext="ElementCommonError">
    <Detect2Chars attribute="Tag Symbols" context="#pop" char="/" char1=">" endRegion="element" />
    <DetectChar attribute="Tag Symbols" context="#pop" char=">" />
    <DetectSpaces attribute="Other Text"/>
    <RegExpr attribute="XSLT XPath Attribute" context="XSLT_Attribute" String="(?:^|(?&lt;=\s))&xsl_attrs;" />
    <RegExpr attribute="Attribute" context="Attribute" String="(?:^|(?&lt;=\s))&name;" />

    <!-- the following rules limit the number of characters or lines marked as an error,
      which can become very large -->
    <!-- assume that '>' will be typed afterwards -->
    <DetectChar attribute="Invalid" context="#pop" char="/" endRegion="element" />
    <!-- assume no attribute name, but value -->
    <DetectChar attribute="Invalid" context="XSLT_Value" char="=" />
    <!-- assume attribute preceded by an invalid character, e.g. <tag foo="x"invalid="y"> -->
    <RegExpr attribute="Invalid" context="XSLT_Attribute" String="&xsl_attrs;" />
    <RegExpr attribute="Invalid" context="Attribute" String="&name;" />
  </context>

  <context name="El End TagName" attribute="Other Text" lineEndContext="#pop!El End">
    <keyword attribute="XSLT Tag" context="El End" String="keytags"   weakDeliminator="-:."/>
    <keyword attribute="XSLT 2.0 Tag" context="El End" String="keytags_2.0"   weakDeliminator="-:."/>
    <StringDetect attribute="Tag" context="El End" String="%1" dynamic="true" />
  </context>
  <context name="El End" attribute="Other Text" lineEndContext="#stay">
    <DetectChar attribute="Tag Symbols" context="#pop#pop" char=">" />
    <DetectSpaces attribute="Other Text"/>
    <IncludeRules context="ElementCommonError"/>
  </context>

  
  <context name="Attribute" attribute="Other Text" lineEndContext="#stay">
    <DetectChar attribute="Attribute Separator" context="#pop!Value" char="=" />
    <DetectSpaces attribute="Other Text"/>

    <!-- the following rules limit the number of characters or lines marked as an error,
      which can become very large -->
    <DetectChar attribute="Invalid" context="Value DQ" char="&quot;" />
    <DetectChar attribute="Invalid" context="Value SQ" char="&apos;" />
    <IncludeRules context="FindAttributeCommonError"/>
  </context>
  <context name="XSLT_Attribute" attribute="Other Text" lineEndContext="#stay">
    <DetectChar attribute="Attribute Separator" context="#pop!XSLT_Value" char="=" />
    <DetectSpaces attribute="Other Text"/>

    <!-- the following rules limit the number of characters or lines marked as an error,
      which can become very large -->
    <DetectChar attribute="Invalid" context="xpathDQ" char="&quot;" />
    <DetectChar attribute="Invalid" context="xpathSQ" char="&apos;" />
    <IncludeRules context="XSLT_FindAttributeCommonError"/>
  </context>

  
  <context name="Value" attribute="Other Text" lineEndContext="#stay">
    <DetectChar attribute="Attribute Value" context="Value DQ" char="&quot;" />
    <DetectChar attribute="Attribute Value" context="Value SQ" char="&apos;" />
    <DetectSpaces attribute="Other Text"/>
    <IncludeRules context="FindAttributeCommonError"/>
  </context>
  <context name="XSLT_Value" attribute="Other Text" lineEndContext="#stay">
    <DetectChar attribute="XPath" context="xpathDQ" char="&quot;" />
    <DetectChar attribute="XPath" context="xpathSQ" char="&apos;" />
    <DetectSpaces attribute="Other Text"/>
    <IncludeRules context="XSLT_FindAttributeCommonError"/>
  </context>

  
  <context name="FindAttributeCommonError" attribute="Invalid">
    <!-- attribute without value -->
    <DetectChar attribute="Invalid" context="#pop#pop" char=">" />
    <StringDetect attribute="Invalid" context="#pop#pop" String="/>" endRegion="element" />
    <!-- attribute without value, assume that '>' will be typed afterwards -->
    <DetectChar attribute="Invalid" context="#pop#pop" char="/" endRegion="element" />
    <!-- next word is an attribute -->
    <RegExpr attribute="Invalid" context="#pop!Attribute" String="&name;(?=\s*=)" />
    <IncludeRules context="ElementCommonError"/>
  </context>
  <context name="XSLT_FindAttributeCommonError" attribute="Invalid">
    <!-- attribute without value -->
    <DetectChar attribute="Invalid" context="#pop#pop" char=">" />
    <StringDetect attribute="Invalid" context="#pop#pop" String="/>" endRegion="element" />
    <!-- attribute without value, assume that '>' will be typed afterwards -->
    <DetectChar attribute="Invalid" context="#pop#pop" char="/" endRegion="element" />
    <!-- next word is an attribute -->
    <RegExpr attribute="Invalid" context="#pop!XSLT_Attribute" String="&xsl_attrs;(?=\s*=)" />
    <RegExpr attribute="Invalid" context="#pop!Attribute" String="&name;(?=\s*=)" />
    <IncludeRules context="ElementCommonError"/>
  </context>

  <context name="ElementCommonError" attribute="Invalid">
    <!-- mark a "word" in error -->
    <RegExpr attribute="Invalid" context="#pop#pop" String="[-\w.:_=]+|[^-\w.:_=/&lt;>\s]+[-\w.:_]*|/>|[^&lt;]" />
    <!-- assume that '>' will be typed afterwards and find a new element -->
    <RegExpr attribute="Invalid" context="#pop#pop!XSLT_Element" String="&lt;&xsl_tags;" />
    <RegExpr attribute="Invalid" context="#pop#pop!Element" String="&lt;&name;" />
    <StringDetect attribute="Invalid" context="#pop#pop!Comment" String="&lt;!--" beginRegion="comment" />
    <StringDetect attribute="Invalid" context="#pop#pop!CDATA" String="&lt;![CDATA[" beginRegion="cdata" />
    <DetectChar attribute="Invalid" context="#pop#pop" char="&lt;" />
  </context>

  
  <context name="Value DQ" attribute="Attribute Value" lineEndContext="#stay">
    <DetectChar attribute="XPath" context="xpathDQ" char="{"/>
    <DetectChar attribute="Attribute Value" context="#pop#pop" char="&quot;" />
    <IncludeRules context="ValueQ" />
  </context>

  
  <context name="Value SQ" attribute="Attribute Value" lineEndContext="#stay">
    <DetectChar attribute="XPath" context="xpathSQ" char="{"/>
    <DetectChar attribute="Attribute Value" context="#pop#pop" char="&apos;" />
    <IncludeRules context="ValueQ" />
  </context>

  
  <context name="ValueQ" attribute="Attribute Value" lineEndContext="#stay">
    <DetectIdentifier attribute="Attribute Value" />
    <DetectSpaces attribute="Attribute Value" />
    <Int attribute="Attribute Value" />
    <IncludeRules context="FindEntityRefs" />
    <IncludeRules context="FindReservedChar" />
  </context>


<context name="xpathDQ" attribute="XPath" lineEndContext="#stay">
        <keyword attribute="XPath/ XSLT Function" context="#stay" String="functions" />
        <keyword attribute="XPath 2.0/ XSLT 2.0 Function" context="#stay" String="functions_2.0" />
        <RegExpr attribute="XPath Axis" context="#stay" String="(&axisname;)::" />
        <DetectChar attribute="XPath" context="#pop" char="}" />
        <DetectChar attribute="XPath String" context="xpathStringSQ" char="'" />
        <DetectChar attribute="XPath" context="#pop#pop" char="&quot;" />
        <RegExpr attribute="XPath Attribute" context="#stay" String="@&name;" />
        <RegExpr attribute="Variable" context="#stay" String="\$&name;" />
        <RegExpr attribute="XPath" context="#stay" String="&name;" />
        <DetectIdentifier />
        <IncludeRules context="FindEntityRefs" />
        <AnyChar attribute="Invalid" context="#stay" String="$&amp;&lt;" />
      </context>

      <context name="xpathSQ" attribute="XPath" lineEndContext="#stay">
        <keyword attribute="XPath/ XSLT Function" context="#stay" String="functions" />
        <keyword attribute="XPath 2.0/ XSLT 2.0 Function" context="#stay" String="functions_2.0" />
        <RegExpr attribute="XPath Axis" context="#stay" String="(&axisname;)::" />
        <DetectChar attribute="XPath" context="#pop" char="}" />
        <DetectChar attribute="XPath String" context="xpathStringDQ" char="&quot;" />
        <DetectChar attribute="XPath" context="#pop#pop" char="'" />
        <RegExpr attribute="XPath Attribute" context="#stay" String="@&name;" />
        <RegExpr attribute="Variable" context="#stay" String="\$&name;" />
        <RegExpr attribute="XPath" context="#stay" String="&name;" />
        <DetectIdentifier />
        <IncludeRules context="FindEntityRefs" />
        <AnyChar attribute="Invalid" context="#stay" String="$&amp;&lt;" />
      </context>

      <context name="xpathStringSQ" attribute="XPath String" lineEndContext="#stay">
        <DetectChar attribute="XPath String" context="#pop" char="'" />
        <DetectIdentifier />
        <IncludeRules context="FindEntityRefs" />
        <IncludeRules context="FindReservedChar" />
      </context>

      <context name="xpathStringDQ" attribute="XPath String" lineEndContext="#stay">
        <DetectChar attribute="XPath String" context="#pop" char="&quot;" />
        <DetectIdentifier />
        <IncludeRules context="FindEntityRefs" />
        <IncludeRules context="FindReservedChar" />
      </context>
       
    </contexts>

    <itemDatas>
      <itemData name="Normal Text" defStyleNum="dsNormal"/>
      <itemData name="Other Text" defStyleNum="dsNormal" />
      <itemData name="Tag" defStyleNum="dsKeyword" spellChecking="false"/>
      <itemData name="Tag Symbols" defStyleNum="dsKeyword" spellChecking="false" />
      <itemData name="Attribute" defStyleNum="dsOthers" spellChecking="false"/>
      <itemData name="XSLT XPath Attribute" defStyleNum="dsOthers" spellChecking="false"/>
      <itemData name="Attribute Separator" defStyleNum="dsOthers" spellChecking="false"/>
      <itemData name="Value" defStyleNum="dsAttribute"/>
      <itemData name="Invalid" defStyleNum="dsError" spellChecking="false"/>
      <itemData name="Attribute Value" defStyleNum="dsString"/>
      <itemData name="XPath" defStyleNum="dsVariable" bold="0" italic="0"/>
      <itemData name="XPath String" defStyleNum="dsString"/>
      <itemData name="XPath Axis" defStyleNum="dsVariable" bold="0" italic="1"/>
      <itemData name="XPath/ XSLT Function" defStyleNum="dsVariable" bold="1" italic="0" spellChecking="false"/>
      <itemData name="XPath 2.0/ XSLT 2.0 Function" defStyleNum="dsVariable" bold="1" italic="0" spellChecking="false"/>
      <itemData name="XPath Attribute" defStyleNum="dsVariable" bold="0" italic="1" spellChecking="false"/>
      <itemData name="Variable" defStyleNum="dsVariable" bold="0" italic="1" spellChecking="false"/>
      <itemData name="Comment" defStyleNum="dsComment"/>
      <itemData name="XSLT Tag" defStyleNum="dsBuiltIn" bold="1" spellChecking="false"/>
      <itemData name="XSLT 2.0 Tag" defStyleNum="dsBuiltIn" bold="1" spellChecking="false"/>
      <itemData name="Entity Reference" defStyleNum="dsDecVal" spellChecking="false"/>

      <itemData name="CDATA" defStyleNum="dsBaseN" bold="1" spellChecking="false"/>
      <itemData name="CDATA Symbols"   defStyleNum="dsBaseN"    bold="0" italic="0" spellChecking="false" />
      <itemData name="Processing Instruction" defStyleNum="dsKeyword" spellChecking="false"/>
      <itemData name="PI Symbols" defStyleNum="dsFunction" bold="0" italic="0" spellChecking="false" />
      <itemData name="Doctype" defStyleNum="dsDataType" bold="1" spellChecking="false"/>
      <itemData name="Doctype Name" defStyleNum="dsDataType" bold="0" italic="0" spellChecking="false" />
      <itemData name="Doctype Symbols" defStyleNum="dsDataType" bold="0" italic="0" spellChecking="false" />
      <itemData name="PEntity Reference" defStyleNum="dsDecVal" spellChecking="false"/>
    </itemDatas>

  </highlighting>
  <general>
    <comments>
      <comment name="multiLine" start="&lt;!--" end="--&gt;" region="comment" />
    </comments>
    <keywords casesensitive="0" weakDeliminator="-:" additionalDeliminator="&quot;{}"/>
  </general>
</language>
<!-- kate: space-indent on; replace-tabs on; tab-width 2; indent-width 2; -->
