/usr/share/gtksourceview-3.0/language-specs/xml.lang is in libgtksourceview-3.0-common 3.10.2-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 | <?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Authors: Marco Barisione, Emanuele Aina, Paolo Borelli
Copyright (C) 2005-2007 Marco Barisione <barisione@gmail.com>
Copyright (C) 2005-2007 Emanuele Aina
Copyright (C) 2007 Paolo Borelli
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-->
<language id="xml" _name="XML" version="2.0" _section="Markup">
<metadata>
<property name="mimetypes">application/xml;text/xml</property>
<property name="globs">*.xml;*.xspf;*.siv;*.smil;*.smi;*.sml;*.kino;*.xul;*.xbel;*.abw;*.zabw;*.glade;*.jnlp;*.xhtml;*.svg;*.mml;*.rdf;*.rss;*.wml;*.xmi;*.fo;*.xslfo</property>
<property name="block-comment-start"><!--</property>
<property name="block-comment-end">--></property>
</metadata>
<styles>
<style id="comment" _name="Comment" map-to="def:comment"/>
<style id="doctype" _name="DOCTYPE" map-to="def:preprocessor"/>
<style id="cdata-delim" _name="CDATA delimiter" map-to="def:preprocessor"/>
<style id="processing-instruction" _name="Processing instruction" map-to="def:preprocessor"/>
<style id="element-name" _name="Element name" map-to="def:identifier"/>
<style id="attribute-name" _name="Attribute name" map-to="def:type"/>
<style id="attribute-value" _name="Attribute value" map-to="def:string"/>
<style id="entity" _name="Entity" map-to="def:preprocessor"/>
<style id="tag" _name="Tag"/>
<style id="namespace" _name="Namespace" map-to="xml:element-name"/>
<style id="error" _name="Error" map-to="def:error"/>
</styles>
<definitions>
<define-regex id="prefix">[[:alpha:]_][[:alnum:]._-]*</define-regex>
<define-regex id="name">[[:alpha:]_][[:alnum:].:_-]*</define-regex>
<context id="entity" style-ref="entity" class="no-spell-check">
<match>&\%{name};</match>
</context>
<context id="character-reference" style-ref="entity">
<match>&#([0-9]+|x[a-fA-F0-9]+);</match>
</context>
<context id="unallowed-chars" style-ref="error" extend-parent="false">
<match>[&<]</match>
</context>
<context id="comment" style-ref="comment" class="comment">
<start><!--</start>
<end>--></end>
<include>
<context style-ref="error" extend-parent="false">
<match>--+</match>
</context>
<context ref="def:in-comment"/>
</include>
</context>
<context id="doctype" class="no-spell-check">
<start>(<!DOCTYPE)\s+(\%{name})</start>
<end>></end>
<include>
<context sub-pattern="1" where="start" style-ref="doctype"/>
<context sub-pattern="2" where="start" style-ref="doctype"/>
<context sub-pattern="0" where="end" style-ref="doctype"/>
<context>
<match>(SYSTEM)\s+(\"[^\"]*\")</match>
<include>
<context sub-pattern="1" style-ref="doctype"/>
<context sub-pattern="2" style-ref="attribute-value"/>
</include>
</context>
<context>
<match>(PUBLIC)\s+(\"[^\"]*\")\s+(\"[^\"]*\")</match>
<include>
<context sub-pattern="1" style-ref="doctype"/>
<context sub-pattern="2" style-ref="attribute-value"/>
<context sub-pattern="3" style-ref="attribute-value"/>
</include>
</context>
<context>
<start>\[</start>
<end>\]</end>
<include>
<context sub-pattern="0" where="start" style-ref="doctype"/>
<context sub-pattern="0" where="end" style-ref="doctype"/>
<context ref="dtd:dtd"/>
</include>
</context>
</include>
</context>
<context id="cdata" class="no-spell-check">
<start><!\[CDATA\[</start>
<end>\]\]></end>
<include>
<context sub-pattern="0" where="start" style-ref="cdata-delim" class="no-spell-check"/>
<context sub-pattern="0" where="end" style-ref="cdata-delim"/>
</include>
</context>
<context id="processing-instruction" style-ref="processing-instruction">
<start><\?</start>
<end>\?></end>
</context>
<!-- The following three contexts can be <replace>d in xml
dialect lang files, to custommize highlighting, e.g.
highlighting docbook tags as keywords -->
<context id="namespace" style-ref="namespace" class="no-spell-check">
<match>(?<!:)\%{prefix}:</match>
</context>
<!-- Match attribute-name before element-name otherwise
"text" in <fo:block text-align="left"> is detected as
element -->
<context id="attribute-name" style-ref="attribute-name" class="no-spell-check">
<match>\b\%{name}\s*=</match>
</context>
<context id="attribute-value" style-ref="attribute-value" class="string" class-disabled="no-spell-check">
<start>["']</start>
<end>\%{0@start}</end>
<include>
<context ref="entity"/>
<context ref="character-reference"/>
<context ref="unallowed-chars"/>
</include>
</context>
<context id="element-name" once-only="true" style-ref="element-name" class="no-spell-check">
<match>\b\%{name}\b(?!\s*=)</match>
</context>
<context id="prolog" class="no-spell-check">
<start><\?xml</start>
<end>\?></end>
<include>
<context sub-pattern="0" where="start" style-ref="processing-instruction"/>
<context sub-pattern="0" where="end" style-ref="processing-instruction"/>
<context ref="attribute-value"/>
<context ref="attribute-name"/>
</include>
</context>
<context id="start-tag" style-ref="tag" class="no-spell-check">
<start><(?!/)</start>
<end>/?></end>
<include>
<context sub-pattern="0" where="start" style-ref="element-name"/>
<context sub-pattern="0" where="end" style-ref="element-name"/>
<context ref="entity"/>
<context ref="character-reference"/>
<context ref="unallowed-chars"/>
<context ref="namespace"/>
<context ref="attribute-name"/>
<context ref="attribute-value"/>
<context ref="element-name"/>
<context style-ref="error" extend-parent="false">
<match>\S</match>
</context>
</include>
</context>
<context id="end-tag" style-ref="tag" class="no-spell-check">
<start></</start>
<end>></end>
<include>
<context sub-pattern="0" where="start" style-ref="element-name"/>
<context sub-pattern="0" where="end" style-ref="element-name"/>
<context ref="entity"/>
<context ref="character-reference"/>
<context ref="unallowed-chars"/>
<context ref="namespace"/>
<context ref="element-name"/>
<context style-ref="error" extend-parent="false">
<match>\S</match>
</context>
</include>
</context>
<context id="close-tag-outside-tag" style-ref="error">
<match>/></match>
</context>
<context id="xml">
<include>
<context ref="comment"/>
<context ref="doctype"/>
<context ref="cdata"/>
<context ref="prolog"/>
<context ref="processing-instruction"/>
<context ref="start-tag"/>
<context ref="end-tag"/>
<context ref="entity"/>
<context ref="character-reference"/>
<context ref="unallowed-chars"/>
<context ref="close-tag-outside-tag"/>
</include>
</context>
</definitions>
</language>
|