File: xmldebug.xml

package info (click to toggle)
kf6-syntax-highlighting 6.20.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 49,872 kB
  • sloc: xml: 205,656; cpp: 12,882; python: 3,055; sh: 965; perl: 814; ruby: 494; pascal: 393; javascript: 161; php: 150; jsp: 132; lisp: 131; haskell: 124; ada: 119; ansic: 107; makefile: 96; f90: 94; ml: 85; cobol: 81; yacc: 71; csh: 62; exp: 61; erlang: 54; sql: 51; java: 47; sed: 45; objc: 37; tcl: 36; awk: 31; asm: 30; fortran: 18; cs: 10
file content (773 lines) | stat: -rw-r--r-- 35,366 bytes parent folder | download
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
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language
[
  <!-- Names beginning with the string "xml" are reserved for standardization -->
  <!ENTITY reserved_prefix "[xX][mM][lL]">
  <!ENTITY name "(?!&reserved_prefix;)[[:alpha:]_:][\w:.-]*">
  <!ENTITY nmtoken "[\w:.-]+">
  <!ENTITY invalid_name "[\w:.-]+">

  <!ENTITY entity "&amp;&name;;|&amp;#(x[0-9a-fA-F]+|[0-9]+);">
  <!ENTITY peref "&#x25;&name;;">

  <!ENTITY weakdelim ";:.-&#x23;&amp;">
]>
<language version="14" kateversion="5.79" name="XML (Debug)" section="Markup" extensions="" mimetype="" indenter="xml">

  <!-- https://www.w3.org/TR/REC-xml/#sec-documents -->

  <highlighting>
    <list name="AttType">
      <item>CDATA</item>
      <item>ID</item>
      <item>IDREF</item>
      <item>IDREFS</item>
      <item>ENTITY</item>
      <item>ENTITIES</item>
      <item>NMTOKEN</item>
      <item>NMTOKENS</item>
    </list>

