| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<!-- |
| 3 |
SPDX-FileCopyrightText: 2001 Joseph Wenninger <[email protected]> |
| 4 |
SPDX-FileCopyrightText: 2002 Anders Lund <[email protected]> |
| 5 |
SPDX-FileCopyrightText: 2003 Simon Huerlimann <[email protected]> |
| 6 |
SPDX-FileCopyrightText: 2005 Dominik Haumann <[email protected]> |
| 7 |
SPDX-FileCopyrightText: 2008 Wilbert Berendsen <[email protected]> |
| 8 |
|
| 9 |
This file describes the XML format used for syntax highlight descriptions |
| 10 |
for the Kate text editor (http://kate.kde.org), which is part of the KDE |
| 11 |
desktop environment (http://www.kde.org). |
| 12 |
You'll find the "Writing a Kate Highlighting XML File HOWTO" at |
| 13 |
http://kate.kde.org/doc/hlhowto.php |
| 14 |
|
| 15 |
This format is identified using the SYSTEM identifier |
| 16 |
SYSTEM "language.dtd" |
| 17 |
|
| 18 |
Files using this format should include a DOCTYPE declaration like this: |
| 19 |
<!DOCTYPE language SYSTEM "language.dtd"> |
| 20 |
|
| 21 |
You can validate your syntax files using "validatehl.sh yourSyntax.xml". |
| 22 |
This needs xmllint from the libxml2 XML library. |
| 23 |
|
| 24 |
In any case, the katehighlightingindexer will validate all files bundled |
| 25 |
with KTextEditor during compile time and fail on errors. |
| 26 |
|
| 27 |
To use your syntax file, copy it to ~/.local/share/katepart5/syntax/ in |
| 28 |
your home directory. You have to open a new instance of kwrite/kate to use |
| 29 |
the new syntax file. |
| 30 |
|
| 31 |
TODO |
| 32 |
- find a more readable way for the - -dtdvalid stuff, it's just annoying |
| 33 |
xml comments don't allow it. |
| 34 |
--> |
| 35 |
<!-- |
| 36 |
Entity declarations |
| 37 |
You can use '&per;' instead of '.'. This seems to be useful in <item> elements. |
| 38 |
|
| 39 |
TODO |
| 40 |
- Are there any more such pre-defined entities? |
| 41 |
--> |
| 42 |
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> |
| 43 |
<!-- |
| 44 |
Default Styles |
| 45 |
Allowed predefined default styles for itemData, available are: |
| 46 |
- dsNormal, used for normal text |
| 47 |
- dsKeyword, used for keywords |
| 48 |
- dsFunction, used for function calls |
| 49 |
- dsVariable, used for variables |
| 50 |
- dsControlFlow, used for control flow, e.g. if, then, else, continue, break |
| 51 |
- dsOperator, used for operators such as +, -, *, :: |
| 52 |
- dsBuiltIn, used for built-in language classes and functions |
| 53 |
- dsExtension,used for extensions, such as boost, Qt |
| 54 |
- dsPreprocessor, used for preprocessor statements |
| 55 |
- dsAttribute,used for attributes, e.g. @override in java |
| 56 |
|
| 57 |
- dsChar, used for a character |
| 58 |
- dsSpecialChar, used for escaped characters |
| 59 |
- dsString, used for strings |
| 60 |
- dsVerbatimString, used for strings such as HERE docs |
| 61 |
- dsSpecialString, used for strings such as regular expressions or LaTeX math mode |
| 62 |
- dsImport, used for includes, imports and modules |
| 63 |
|
| 64 |
- dsDataType, used for data types |
| 65 |
- dsDecVal, used for decimal values |
| 66 |
- dsBaseN, used for values with a base other than 10 |
| 67 |
- dsFloat, used for float values |
| 68 |
- dsConstant, used for language constants |
| 69 |
|
| 70 |
- dsComment, used for comments |
| 71 |
- dsDocumentation, used for comments that are API documentation |
| 72 |
- dsAnnotation, used for annotation in comments, e.g. @param in doxygen |
| 73 |
- dsCommentVar, used for variables in comments, e.g. after @param in doxygen |
| 74 |
- dsRegionMarker, used for region markers |
| 75 |
- dsInformation, used for information in comments, e.g. @note in doxygen |
| 76 |
- dsWarning, used for warnings in comments, e.g. @warning in doxygen |
| 77 |
- dsAlert, used for warning messages such as TODO, WARNING in comments |
| 78 |
|
| 79 |
- dsOthers, used for 'other' things |
| 80 |
- dsError, used for error highlighting. |
| 81 |
--> |
| 82 |
<xs:simpleType name="defStyles"> |
| 83 |
<xs:restriction base="xs:token"> |
| 84 |
<xs:enumeration value="dsNormal"/> |
| 85 |
<xs:enumeration value="dsKeyword"/> |
| 86 |
<xs:enumeration value="dsFunction"/> |
| 87 |
<xs:enumeration value="dsVariable"/> |
| 88 |
<xs:enumeration value="dsControlFlow"/> |
| 89 |
<xs:enumeration value="dsOperator"/> |
| 90 |
<xs:enumeration value="dsBuiltIn"/> |
| 91 |
<xs:enumeration value="dsExtension"/> |
| 92 |
<xs:enumeration value="dsPreprocessor"/> |
| 93 |
<xs:enumeration value="dsAttribute"/> |
| 94 |
<xs:enumeration value="dsChar"/> |
| 95 |
<xs:enumeration value="dsSpecialChar"/> |
| 96 |
<xs:enumeration value="dsString"/> |
| 97 |
<xs:enumeration value="dsVerbatimString"/> |
| 98 |
<xs:enumeration value="dsSpecialString"/> |
| 99 |
<xs:enumeration value="dsImport"/> |
| 100 |
<xs:enumeration value="dsDataType"/> |
| 101 |
<xs:enumeration value="dsDecVal"/> |
| 102 |
<xs:enumeration value="dsBaseN"/> |
| 103 |
<xs:enumeration value="dsFloat"/> |
| 104 |
<xs:enumeration value="dsConstant"/> |
| 105 |
<xs:enumeration value="dsComment"/> |
| 106 |
<xs:enumeration value="dsDocumentation"/> |
| 107 |
<xs:enumeration value="dsAnnotation"/> |
| 108 |
<xs:enumeration value="dsCommentVar"/> |
| 109 |
<xs:enumeration value="dsRegionMarker"/> |
| 110 |
<xs:enumeration value="dsInformation"/> |
| 111 |
<xs:enumeration value="dsWarning"/> |
| 112 |
<xs:enumeration value="dsAlert"/> |
| 113 |
<xs:enumeration value="dsOthers"/> |
| 114 |
<xs:enumeration value="dsError"/> |
| 115 |
</xs:restriction> |
| 116 |
</xs:simpleType> |
| 117 |
<!-- |
| 118 |
Char type |
| 119 |
A sequence of exactly 1 character |
| 120 |
--> |
| 121 |
<xs:simpleType name="char"> |
| 122 |
<xs:restriction base="xs:string"> |
| 123 |
<xs:length value="1"/> |
| 124 |
</xs:restriction> |
| 125 |
</xs:simpleType> |
| 126 |
<!-- |
| 127 |
Language specification |
| 128 |
name: The name of this syntax description. Used in the Highlightning Mode menu |
| 129 |
section: The logical group to which this syntax description belongs. Used for sub menus |
| 130 |
extensions: A file glob or pattern to decide for which documents to use this syntax description |
| 131 |
style: The style that this highlighter provides. It is used through required-syntax-style by the indenters. [optional] |
| 132 |
mimetype: A list of mimetypes to decide for which documents to use this syntax description [optional] |
| 133 |
version: Version number of this syntax description |
| 134 |
kateversion: Kate version required for using this file |
| 135 |
casesensitive: Whether text is matched case sensitive. [boolean, optional, default=true] FIXME: This is not implemented yet |
| 136 |
priority: Priority of this language, if more than one are usable for the file [optional] |
| 137 |
author: Name of author of this hl file [optional] |
| 138 |
license: License for this hl file [optional] |
| 139 |
indenter: Name of the Indenter to use for this highlighting mode per default, like "cstyle" [optional] |
| 140 |
hidden: Should it be hidden in menu [boolean, optional, default=false] |
| 141 |
|
| 142 |
TODO |
| 143 |
- Which matches are affected by casesensitive? keyword, RegExpr, StringDetect, WordDetect...? |
| 144 |
|
| 145 |
WARNING: due to helper scripts, the language opening tag must be on a |
| 146 |
*single line* and *cannot* be split in multiple lines. |
| 147 |
|
| 148 |
--> |
| 149 |
<xs:element name="language"> |
| 150 |
<xs:complexType> |
| 151 |
<xs:sequence> |
| 152 |
<xs:element ref="highlighting"/> |
| 153 |
<xs:element minOccurs="0" ref="general"/> |
| 154 |
<xs:element minOccurs="0" ref="spellchecking"/> |
| 155 |
</xs:sequence> |
| 156 |
<xs:attribute name="name" use="required"/> |
| 157 |
<xs:attribute name="section" use="required" type="xs:NMTOKEN"/> |
| 158 |
<xs:attribute name="extensions" use="required"/> |
| 159 |
<xs:attribute name="version" use="required" type="xs:integer"/> |
| 160 |
<xs:attribute name="kateversion" use="required" type="xs:decimal"/> |
| 161 |
<xs:attribute name="style"/> |
| 162 |
<xs:attribute name="mimetype"/> |
| 163 |
<xs:attribute name="casesensitive" type="xs:boolean"/> |
| 164 |
<xs:attribute name="priority" type="xs:integer"/> |
| 165 |
<xs:attribute name="author"/> |
| 166 |
<xs:attribute name="license"/> |
| 167 |
<xs:attribute name="indenter"/> |
| 168 |
<xs:attribute name="hidden" type="xs:boolean"/> |
| 169 |
</xs:complexType> |
| 170 |
</xs:element> |
| 171 |
<!-- General options --> |
| 172 |
<xs:element name="general"> |
| 173 |
<xs:complexType> |
| 174 |
<xs:choice minOccurs="0" maxOccurs="unbounded"> |
| 175 |
<xs:element ref="folding"/> |
| 176 |
<xs:element ref="comments"/> |
| 177 |
<xs:element ref="keywords"/> |
| 178 |
<xs:element ref="emptyLines"/> |
| 179 |
</xs:choice> |
| 180 |
</xs:complexType> |
| 181 |
</xs:element> |
| 182 |
<!-- |
| 183 |
List of folding |
| 184 |
indentationsensitive: If true, the code folding is indentation based. |
| 185 |
--> |
| 186 |
<xs:element name="folding"> |
| 187 |
<xs:complexType> |
| 188 |
<xs:attribute name="indentationsensitive" type="xs:boolean"/> |
| 189 |
</xs:complexType> |
| 190 |
</xs:element> |
| 191 |
<!-- List of comments --> |
| 192 |
<xs:element name="comments"> |
| 193 |
<xs:complexType> |
| 194 |
<xs:sequence> |
| 195 |
<xs:element maxOccurs="unbounded" ref="comment"/> |
| 196 |
</xs:sequence> |
| 197 |
</xs:complexType> |
| 198 |
</xs:element> |
| 199 |
<!-- |
| 200 |
Comment specification |
| 201 |
name: Type of this comment. Allowed are 'singleLine' and 'multiLine' |
| 202 |
start: The comment starts with this string |
| 203 |
end: The comment ends with this string [optional] |
| 204 |
region: The region name of the foldable multiline comment. If you have |
| 205 |
beginRegion="Comment" ... endRegion="Comment" you should use |
| 206 |
region="Comment". This way uncomment works even if you do not |
| 207 |
select all the text of the multiline comment. |
| 208 |
position: only availalbe for type singleLine. Default is column0, to insert |
| 209 |
the single line comment characters after the whitespaces |
| 210 |
(= before the first non space) set position to "afterwhitespace" |
| 211 |
--> |
| 212 |
<xs:element name="comment"> |
| 213 |
<xs:complexType> |
| 214 |
<xs:attribute name="name" use="required"> |
| 215 |
<xs:simpleType> |
| 216 |
<xs:restriction base="xs:token"> |
| 217 |
<xs:enumeration value="singleLine"/> |
| 218 |
<xs:enumeration value="multiLine"/> |
| 219 |
</xs:restriction> |
| 220 |
</xs:simpleType> |
| 221 |
</xs:attribute> |
| 222 |
<xs:attribute name="start" use="required"/> |
| 223 |
<xs:attribute name="end"/> |
| 224 |
<xs:attribute name="region"/> |
| 225 |
<xs:attribute name="position"> |
| 226 |
<xs:simpleType> |
| 227 |
<xs:restriction base="xs:token"> |
| 228 |
<xs:enumeration value="afterwhitespace"/> |
| 229 |
</xs:restriction> |
| 230 |
</xs:simpleType> |
| 231 |
</xs:attribute> |
| 232 |
</xs:complexType> |
| 233 |
</xs:element> |
| 234 |
<!-- |
| 235 |
Keyword options |
| 236 |
casesensitive: Whether keywords are matched case sensitive. [boolean, optional, default=true] |
| 237 |
weakDeliminator: Add weak deliminators [optional, default: ""] |
| 238 |
additionalDeliminator: Add deliminators [optional] |
| 239 |
wordWrapDeliminator: characters that are used to wrap long lines [optional] |
| 240 |
|
| 241 |
--> |
| 242 |
<xs:element name="keywords"> |
| 243 |
<xs:complexType> |
| 244 |
<xs:attribute name="casesensitive" type="xs:boolean"/> |
| 245 |
<xs:attribute name="weakDeliminator"/> |
| 246 |
<xs:attribute name="additionalDeliminator"/> |
| 247 |
<xs:attribute name="wordWrapDeliminator"/> |
| 248 |
</xs:complexType> |
| 249 |
</xs:element> |
| 250 |
<!-- |
| 251 |
Treat lines that match a given regular expression as empty line. This is |
| 252 |
needed for example in Python for comments (#...), as then the indentation |
| 253 |
based folding should ignore the line. |
| 254 |
This is only implemented for indentation based folding. If the folding |
| 255 |
is not indentation based, the emptyLines are not used. |
| 256 |
--> |
| 257 |
<xs:element name="emptyLines"> |
| 258 |
<xs:complexType> |
| 259 |
<xs:sequence> |
| 260 |
<xs:element minOccurs="0" maxOccurs="unbounded" ref="emptyLine"/> |
| 261 |
</xs:sequence> |
| 262 |
</xs:complexType> |
| 263 |
</xs:element> |
| 264 |
<!-- |
| 265 |
One empty line regular expression. |
| 266 |
regexpr: The regular expression, example from python: ^\s*#.*$ |
| 267 |
casesensitive: Sets, whether the regular expression match is performed case sesitive |
| 268 |
--> |
| 269 |
<xs:element name="emptyLine"> |
| 270 |
<xs:complexType> |
| 271 |
<xs:attribute name="regexpr" use="required"/> |
| 272 |
<xs:attribute name="casesensitive" type="xs:boolean"/> |
| 273 |
</xs:complexType> |
| 274 |
</xs:element> |
| 275 |
<!-- Highlighting specification --> |
| 276 |
<xs:element name="highlighting"> |
| 277 |
<xs:complexType> |
| 278 |
<xs:sequence> |
| 279 |
<xs:element minOccurs="0" maxOccurs="unbounded" ref="list"/> |
| 280 |
<xs:element ref="contexts"/> |
| 281 |
<xs:element ref="itemDatas"/> |
| 282 |
</xs:sequence> |
| 283 |
</xs:complexType> |
| 284 |
</xs:element> |
| 285 |
<!-- |
| 286 |
List of items |
| 287 |
name: Name of this list |
| 288 |
--> |
| 289 |
<xs:element name="list"> |
| 290 |
<xs:complexType> |
| 291 |
<xs:choice minOccurs="0" maxOccurs="unbounded"> |
| 292 |
<xs:element ref="item"/> |
| 293 |
<xs:element ref="include"/> |
| 294 |
</xs:choice> |
| 295 |
<xs:attribute name="name" use="required"/> |
| 296 |
</xs:complexType> |
| 297 |
</xs:element> |
| 298 |
<!-- |
| 299 |
List item |
| 300 |
contains string used in <keyword> |
| 301 |
--> |
| 302 |
<xs:element name="item" type="xs:string"/> |
| 303 |
<!-- |
| 304 |
List include |
| 305 |
contains a name of <keyword> |
| 306 |
--> |
| 307 |
<xs:element name="include" type="xs:string"/> |
| 308 |
<!-- List of contexts --> |
| 309 |
<xs:element name="contexts"> |
| 310 |
<xs:complexType> |
| 311 |
<xs:sequence> |
| 312 |
<xs:element maxOccurs="unbounded" ref="context"/> |
| 313 |
</xs:sequence> |
| 314 |
</xs:complexType> |
| 315 |
</xs:element> |
| 316 |
<!-- |
| 317 |
context specification |
| 318 |
name: The name of this context specification. Used in '*Context' attributes [optional] |
| 319 |
attribute: The name of the ItemData to be used for matching text |
| 320 |
lineEndContext: Next context if end of line is encountered |
| 321 |
lineEmptyContext: Next context if an empty line is encountered [optional] |
| 322 |
fallthrough: Use a fallthrough context [optional] |
| 323 |
deprecated since 5.62 but preserved to maintain compatibility in older versions of KF5 |
| 324 |
fallthroughContext: Fall through to this context [optional] |
| 325 |
dynamic: Dynamic context [boolean, optional] |
| 326 |
noIndentationBasedFolding: Python uses indentation based folding. However, Python has parts where |
| 327 |
it does not use indentation based folding (e.g. for """ strings). In this case |
| 328 |
switch to an own context and set this attribute to true. Then the indentation |
| 329 |
based folding will ignore this parts and not change folding markers. [optional] |
| 330 |
|
| 331 |
TODO: |
| 332 |
- Explain fallthrough. |
| 333 |
- Make lineEndContext optional, defaults to '#stay'. Reasonable? |
| 334 |
--> |
| 335 |
<xs:element name="context"> |
| 336 |
<xs:complexType> |
| 337 |
<xs:choice minOccurs="0" maxOccurs="unbounded"> |
| 338 |
<xs:element ref="keyword"/> |
| 339 |
<xs:element ref="Float"/> |
| 340 |
<xs:element ref="HlCOct"/> |
| 341 |
<xs:element ref="HlCHex"/> |
| 342 |
<xs:element ref="Int"/> |
| 343 |
<xs:element ref="DetectChar"/> |
| 344 |
<xs:element ref="Detect2Chars"/> |
| 345 |
<xs:element ref="AnyChar"/> |
| 346 |
<xs:element ref="StringDetect"/> |
| 347 |
<xs:element ref="WordDetect"/> |
| 348 |
<xs:element ref="RegExpr"/> |
| 349 |
<xs:element ref="LineContinue"/> |
| 350 |
<xs:element ref="HlCStringChar"/> |
| 351 |
<xs:element ref="RangeDetect"/> |
| 352 |
<xs:element ref="HlCChar"/> |
| 353 |
<xs:element ref="IncludeRules"/> |
| 354 |
<xs:element ref="DetectSpaces"/> |
| 355 |
<xs:element ref="DetectIdentifier"/> |
| 356 |
</xs:choice> |
| 357 |
<xs:attribute name="name"/> |
| 358 |
<xs:attribute name="attribute" use="required"/> |
| 359 |
<xs:attribute name="lineEndContext" use="required"/> |
| 360 |
<xs:attribute name="lineEmptyContext"/> |
| 361 |
<xs:attribute name="fallthrough"> |
| 362 |
<xs:simpleType> |
| 363 |
<!-- alway true since 5.62 --> |
| 364 |
<xs:restriction base="xs:token"> |
| 365 |
<xs:enumeration value="1"/> |
| 366 |
<xs:enumeration value="true"/> |
| 367 |
</xs:restriction> |
| 368 |
</xs:simpleType> |
| 369 |
</xs:attribute> |
| 370 |
<xs:attribute name="fallthroughContext"/> |
| 371 |
<xs:attribute name="dynamic" type="xs:boolean"/> |
| 372 |
<xs:attribute name="noIndentationBasedFolding" type="xs:boolean"/> |
| 373 |
</xs:complexType> |
| 374 |
</xs:element> |
| 375 |
<!-- |
| 376 |
Common attributes |
| 377 |
attribute: The name of the ItemData to be used for matching text |
| 378 |
context: The name of the context to go to when this rule matches |
| 379 |
beginRegion: Begin a region of type beginRegion [optional] |
| 380 |
endRegion: End a region of type endRegion [optional] |
| 381 |
firstNonSpace: should this rule only match at first non-space char in line? |
| 382 |
column: should this rule only match at given column in line (column == count of chars in front) |
| 383 |
--> |
| 384 |
<xs:attributeGroup name="commonAttributes"> |
| 385 |
<xs:attribute name="attribute"/> |
| 386 |
<xs:attribute name="context"/> |
| 387 |
<xs:attribute name="beginRegion"/> |
| 388 |
<xs:attribute name="endRegion"/> |
| 389 |
<xs:attribute name="lookAhead" type="xs:boolean"/> |
| 390 |
<xs:attribute name="firstNonSpace" type="xs:boolean"/> |
| 391 |
<xs:attribute name="column" type="xs:integer"/> |
| 392 |
</xs:attributeGroup> |
| 393 |
<!-- |
| 394 |
Detect members of a keyword list |
| 395 |
commonAttributes: Common attributes |
| 396 |
insensitive: Is this list case-insensitive? [boolean, optional, see note] |
| 397 |
String: Name of the list |
| 398 |
weakDeliminator: Add weak deliminators [optional, see note] |
| 399 |
additionalDeliminator: Add deliminators [optional, see note] |
| 400 |
|
| 401 |
By default, case sensitivity is determined from <keywords casesensitive> in |
| 402 |
<general> (default=true), but can be overridden per-list with 'insensitive'. |
| 403 |
|
| 404 |
weakDeliminator and additionalDeliminator are accumulated to those defined in |
| 405 |
<keywords weakDeliminator additionalDeliminator> in <general>. |
| 406 |
--> |
| 407 |
<xs:element name="keyword"> |
| 408 |
<xs:complexType> |
| 409 |
<xs:attributeGroup ref="commonAttributes"/> |
| 410 |
<xs:attribute name="insensitive" type="xs:boolean"/> |
| 411 |
<xs:attribute name="String" use="required"/> |
| 412 |
<xs:attribute name="weakDeliminator"/> |
| 413 |
<xs:attribute name="additionalDeliminator"/> |
| 414 |
</xs:complexType> |
| 415 |
</xs:element> |
| 416 |
<!-- |
| 417 |
Detect a floating point number |
| 418 |
commonAttributes: Common attributes |
| 419 |
weakDeliminator: Add weak deliminators [optional] |
| 420 |
additionalDeliminator: Add deliminators [optional] |
| 421 |
--> |
| 422 |
<xs:element name="Float"> |
| 423 |
<xs:complexType> |
| 424 |
<xs:attributeGroup ref="commonAttributes"/> |
| 425 |
<xs:attribute name="weakDeliminator"/> |
| 426 |
<xs:attribute name="additionalDeliminator"/> |
| 427 |
</xs:complexType> |
| 428 |
</xs:element> |
| 429 |
<!-- |
| 430 |
Detect an octal number |
| 431 |
commonAttributes: Common attributes |
| 432 |
weakDeliminator: Add weak deliminators [optional] |
| 433 |
additionalDeliminator: Add deliminators [optional] |
| 434 |
--> |
| 435 |
<xs:element name="HlCOct"> |
| 436 |
<xs:complexType> |
| 437 |
<xs:attributeGroup ref="commonAttributes"/> |
| 438 |
<xs:attribute name="weakDeliminator"/> |
| 439 |
<xs:attribute name="additionalDeliminator"/> |
| 440 |
</xs:complexType> |
| 441 |
</xs:element> |
| 442 |
<!-- |
| 443 |
Detect a hexadecimal number |
| 444 |
commonAttributes: Common attributes |
| 445 |
weakDeliminator: Add weak deliminators [optional] |
| 446 |
additionalDeliminator: Add deliminators [optional] |
| 447 |
--> |
| 448 |
<xs:element name="HlCHex"> |
| 449 |
<xs:complexType> |
| 450 |
<xs:attributeGroup ref="commonAttributes"/> |
| 451 |
<xs:attribute name="weakDeliminator"/> |
| 452 |
<xs:attribute name="additionalDeliminator"/> |
| 453 |
</xs:complexType> |
| 454 |
</xs:element> |
| 455 |
<!-- |
| 456 |
Detect C-style character |
| 457 |
commonAttributes: Common attributes |
| 458 |
|
| 459 |
TODO |
| 460 |
- Did I get this right? |
| 461 |
--> |
| 462 |
<xs:element name="HlCChar"> |
| 463 |
<xs:complexType> |
| 464 |
<xs:attributeGroup ref="commonAttributes"/> |
| 465 |
</xs:complexType> |
| 466 |
</xs:element> |
| 467 |
<!-- |
| 468 |
Detect an integer number |
| 469 |
commonAttributes: Common attributes |
| 470 |
weakDeliminator: Add weak deliminators [optional] |
| 471 |
additionalDeliminator: Add deliminators [optional] |
| 472 |
--> |
| 473 |
<xs:element name="Int"> |
| 474 |
<xs:complexType> |
| 475 |
<xs:attributeGroup ref="commonAttributes"/> |
| 476 |
<xs:attribute name="weakDeliminator"/> |
| 477 |
<xs:attribute name="additionalDeliminator"/> |
| 478 |
</xs:complexType> |
| 479 |
</xs:element> |
| 480 |
<!-- |
| 481 |
Detect a single character |
| 482 |
commonAttributes: Common attributes |
| 483 |
char: The character to look for |
| 484 |
dynamic: Uses 1 .. 9 as placeholders for dynamic arguments (in fact, first char of arg...) [boolean, optional, default=false] |
| 485 |
--> |
| 486 |
<xs:element name="DetectChar"> |
| 487 |
<xs:complexType> |
| 488 |
<xs:attributeGroup ref="commonAttributes"/> |
| 489 |
<xs:attribute name="char" type="char" use="required"/> |
| 490 |
<xs:attribute name="dynamic" type="xs:boolean"/> |
| 491 |
</xs:complexType> |
| 492 |
</xs:element> |
| 493 |
<!-- |
| 494 |
Detect two characters |
| 495 |
commonAttributes: Common attributes |
| 496 |
char: The first character |
| 497 |
char1: The second character |
| 498 |
--> |
| 499 |
<xs:element name="Detect2Chars"> |
| 500 |
<xs:complexType> |
| 501 |
<xs:attributeGroup ref="commonAttributes"/> |
| 502 |
<xs:attribute name="char" type="char" use="required"/> |
| 503 |
<xs:attribute name="char1" type="char" use="required"/> |
| 504 |
</xs:complexType> |
| 505 |
</xs:element> |
| 506 |
<!-- |
| 507 |
Detect any group of characters |
| 508 |
commonAttributes: Common attributes |
| 509 |
String: A string representing the characters to look for |
| 510 |
|
| 511 |
TODO |
| 512 |
- Description is not descriptive enough, I'm not sure what it exactly does:-( |
| 513 |
--> |
| 514 |
<xs:element name="AnyChar"> |
| 515 |
<xs:complexType> |
| 516 |
<xs:attributeGroup ref="commonAttributes"/> |
| 517 |
<xs:attribute name="String" use="required"/> |
| 518 |
</xs:complexType> |
| 519 |
</xs:element> |
| 520 |
<!-- |
| 521 |
Detect a string |
| 522 |
commonAttributes: Common attributes |
| 523 |
String: The string to look for |
| 524 |
insensitive: Whether the string is matched case INsensitive. [boolean, optional, default=false] |
| 525 |
dynamic: Uses %1 .. %9 as placeholders for dynamic arguments [boolean, optional, default=false] |
| 526 |
|
| 527 |
TODO |
| 528 |
- What's default of insensitive? I'm not sure... |
| 529 |
--> |
| 530 |
<xs:element name="StringDetect"> |
| 531 |
<xs:complexType> |
| 532 |
<xs:attributeGroup ref="commonAttributes"/> |
| 533 |
<xs:attribute name="String" use="required"/> |
| 534 |
<xs:attribute name="insensitive" type="xs:boolean"/> |
| 535 |
<xs:attribute name="dynamic" type="xs:boolean"/> |
| 536 |
</xs:complexType> |
| 537 |
</xs:element> |
| 538 |
<!-- |
| 539 |
Detect a word, i.e. a string at word boundaries |
| 540 |
commonAttributes: Common attributes |
| 541 |
String: The string to look for |
| 542 |
insensitive: Whether the string is matched case INsensitive. [boolean, optional, default=false] |
| 543 |
weakDeliminator: Add weak deliminators [optional] |
| 544 |
additionalDeliminator: Add deliminators [optional] |
| 545 |
|
| 546 |
TODO |
| 547 |
- What's default of insensitive? I'm not sure... |
| 548 |
--> |
| 549 |
<xs:element name="WordDetect"> |
| 550 |
<xs:complexType> |
| 551 |
<xs:attributeGroup ref="commonAttributes"/> |
| 552 |
<xs:attribute name="String" use="required"/> |
| 553 |
<xs:attribute name="insensitive" type="xs:boolean"/> |
| 554 |
<xs:attribute name="weakDeliminator"/> |
| 555 |
<xs:attribute name="additionalDeliminator"/> |
| 556 |
</xs:complexType> |
| 557 |
</xs:element> |
| 558 |
<!-- |
| 559 |
Detect a match of a regular expression |
| 560 |
commonAttributes: Common attributes |
| 561 |
String: The regular expression pattern |
| 562 |
insensitive: Whether the text is matched case INsensitive. [boolean, optional, default=false] |
| 563 |
minimal: Wheather to use minimal matching for wild cards in the pattern [boolean, optional, default='false'] |
| 564 |
dynamic: Uses %1 .. %9 as placeholders for dynamic arguments [boolean, optional, default=false] |
| 565 |
--> |
| 566 |
<xs:element name="RegExpr"> |
| 567 |
<xs:complexType> |
| 568 |
<xs:attributeGroup ref="commonAttributes"/> |
| 569 |
<xs:attribute name="String" use="required"/> |
| 570 |
<xs:attribute name="insensitive" type="xs:boolean"/> |
| 571 |
<xs:attribute name="minimal" type="xs:boolean"/> |
| 572 |
<xs:attribute name="dynamic" type="xs:boolean"/> |
| 573 |
</xs:complexType> |
| 574 |
</xs:element> |
| 575 |
<!-- |
| 576 |
Detect a line continuation |
| 577 |
commonAttributes: Common attributes |
| 578 |
char: The char marking the end of line [char, optional, default='\\'] |
| 579 |
--> |
| 580 |
<xs:element name="LineContinue"> |
| 581 |
<xs:complexType> |
| 582 |
<xs:attributeGroup ref="commonAttributes"/> |
| 583 |
<xs:attribute name="char" type="char"/> |
| 584 |
</xs:complexType> |
| 585 |
</xs:element> |
| 586 |
<!-- |
| 587 |
Detect a C-style escaped character |
| 588 |
commonAttributes: Common attributes |
| 589 |
|
| 590 |
TODO: |
| 591 |
- Did I get this right? Only one character, or a string? |
| 592 |
--> |
| 593 |
<xs:element name="HlCStringChar"> |
| 594 |
<xs:complexType> |
| 595 |
<xs:attributeGroup ref="commonAttributes"/> |
| 596 |
</xs:complexType> |
| 597 |
</xs:element> |
| 598 |
<!-- |
| 599 |
Detect a range of characters |
| 600 |
commonAttributes: Common attributes |
| 601 |
char: The character starting the range |
| 602 |
char1: The character terminating the range |
| 603 |
--> |
| 604 |
<xs:element name="RangeDetect"> |
| 605 |
<xs:complexType> |
| 606 |
<xs:attributeGroup ref="commonAttributes"/> |
| 607 |
<xs:attribute name="char" type="char" use="required"/> |
| 608 |
<xs:attribute name="char1" type="char" use="required"/> |
| 609 |
</xs:complexType> |
| 610 |
</xs:element> |
| 611 |
<!-- |
| 612 |
Include Rules of another context |
| 613 |
context: The name of the context to include |
| 614 |
includeAttrib: If this is true, the host context of the IncludeRules |
| 615 |
will be given the attribute of the source context |
| 616 |
--> |
| 617 |
<xs:element name="IncludeRules"> |
| 618 |
<xs:complexType> |
| 619 |
<xs:attribute name="context" use="required"/> |
| 620 |
<xs:attribute name="includeAttrib" type="xs:boolean"/> |
| 621 |
</xs:complexType> |
| 622 |
</xs:element> |
| 623 |
<!-- Detect all following Spaces --> |
| 624 |
<xs:element name="DetectSpaces"> |
| 625 |
<xs:complexType> |
| 626 |
<xs:attributeGroup ref="commonAttributes"/> |
| 627 |
</xs:complexType> |
| 628 |
</xs:element> |
| 629 |
<!-- Detect an Identifier ( == LETTER(LETTER|NUMBER|_)*) --> |
| 630 |
<xs:element name="DetectIdentifier"> |
| 631 |
<xs:complexType> |
| 632 |
<xs:attributeGroup ref="commonAttributes"/> |
| 633 |
</xs:complexType> |
| 634 |
</xs:element> |
| 635 |
<!-- List of attributes --> |
| 636 |
<xs:element name="itemDatas"> |
| 637 |
<xs:complexType> |
| 638 |
<xs:sequence> |
| 639 |
<xs:element maxOccurs="unbounded" ref="itemData"/> |
| 640 |
</xs:sequence> |
| 641 |
</xs:complexType> |
| 642 |
</xs:element> |
| 643 |
<!-- |
| 644 |
Attribute specification |
| 645 |
name CDATA #REQUIRED The name of this attribute |
| 646 |
defStyleNum CDATA #REQUIRED The index of the default style to use |
| 647 |
color CDATA #IMPLIED Color for this style, either a hex triplet, a name or some other format recognized by Qt [optional] |
| 648 |
selColor CDATA #IMPLIED The color for this style when text is selected [optional] |
| 649 |
italic CDATA #IMPLIED Whether this attribute should be rendered using an italic typeface [optional, boolean, default=false] |
| 650 |
bold CDATA #IMPLIED Whether this attribute should be renederd using a bold typeface [optional, boolean, default=false] |
| 651 |
underline CDATA #IMPLIED Whether this attribute should be underlined [optional, boolean, default=false] |
| 652 |
strikeOut CDATA #IMPLIED Whether this attribute should be striked out [optional, boolean, default=false] |
| 653 |
backgroundColor CDATA #IMPLIED The background color for this style [optional] |
| 654 |
selBackgroundColor CDATA #IMPLIED The background color for this style when text is selected [optional] |
| 655 |
spellChecking CDATA #IMPLIED Whether this attribute should be spell checked [optional, boolean, default=true] |
| 656 |
--> |
| 657 |
<xs:element name="itemData"> |
| 658 |
<xs:complexType> |
| 659 |
<xs:attribute name="name" use="required"/> |
| 660 |
<xs:attribute name="defStyleNum" use="required" type="defStyles"/> |
| 661 |
<xs:attribute name="color"/> |
| 662 |
<xs:attribute name="selColor"/> |
| 663 |
<xs:attribute name="italic" type="xs:boolean"/> |
| 664 |
<xs:attribute name="bold" type="xs:boolean"/> |
| 665 |
<xs:attribute name="underline" type="xs:boolean"/> |
| 666 |
<xs:attribute name="strikeOut" type="xs:boolean"/> |
| 667 |
<xs:attribute name="backgroundColor"/> |
| 668 |
<xs:attribute name="selBackgroundColor"/> |
| 669 |
<xs:attribute name="spellChecking" type="xs:boolean"/> |
| 670 |
</xs:complexType> |
| 671 |
</xs:element> |
| 672 |
<!-- Spellchecking specification --> |
| 673 |
<xs:element name="spellchecking"> |
| 674 |
<xs:complexType> |
| 675 |
<xs:sequence> |
| 676 |
<xs:element minOccurs="0" ref="encodings"/> |
| 677 |
</xs:sequence> |
| 678 |
</xs:complexType> |
| 679 |
</xs:element> |
| 680 |
<!-- List of character encodings --> |
| 681 |
<xs:element name="encodings"> |
| 682 |
<xs:complexType> |
| 683 |
<xs:sequence> |
| 684 |
<xs:element maxOccurs="unbounded" ref="encoding"/> |
| 685 |
</xs:sequence> |
| 686 |
</xs:complexType> |
| 687 |
</xs:element> |
| 688 |
<!-- |
| 689 |
Encoding specification |
| 690 |
sequence CDATA #REQUIRED Character sequence of the encoding; must not contain new-line characters, i.e. \n or \r |
| 691 |
character CDATA #IMPLIED Encoded character; must be of length 1 |
| 692 |
ignored (%boolean;) #IMPLIED If true, then the encoding sequence is ignored for spellchecking |
| 693 |
--> |
| 694 |
<xs:element name="encoding"> |
| 695 |
<xs:complexType> |
| 696 |
<xs:attribute name="string" use="required"/> |
| 697 |
<xs:attribute name="char" type="char"/> |
| 698 |
<xs:attribute name="ignored" type="xs:boolean"/> |
| 699 |
</xs:complexType> |
| 700 |
</xs:element> |
| 701 |
</xs:schema> |