summaryrefslogtreecommitdiffstats
path: root/kate/tests/highlight.xml
blob: 007449c2991dfbff921d92d21eaed7ba09104817 (plain)
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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<!-- we need this tags or this is no valid file -->


This is a pseudo XML file to test Kate's XML syntax highlighting.

Doctype:
	<!DOCTYPE HTML PUBLIC "-//SOME_DOCTYPE 0.01//EN" SYSTEM "foobar.dtd">

Processing instruction:
	<?php processing instruction ?>

Comments:
	<!-- a comment -->
	<!-- another comment,
	using more than one line -->

Comment inside element:
	<element attr="foobar">content<!-- comment --></element>

Markup inside comment:
	<!--
	This is a comment!
	<element inside_comment />
	-->

Empty element:
	<empty/>
	<empty  />

Simple element plus content:
	<element>some content</element>
	<element attr="foobar">some
		content</element>

Namespace for elements and attributes:
	<ns:element>content</ns:element>
	<element ns:attr="content content">content</element>

Elements containing allowed characters:
	<element-dash foo="test"/>
	<element.dot foo="test"/>

Elements containing allowed start characters:
	<:element foo="test"/>
	<_element foo="test"/>

Single quotes (the same as double quotes):
	<element attr='content &nbsp; content'>content</element>

Allowed Whitespace:
	<element     attr   =   "test"  >
		content</element>

Entities:
	&nbsp;
	&#229;
	&#xE5;
	&#Xe5;
	&#1048;
	&#x6C34;
	<element attr="foo &nbsp; &#229; &amp; bar"/>

Illegal XML, should not be highlighted:
	<0foobar> -- no digit as first character
	<-foo> -- no dash as first character