<contexts>

  <!--
    [1] document ::= prolog element Misc*

    [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
    /* any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. */

    [3] S ::= (#x20 | #x9 | #xD | #xA)+
    note: Replaced by <DetectSpaces/> or \s+ regexp

    [4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
    [4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]
    [5] Name ::= NameStartChar (NameChar)*
    [6] Names ::= Name (#x20 Name)*
    [7] Nmtoken ::= (NameChar)+
    [8] Nmtokens ::= Nmtoken (#x20 Nmtoken)*

    [9] EntityValue ::= '"' ([^%&"] | PEReference | Reference)* '"'
  |  "'" ([^%&'] | PEReference | Reference)* "'"

    [11] SystemLiteral ::= ('"' [^"]* '"') | ("'" [^']* "'")
    [12] PubidLiteral ::= '"' PubidChar* '"' | "'" (PubidChar - "'")* "'"
    [13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]

    [66] CharRef ::= '&#' [0-9]+ ';'
                   | '&#x' [0-9a-fA-F]+ ';'
    [67] Reference ::= EntityRef | CharRef
    [68] EntityRef ::= '&' Name ';'
    [69] PEReference ::= '%' Name ';'
  -->

  <!--
    [22] prolog ::= XMLDecl? Misc* (doctypedecl Misc*)?
    [23] XMLDecl ::= '<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>'
  -->
  <context name="0:prolog" attribute="Error" lineEndContext="#stay" fallthroughContext="11:Misc after XMLDecl">
    <WordDetect attribute="Doctype Declaration" context="1:XMLDecl Version" String="&lt;?xml" weakDeliminator="&weakdelim;"/>
  </context>

  <!--
    [24] VersionInfo ::= S 'version' Eq ("'" VersionNum "'" | '"' VersionNum '"')
    [25] Eq ::= S? '=' S?
    [26] VersionNum ::= '1.' [0-9]+
  -->
  <context name="1:XMLDecl Version" attribute="Error" lineEndContext="#stay">
    <DetectSpaces attribute="Normal Text"/>
    <WordDetect attribute="Attribute" context="2:XMLDecl Version Eq" String="version" weakDeliminator="&weakdelim;"/>
  </context>

  <context name="2:XMLDecl Version Eq" attribute="Error" lineEndContext="#stay">
    <DetectChar attribute="Attribute" context="3:XMLDecl Version" char="="/>
    <DetectSpaces attribute="Normal Text"/>
  </context>

  <context name="3:XMLDecl Version" attribute="Error" lineEndContext="#stay">
    <RegExpr attribute="Value" context="4:XMLDecl Encoding" String="&quot;[A-Za-z0-9:._-]*&quot;|'[A-Za-z0-9:._-]*'"/>
    <DetectSpaces attribute="Normal Text"/>
  </context>

  <!--
    [80] EncodingDecl ::= S 'encoding' Eq ('"' EncName '"' | "'" EncName "'" )
    [81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')*
  -->
  <context name="4:XMLDecl Encoding" attribute="Error" lineEndContext="#stay" fallthroughContext="7:XMLDecl Standalone">
    <DetectSpaces attribute="Normal Text"/>
    <WordDetect attribute="Attribute" context="5:XMLDecl Encoding Eq" String="encoding" weakDeliminator="&weakdelim;"/>
  </context>

  <context name="5:XMLDecl Encoding Eq" attribute="Error" lineEndContext="#stay">
    <DetectSpaces attribute="Normal Text"/>
    <DetectChar attribute="Attribute" context="6:XMLDecl Encoding" char="="/>
  </context>

  <context name="6:XMLDecl Encoding" attribute="Error" lineEndContext="#stay">
    <DetectSpaces attribute="Normal Text"/>
    <RegExpr attribute="Value" context="#pop#pop!7:XMLDecl Standalone" String="&quot;[A-Za-z][A-Za-z0-9._-]*&quot;|'[A-Za-z][A-Za-z0-9._-]*'"/>
  </context>

  <!--
    [32] SDDecl ::= S 'standalone' Eq (("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no') '"'))
  -->
  <context name="7:XMLDecl Standalone" attribute="Error" lineEndContext="#stay" fallthroughContext="10:XMLDecl Standalone">
    <WordDetect attribute="Attribute" context="8:XMLDecl Standalone Eq" String="standalone" weakDeliminator="&weakdelim;"/>
    <DetectSpaces attribute="Normal Text"/>
  </context>

  <context name="8:XMLDecl Standalone Eq" attribute="Error" lineEndContext="#stay">
    <DetectChar attribute="Attribute" context="9:XMLDecl Standalone" char="="/>
    <DetectSpaces attribute="Normal Text"/>
  </context>

  <context name="9:XMLDecl Standalone" attribute="Error" lineEndContext="#stay">
    <RegExpr attribute="Value" context="#pop#pop!10:XMLDecl Standalone" String="&quot;(yes|no)&quot;|'(yes|no)'"/>
    <DetectSpaces attribute="Normal Text"/>
  </context>

  <!-- close XMLDecl -->

  <context name="10:XMLDecl Standalone" attribute="Error" lineEndContext="#stay">
    <Detect2Chars attribute="Doctype Declaration" context="#pop#pop#pop#pop#pop#pop!11:Misc after XMLDecl" char="?" char1="&gt;"/>
    <DetectSpaces attribute="Normal Text"/>
  </context>

  <!-- ^^^ XMLDecl end ^^^ -->


  <!--
    [27] Misc ::= Comment | PI | S
    [28] doctypedecl ::= '<!DOCTYPE' S Name (S ExternalID)? S? ('[' intSubset ']' S?)? '>'
  -->
  <context name="11:Misc after XMLDecl" attribute="Error" lineEndContext="#stay" fallthroughContext="#pop!79:Outside">
    <WordDetect attribute="Doctype Declaration" context="14:Doctype Decl Name" String="&lt;!DOCTYPE" weakDeliminator="&weakdelim;"/>
    <DetectSpaces attribute="Normal Text"/>
    <IncludeRules context="Comment"/>
    <IncludeRules context="PI"/>
  </context>

  <context name="14:Doctype Decl Name" attribute="Error" lineEndContext="#stay">
    <DetectSpaces attribute="Normal Text"/>
    <RegExpr attribute="Doctype Declaration" context="15:Doctype Decl ExternalID" String="&name;"/>
  </context>

  <!--
    [75] ExternalID ::= 'SYSTEM' S SystemLiteral | 'PUBLIC' S PubidLiteral S SystemLiteral
  -->
  <context name="15:Doctype Decl ExternalID" attribute="Error" lineEndContext="#stay">
    <DetectChar attribute="Doctype Declaration" context="#pop#pop#pop!23:Doctype Decl IS" char="["/>
    <DetectChar attribute="Doctype Declaration" context="#pop#pop#pop!79:Outside" char=">"/>
    <DetectSpaces attribute="Normal Text"/>
    <WordDetect attribute="Doctype Declaration" context="16:Doctype Decl PublicID" String="PUBLIC" weakDeliminator="&weakdelim;"/>
    <WordDetect attribute="Doctype Declaration" context="19:Doctype Decl SystemID" String="SYSTEM" weakDeliminator="&weakdelim;"/>
  </context>

  <!--
    [12] PubidLiteral ::= '"' PubidChar* '"' | "'" (PubidChar - "'")* "'"
    [13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]
  -->
  <context name="16:Doctype Decl PublicID" attribute="Error" lineEndContext="#stay">
    <DetectChar attribute="Value" context="17:Doctype Decl PublicID qq" char="&quot;"/>
    <DetectChar attribute="Value" context="18:Doctype Decl PublicID q" char="'"/>
    <DetectSpaces attribute="Normal Text"/>
  </context>

  <context name="17:Doctype Decl PublicID qq" attribute="Error" lineEndContext="#stay">
    <DetectChar attribute="Value" context="#pop#pop!19:Doctype Decl SystemID" char="&quot;"/>
    <IncludeRules context="PubidChar"/>
  </context>

  <context name="18:Doctype Decl PublicID q" attribute="Error" lineEndContext="#stay">
    <DetectChar attribute="Value" context="#pop#pop!19:Doctype Decl SystemID" char="'"/>
    <IncludeRules context="PubidChar"/>
  </context>

  <!--
    [12] PubidLiteral ::= '"' PubidChar* '"' | "'" (PubidChar - "'")* "'"
  -->
  <context name="PubidChar" attribute="Error" lineEndContext="#stay">
    <DetectChar attribute="Value" char="'"/>
    <RegExpr attribute="Value" String="[&#x20;&#xD;&#xA;a-zA-Z0-9()+,./:=?;!*#@$_%-]+"/>
  </context>

  <!--
    [11] SystemLiteral ::= ('"' [^"]* '"') | ("'" [^']* "'")
  -->
  <context name="19:Doctype Decl SystemID" attribute="Error" lineEndContext="#stay">
    <DetectChar attribute="Value" context="20:Doctype Decl SystemID qq" char="&quot;"/>
    <DetectChar attribute="Value" context="21:Doctype Decl SystemID q" char="'"/>
    <DetectSpaces attribute="Normal Text"/>
  </context>

  <context name="20:Doctype Decl SystemID qq" attribute="Value" lineEndContext="#stay">
    <DetectChar attribute="Value" context="22:Doctype Decl IS or end" char="&quot;"/>
  </context>

  <context name="21:Doctype Decl SystemID q" attribute="Value" lineEndContext="#stay">
    <DetectChar attribute="Value" context="22:Doctype Decl IS or end" char="'"/>
  </context>

  <context name="22:Doctype Decl IS or end" attribute="Error" lineEndContext="#stay">
    <DetectSpaces attribute="Normal Text"/>
    <DetectChar attribute="Doctype Declaration" context="#pop#pop#pop#pop#pop#pop!23:Doctype Decl IS" char="["/>
    <DetectChar attribute="Doctype Declaration" context="#pop#pop#pop#pop#pop#pop!79:Outside" char=">"/>
  </context>

  <!--
    [28a] DeclSep ::= PEReference | S
    [28b] intSubset ::= (markupdecl | DeclSep)*
    [29]  markupdecl ::= elementdecl | AttlistDecl | EntityDecl | NotationDecl | PI | Comment
  -->
  <context name="23:Doctype Decl IS" attribute="Error" lineEndContext="#stay">
    <DetectSpaces attribute="Normal Text"/>
    <StringDetect attribute="Doctype Declaration" context="#pop!79:Outside" String="]>"/>
    <IncludeRules context="Comment"/>
    <IncludeRules context="EntityDecl"/>
    <IncludeRules context="elementdecl"/>
    <IncludeRules context="AttlistDecl"/>
    <IncludeRules context="NotationDecl"/>
    <IncludeRules context="PI"/>
    <RegExpr attribute="Entity" context="#stay" String="&peref;"/>
  </context>

  <!--
    [45] elementdecl ::= '<!ELEMENT' S Name S contentspec S? '>'
    [46] contentspec ::= 'EMPTY' | 'ANY' | Mixed | children

    [47] children ::= (choice | seq) ('?' | '*' | '+')?
    [48] cp ::= (Name | choice | seq) ('?' | '*' | '+')?
    [49] choice ::= '(' S? cp ( S? '|' S? cp )+ S? ')'
    [50] seq    ::= '(' S? cp ( S? ',' S? cp )* S? ')'

    [51] Mixed ::= '(' S? '#PCDATA' (S? '|' S? Name)* S? ')*'
                 | '(' S? '#PCDATA' S? ')'

    where each Name is the type of an element which may appear as a child.
  -->
  <context name="elementdecl" attribute="Error" lineEndContext="#stay">
    <WordDetect attribute="Doctype Declaration" context="24:elementdecl" String="&lt;!ELEMENT" weakDeliminator="&weakdelim;"/>
  </context>

  <context name="24:elementdecl" attribute="Error" lineEndContext="#stay">
    <DetectSpaces attribute="Normal Text"/>
    <RegExpr attribute="Normal Tag" context="25:contentspec" String="&name;"/>
    <RegExpr attribute="Entity" context="25:contentspec" String="&peref;"/>
    <RegExpr attribute="Error" context="25:contentspec" String="&invalid_name;"/>
  </context>

  <context name="25:contentspec" attribute="Error" lineEndContext="#stay">
    <DetectSpaces attribute="Normal Text"/>
    <DetectChar attribute="Attribute" context="26:MixedOrChildren" char="("/>
    <WordDetect attribute="Attribute" context="#pop#pop!37:element end" String="EMPTY" weakDeliminator="&weakdelim;"/>
    <WordDetect attribute="Attribute" context="#pop#pop!37:element end" String="ANY" weakDeliminator="&weakdelim;"/>
    <RegExpr attribute="Entity" context="#pop#pop!37:element end" String="&peref;"/>
  </context>

  <context name="26:MixedOrChildren" attribute="Error" lineEndContext="#stay" fallthroughContext="childrenLvl0OrEnd">
    <DetectSpaces attribute="Normal Text"/>
    <StringDetect attribute="Doctype Declaration" context="27:MixedShort" String="#PCDATA"/>
    <DetectChar attribute="Error" context="#pop#pop#pop!37:element end" char=")"/>
    <AnyChar attribute="Error" context="childrenLvl0OrEnd" String=",|"/>
  </context>

  <context name="27:MixedShort" attribute="Error" lineEndContext="#stay">
    <DetectChar attribute="Attribute" context="28:MixedLong" char="|"/>
    <DetectChar attribute="Attribute" context="#pop#pop#pop#pop!37:element end" char=")"/>
    <DetectSpaces attribute="Normal Text"/>
  </context>

  <context name="28:MixedLong" attribute="Error" lineEndContext="#stay">
    <RegExpr attribute="Value" context="29:MixedLong endOrContinue" String="&name;|&peref;"/>
    <DetectSpaces attribute="Normal Text"/>
  </context>

  <context name="29:MixedLong endOrContinue" attribute="Error" lineEndContext="#stay">
    <DetectChar attribute="Attribute" context="#pop" char="|"/>
    <StringDetect attribute="Attribute" context="#pop#pop#pop#pop#pop#pop!37:element end" String=")*"/>
    <DetectChar attribute="Error" context="#pop#pop#pop#pop#pop#pop!37:element end" char=")"/>
    <DetectSpaces attribute="Normal Text"/>
  </context>

  <!-- ^^^ Mixed end ^^^ -->

  <context name="childrenLvl0OrEnd" attribute="Error" lineEndContext="#stay">
    <DetectChar attribute="Attribute" context="#pop#pop!choiceLvl0" char="|"/>
    <DetectChar attribute="Attribute" context="#pop#pop!seqLvl0" char=","/>
    <IncludeRules context="childrenLvl0CpOrEnd"/>
  </context>

  <context name="childrenCp" attribute="Error" lineEndContext="#stay">
    <DetectChar attribute="Attribute" context="children" char="("/>
    <DetectSpaces attribute="Normal Text"/>
    <RegExpr attribute="Value" context="childrenCpEnd" String="(&name;|&peref;)[?*+]?"/>
  </context>

  <context name="childrenLvl0CpOrEnd" attribute="Error" lineEndContext="#stay">
    <IncludeRules context="childrenCp"/>
    <RegExpr attribute="Attribute" context="#pop#pop#pop#pop!37:element end" String="\)[?*+]?"/>
  </context>

  <context name="choiceLvl0" attribute="Error" lineEndContext="#stay" fallthroughContext="choiceLvl0OrEnd">
    <DetectSpaces attribute="Normal Text"/>
    <DetectChar attribute="Error" context="#pop#pop#pop!37:element end" char=")"/>
    <DetectChar attribute="Error" context="choiceLvl0OrEnd" char=","/>
  </context>
  <context name="choiceLvl0OrEnd" attribute="Error" lineEndContext="#stay">
    <DetectChar attribute="Attribute" context="#pop" char=","/>
    <IncludeRules context="childrenLvl0CpOrEnd"/>
  </context>

  <context name="seqLvl0" attribute="Error" lineEndContext="#stay" fallthroughContext="seqLvl0OrEnd">
    <DetectSpaces attribute="Normal Text"/>
    <DetectChar attribute="Error" context="#pop#pop#pop!37:element end" char=")"/>
    <DetectChar attribute="Error" context="seqLvl0OrEnd" char=","/>
  </context>
  <context name="seqLvl0OrEnd" attribute="Error" lineEndContext="#stay">
    <DetectChar attribute="Attribute" context="#pop" char=","/>
    <IncludeRules context="childrenLvl0CpOrEnd"/>
  </context>


  <context name="children" attribute="Error" lineEndContext="#stay" fallthroughContext="childrenOrEnd">
    <DetectSpaces attribute="Normal Text"/>
    <DetectChar attribute="Error" context="#pop" char=")"/>
    <AnyChar attribute="Error" context="childrenOrEnd" String="|,"/>
  </context>

  <context name="childrenOrEnd" attribute="Error" lineEndContext="#stay">
    <DetectChar attribute="Attribute" context="#pop#pop!choice" char="|"/>
    <DetectChar attribute="Attribute" context="#pop#pop!seq" char=","/>
    <IncludeRules context="childrenCpOrEnd"/>
  </context>

  <context name="childrenCpOrEnd" attribute="Error" lineEndContext="#stay">
    <IncludeRules context="childrenCp"/>
    <RegExpr attribute="Attribute" context="#pop#pop!childrenCpEnd" String="\)[?*+]?"/>
  </context>

  <context name="childrenCpEnd" attribute="Error" lineEndContext="#stay" fallthroughContext="#pop">
    <DetectSpaces attribute="Normal Text"/>
    <DetectChar attribute="Error" context="#pop!children" char="("/>
    <DetectChar attribute="Error" context="#pop" char=":"/>
    <DetectIdentifier attribute="Error" context="#pop"/>
  </context>

  <context name="choice" attribute="Error" lineEndContext="#stay" fallthroughContext="choiceOrEnd">
    <DetectSpaces attribute="Normal Text"/>
    <DetectChar attribute="Error" context="#pop" char=")"/>
    <DetectChar attribute="Error" context="choiceOrEnd" char="|"/>
  </context>
  <context name="choiceOrEnd" attribute="Error" lineEndContext="#stay">
    <DetectChar attribute="Attribute" context="#pop" char="|"/>
    <IncludeRules context="childrenCpOrEnd"/>
  </context>

  <context name="seq" attribute="Error" lineEndContext="#stay" fallthroughContext="seqOrEnd">
    <DetectSpaces attribute="Normal Text"/>
    <DetectChar attribute="Error" context="#pop" char=")"/>
    <DetectChar attribute="Error" context="seqOrEnd" char=","/>
  </context>
  <context name="seqOrEnd" attribute="Error" lineEndContext="#stay">
    <DetectChar attribute="Attribute" context="#pop" char=","/>
    <IncludeRules context="childrenCpOrEnd"/>
  </context>

  <!-- ^^^ children end ^^^ -->

  <!-- ^^^ XMLDecl end ^^^ -->

  <context name="37:element end" attribute="Error" lineEndContext="#stay">
    <DetectChar attribute="Doctype Declaration" context="#pop" char=">"/>
    <DetectSpaces attribute="Normal Text"/>
  </context>


  <!--
    [52] AttlistDecl ::= '<!ATTLIST' S Name AttDef* S? '>'
    [53] AttDef ::= S Name S AttType S DefaultDecl
  -->
  <context name="AttlistDecl" attribute="Error" lineEndContext="#stay">
    <WordDetect attribute="Doctype Declaration" context="38:AttlistDecl" String="&lt;!ATTLIST" weakDeliminator="&weakdelim;"/>
  </context>

  <context name="38:AttlistDecl" attribute="Error" lineEndContext="#stay">
    <DetectSpaces attribute="Normal Text"/>
    <RegExpr attribute="Normal Tag" context="39:AttDef" String="&name;"/>
  </context>

  <context name="39:AttDef" attribute="Error" lineEndContext="#stay">
    <DetectSpaces attribute="Normal Text"/>
    <DetectChar attribute="Doctype Declaration" context="#pop#pop" char=">"/>
    <RegExpr attribute="Attribute" context="40:AttType" String="xml:space\b|&name;"/>
  </context>

  <!--
    [54] AttType ::= StringType | TokenizedType | EnumeratedType
    [55] StringType ::= 'CDATA'
    [56] TokenizedType ::= 'ID' | 'IDREF' | 'IDREFS' | 'ENTITY'
                         | 'ENTITIES' | 'NMTOKEN' | 'NMTOKENS'

    [57] EnumeratedType ::= NotationType | Enumeration
    [58] NotationType ::= 'NOTATION' S '(' S? Name (S? '|' S? Name)* S? ')'
    [59] Enumeration ::= '(' S? Nmtoken (S? '|' S? Nmtoken)* S? ')'
  -->
  <context name="40:AttType" attribute="Error" lineEndContext="#stay">
    <DetectSpaces attribute="Normal Text"/>
    <DetectChar attribute="Doctype Declaration" context="43:Enumeration" char="("/>
    <keyword attribute="Doctype Declaration" context="46:DefaultDecl" String="AttType"/>
    <WordDetect attribute="Doctype Declaration" context="41:NotationStart" String="NOTATION" weakDeliminator="&weakdelim;"/>
  </context>

  <context name="41:NotationStart" attribute="Error" lineEndContext="#stay">
    <DetectChar attribute="Doctype Declaration" context="#pop!42:Notation" char="("/>
    <DetectSpaces attribute="Doctype Declaration"/>
  </context>

  <context name="42:Notation" attribute="Error" lineEndContext="#stay">
    <DetectSpaces attribute="Normal Text"/>
    <RegExpr attribute="Value" context="44:EnumeratedType or End" String="&name;"/>
  </context>

  <context name="43:Enumeration" attribute="Error" lineEndContext="#stay">
    <DetectSpaces attribute="Normal Text"/>
    <RegExpr attribute="Value" context="44:EnumeratedType or End" String="&nmtoken;"/>
  </context>

  <context name="44:EnumeratedType or End" attribute="Error" lineEndContext="#stay">
    <DetectChar attribute="Doctype Declaration" context="#pop" char="|"/>
    <DetectChar attribute="Doctype Declaration" context="#pop#pop!46:DefaultDecl" char=")"/>
    <DetectSpaces attribute="Normal Text"/>
  </context>

  <!--
    [60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED' | (('#FIXED' S)? AttValue)
    [10] AttValue ::= '"' ([^<&"] | Reference)* '"'
                    | "'" ([^<&'] | Reference)* "'"
  -->
  <context name="46:DefaultDecl" attribute="Error" lineEndContext="#stay">
    <DetectSpaces attribute="Normal Text"/>
    <WordDetect attribute="Attribute" context="#pop#pop" String="#REQUIRED" weakDeliminator="&weakdelim;"/>
    <WordDetect attribute="Attribute" context="#pop#pop" String="#IMPLIED" weakDeliminator="&weakdelim;"/>
    <WordDetect attribute="Attribute" context="#pop!AttValue" String="#FIXED" weakDeliminator="&weakdelim;"/>
    <DetectChar attribute="Value" context="AttValue qq" char="&quot;"/>
    <DetectChar attribute="Value" context="AttValue q" char="'"/>
  </context>

  <context name="AttValue" attribute="Error" lineEndContext="#stay">
    <DetectSpaces attribute="Normal Text"/>
    <DetectChar attribute="Value" context="AttValue qq" char="&quot;"/>
    <DetectChar attribute="Value" context="AttValue q" char="'"/>
  </context>

   <context name="AttValue qq" attribute="Value" lineEndContext="#stay">
    <DetectChar attribute="Value" context="#pop#pop#pop" char="&quot;"/>
    <IncludeRules context="In AttValue"/>
  </context>

  <context name="AttValue q" attribute="Value" lineEndContext="#stay">
    <DetectChar attribute="Value" context="#pop" char="&quot;"/>
    <IncludeRules context="In AttValue"/>
  </context>

  <context name="In AttValue" attribute="Error" lineEndContext="#stay">
    <DetectSpaces attribute="Value"/>
    <DetectIdentifier attribute="Value"/>
    <RegExpr attribute="Entity" String="&entity;"/>
    <AnyChar attribute="Error" String="&amp;&lt;"/>
  </context>

  <!-- ^^^ AttDef end ^^^ -->

  <!-- ^^^ AttlistDecl end ^^^ -->


  <!--
    [70] EntityDecl ::= GEDecl | PEDecl
    [71] GEDecl ::= '<!ENTITY' S Name S EntityDef S? '>'
    [72] PEDecl ::= '<!ENTITY' S '%' S Name S PEDef S? '>'
  -->
  <context name="EntityDecl" attribute="Error" lineEndContext="#stay">
    <WordDetect attribute="Doctype Declaration" context="50:EntityDecl" String="&lt;!ENTITY" weakDeliminator="&weakdelim;"/>
  </context>

  <context name="50:EntityDecl" attribute="Error" lineEndContext="#stay">
    <DetectSpaces attribute="Normal Text"/>
    <DetectChar attribute="Entity" context="#pop!61:PEDecl" char="%"/>
    <RegExpr attribute="Entity" context="52:GEDecl EntityValueOrExternalID" String="&name;"/>
  </context>

  <!--
    [73] EntityDef ::= EntityValue | (ExternalID NDataDecl?)
    [74] PEDef ::= EntityValue | ExternalID
  -->
  <context name="52:GEDecl EntityValueOrExternalID" attribute="Error" lineEndContext="#stay">
    <DetectSpaces attribute="Normal Text"/>
    <DetectChar attribute="Value" context="53:GEDecl EntityValue qq" char="&quot;"/>
    <DetectChar attribute="Value" context="54:GEDecl EntityValue q" char="'"/>
    <WordDetect attribute="Doctype Declaration" context="55:GEDecl PublicID" String="PUBLIC" weakDeliminator="&weakdelim;"/>
    <WordDetect attribute="Doctype Declaration" context="58:GEDecl SystemID" String="SYSTEM" weakDeliminator="&weakdelim;"/>
  </context>

  <context name="53:GEDecl EntityValue qq" attribute="Value" lineEndContext="#stay">
    <DetectChar attribute="Value" context="69:GEDecl endOrNDATA" char="&quot;"/>
    <IncludeRules context="In EntityValue"/>
  </context>

  <context name="54:GEDecl EntityValue q" attribute="Value" lineEndContext="#stay">
    <DetectChar attribute="Value" context="69:GEDecl endOrNDATA" char="'"/>
    <IncludeRules context="In EntityValue"/>
  </context>

  <context name="In EntityValue" attribute="Error" lineEndContext="#stay">
    <DetectSpaces attribute="Value"/>
    <DetectIdentifier attribute="Value"/>
    <RegExpr attribute="Entity" String="&entity;|&peref;"/>
    <AnyChar attribute="Error" String="&amp;%"/>
  </context>

  <context name="55:GEDecl PublicID" attribute="Error" lineEndContext="#stay">
    <DetectChar attribute="Value" context="56:GEDecl PublicID qq" char="&quot;"/>
    <DetectChar attribute="Value" context="57:GEDecl PublicID q" char="'"/>
    <DetectSpaces attribute="Normal Text"/>
  </context>

  <context name="56:GEDecl PublicID qq" attribute="Error" lineEndContext="#stay">
    <DetectChar attribute="Value" context="#pop#pop!58:GEDecl SystemID" char="&quot;"/>
    <IncludeRules context="PubidChar"/>
  </context>

  <context name="57:GEDecl PublicID q" attribute="Value" lineEndContext="#stay">
    <DetectChar attribute="Value" context="#pop#pop!58:GEDecl SystemID" char="'"/>
    <IncludeRules context="PubidChar"/>
  </context>

  <context name="58:GEDecl SystemID" attribute="Error" lineEndContext="#stay">
    <DetectChar attribute="Value" context="59:GEDecl SystemID qq" char="&quot;"/>
    <DetectChar attribute="Value" context="60:GEDecl SystemID q" char="'"/>
    <DetectSpaces attribute="Normal Text"/>
  </context>

  <context name="59:GEDecl SystemID qq" attribute="Value" lineEndContext="#stay">
    <DetectChar attribute="Value" context="#pop!69:GEDecl endOrNDATA" char="&quot;"/>
  </context>

  <context name="60:GEDecl SystemID q" attribute="Value" lineEndContext="#stay">
    <DetectChar attribute="Value" context="#pop!69:GEDecl endOrNDATA" char="'"/>
  </context>

  <context name="61:PEDecl" attribute="Error" lineEndContext="#stay">
    <DetectSpaces attribute="Normal Text"/>
    <RegExpr attribute="Entity" context="62:PEDecl EntityValueOrExternalID" String="&name;"/>
  </context>

  <context name="62:PEDecl EntityValueOrExternalID" attribute="Error" lineEndContext="#stay">
    <DetectSpaces attribute="Normal Text"/>
    <DetectChar attribute="Value" context="53:GEDecl EntityValue qq" char="&quot;"/>
    <DetectChar attribute="Value" context="54:GEDecl EntityValue q" char="'"/>
    <WordDetect attribute="Doctype Declaration" context="63:PEDecl PublicID" String="PUBLIC" weakDeliminator="&weakdelim;"/>
    <WordDetect attribute="Doctype Declaration" context="66:PEDecl SystemID" String="SYSTEM" weakDeliminator="&weakdelim;"/>
  </context>

  <context name="63:PEDecl PublicID" attribute="Error" lineEndContext="#stay">
    <DetectChar attribute="Value" context="64:PEDecl PublicID qq" char="&quot;"/>
    <DetectChar attribute="Value" context="65:PEDecl PublicID q" char="'"/>
    <DetectSpaces attribute="Normal Text"/>
  </context>

  <context name="64:PEDecl PublicID qq" attribute="Error" lineEndContext="#stay">
    <DetectChar attribute="Value" context="#pop#pop!66:PEDecl SystemID" char="&quot;"/>
    <IncludeRules context="PubidChar"/>
  </context>

  <context name="65:PEDecl PublicID q" attribute="Value" lineEndContext="#stay">
    <DetectChar attribute="Value" context="#pop#pop!66:PEDecl SystemID" char="'"/>
    <IncludeRules context="PubidChar"/>
  </context>

  <context name="66:PEDecl SystemID" attribute="Error" lineEndContext="#stay">
    <DetectChar attribute="Value" context="67:PEDecl SystemID qq" char="&quot;"/>
    <DetectChar attribute="Value" context="68:PEDecl SystemID q" char="'"/>
    <DetectSpaces attribute="Normal Text"/>
  </context>

  <context name="67:PEDecl SystemID qq" attribute="Value" lineEndContext="#stay">
    <DetectChar attribute="Value" context="#pop#pop#pop#pop!37:element end" char="&quot;"/>
  </context>

  <context name="68:PEDecl SystemID q" attribute="Value" lineEndContext="#stay">
    <DetectChar attribute="Value" context="#pop#pop#pop#pop!37:element end" char="'"/>
  </context>

  <!-- ^^^ PEDef end ^^^ -->

  <context name="69:GEDecl endOrNDATA" attribute="Error" lineEndContext="#stay">
    <DetectChar attribute="Doctype Declaration" context="#pop#pop#pop#pop" char=">"/>
    <DetectSpaces attribute="Normal Text"/>
    <WordDetect attribute="Doctype Declaration" context="70:GEDecl NDATA" String="NDATA" weakDeliminator="&weakdelim;"/>
  </context>

  <context name="70:GEDecl NDATA" attribute="Error" lineEndContext="#stay">
    <DetectSpaces attribute="Normal Text"/>
    <RegExpr attribute="Entity" context="#pop#pop#pop#pop#pop!37:element end" String="&name;"/>
  </context>

  <!-- ^^^ EntityDef end ^^^ -->

  <!-- ^^^ EntityDecl end ^^^ -->


  <!--
    [82] NotationDecl ::= '<!NOTATION' S Name S (ExternalID | PublicID) S? '>'
    [83] PublicID ::= 'PUBLIC' S PubidLiteral
  -->
  <context name="NotationDecl" attribute="Error" lineEndContext="#stay">
    <WordDetect attribute="Doctype Declaration" context="71:NotationDecl Name" String="&lt;!NOTATION" weakDeliminator="&weakdelim;"/>
  </context>

  <context name="71:NotationDecl Name" attribute="Error" lineEndContext="#stay">
    <DetectSpaces attribute="Normal Text"/>
    <RegExpr attribute="Entity" context="72:NotationDecl ExternalID" String="&name;"/>
  </context>

  <context name="72:NotationDecl ExternalID" attribute="Error" lineEndContext="#stay">
    <DetectSpaces attribute="Normal Text"/>
    <WordDetect attribute="Doctype Declaration" context="66:PEDecl SystemID" String="SYSTEM" weakDeliminator="&weakdelim;"/>
    <WordDetect attribute="Doctype Declaration" context="#pop#pop!73:NotationDecl PublicID" String="PUBLIC" weakDeliminator="&weakdelim;"/>
  </context>

  <context name="73:NotationDecl PublicID" attribute="Error" lineEndContext="#stay">
    <DetectChar attribute="Value" context="74:NotationDecl PublicID qq" char="&quot;"/>
    <DetectChar attribute="Value" context="75:NotationDecl PublicID q" char="'"/>
    <DetectSpaces attribute="Normal Text"/>
  </context>

  <context name="74:NotationDecl PublicID qq" attribute="Error" lineEndContext="#stay">
    <DetectChar attribute="Value" context="76:NotationDecl SystemIDOrEnd" char="&quot;"/>
    <IncludeRules context="PubidChar"/>
  </context>

  <context name="75:NotationDecl PublicID q" attribute="Value" lineEndContext="#stay">
    <DetectChar attribute="Value" context="76:NotationDecl SystemIDOrEnd" char="'"/>
    <IncludeRules context="PubidChar"/>
  </context>

  <context name="76:NotationDecl SystemIDOrEnd" attribute="Error" lineEndContext="#stay">
    <DetectChar attribute="Doctype Declaration" context="#pop#pop#pop" char=">"/>
    <IncludeRules context="66:PEDecl SystemID"/>
  </context>

  <!-- ^^^ NotationDecl end ^^^ -->


  <!--
    [16] PI ::= '<?' PITarget (S (Char* - (Char* '?>' Char*)))? '?>'
    [17] PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))
  -->
  <context name="PI" attribute="Processing Instruction Body" lineEndContext="#stay">
    <RegExpr attribute="Processing Instruction" context="77:PI inside IS" String="&lt;\?(xml-stylesheet(\s+|$)|&name;)"/>
    <RegExpr attribute="Error" context="77:PI inside IS" String="&lt;\?&invalid_name;"/>
  </context>

  <context name="77:PI inside IS" attribute="Processing Instruction Body" lineEndContext="#stay">
    <StringDetect attribute="Processing Instruction" context="#pop" String="?>"/>
  </context>

  <!-- ^^^ PI end ^^^ -->

  <!--
    [39] element ::= EmptyElemTag | STag content ETag

    [40] STag ::= '<' Name (S Attribute)* S? '>'
    [41] Attribute ::= Name Eq AttValue
    [42] ETag ::= '</' Name S? '>'

    [43] content ::= CharData? ((element | Reference | CDSect | PI | Comment) CharData?)*
    [14] CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*)

    [44] EmptyElemTag ::= '<' Name (S Attribute)* S? '/>'

    [18] CDSect ::= CDStart CData CDEnd
    [19] CDStart ::= '<![CDATA['
    [20] CData ::= (Char* - (Char* ']]>' Char*))
    [21] CDEnd ::= ']]>'
  -->
  <context name="79:Outside" attribute="Normal Text" lineEndContext="#stay">
    <DetectSpaces attribute="Normal Text"/>
    <DetectIdentifier attribute="Normal Text"/>
    <RegExpr attribute="Normal Tag" context="80:STag" String="&lt;&name;"/>
    <RegExpr attribute="Normal Tag" context="85:ETag" String="&lt;/&name;"/>
    <RegExpr attribute="Entity" context="#stay" String="&entity;"/>
    <RegExpr attribute="Error" context="80:STag" String="&lt;&invalid_name;"/>
    <RegExpr attribute="Error" context="85:ETag" String="&lt;/&invalid_name;"/>
    <IncludeRules context="Comment"/>
    <StringDetect attribute="Entity" context="86:CDSect" String="&lt;![CDATA["/>
    <IncludeRules context="PI"/>
    <AnyChar attribute="Error" context="#stay" String="&lt;&amp;"/>
    <StringDetect attribute="Error" context="#stay" String="]]>"/>
  </context>

  <context name="80:STag" attribute="Error" lineEndContext="#stay">
    <Detect2Chars attribute="Normal Tag" context="#pop" char="/" char1="&gt;"/>
    <DetectChar attribute="Normal Tag" context="#pop" char="&gt;"/>
    <DetectSpaces attribute="Normal Text"/>
    <RegExpr attribute="Attribute" context="81:STag Attribute" String="(^|(?&lt;=[ \t]))(&name;|xmlns:[\w_.-]*|xmlns\b|xml:(lang|base|space)\b)"/>
  </context>

  <context name="81:STag Attribute" attribute="Error" lineEndContext="#stay">
    <DetectChar attribute="Attribute" context="AttValue" char="="/>
    <DetectSpaces attribute="Normal Tag" context="#stay"/>
  </context>

  <context name="85:ETag" attribute="Error" lineEndContext="#stay">
    <DetectChar attribute="Normal Tag" context="#pop" char="&gt;"/>
    <DetectSpaces attribute="Normal Tag" context="#stay"/>
  </context>

  <context name="86:CDSect" attribute="Normal Text" lineEndContext="#stay">
    <StringDetect attribute="Entity" context="79:Outside" String="]]>"/>
  </context>

  <!-- ^^^ Outside end ^^^ -->

  <!--
    [15] Comment ::= '<!-' '-' ((Char - '-') | ('-' (Char - '-')))* '-' '->'
  -->
  <context name="Comment" attribute="Comment" lineEndContext="#stay">
    <StringDetect attribute="Comment" context="87:Comment inside IS" String="&lt;!--" beginRegion="Comment"/>
  </context>

  <context name="87:Comment inside IS" attribute="Comment" lineEndContext="#stay">
    <DetectSpaces/>
    <StringDetect context="88:Comment double hyphen" String="--" lookAhead="1"/>
    <IncludeRules context="##Comments"/>
    <DetectIdentifier/>
  </context>

  <context name="88:Comment double hyphen" attribute="Comment" lineEndContext="#pop" fallthroughContext="#pop">
    <StringDetect attribute="Comment" context="#pop#pop" String="-->" endRegion="comment" />
    <DetectChar attribute="Error" char="-" />
  </context>

  <!-- ^^^ Comment end ^^^ -->

</contexts>
    <itemDatas>
      <itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="false"/>
      <itemData name="Entity" defStyleNum="dsChar" spellChecking="false"/>
      <itemData name="Normal Tag" defStyleNum="dsKeyword" spellChecking="false"/>
      <itemData name="Attribute" defStyleNum="dsDataType" spellChecking="false"/>
      <itemData name="Value" defStyleNum="dsString" spellChecking="false"/>
      <itemData name="Doctype Declaration" defStyleNum="dsKeyword" spellChecking="false"/>
      <itemData name="Comment" defStyleNum="dsComment"/>
      <itemData name="Processing Instruction" defStyleNum="dsKeyword" spellChecking="false"/>
      <itemData name="Processing Instruction Body" defStyleNum="dsNormal" spellChecking="false"/>
      <itemData name="Error" defStyleNum="dsError" spellChecking="false"/>
    </itemDatas>
  </highlighting>
  <general>
    <comments>
      <comment name="multiLine" start="&lt;!--" end="--&gt;" region="Comment"/>
    </comments>
    <keywords casesensitive="1"/>
  </general>
</language>