aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Scripting/Tango.Scripting.Editors/Highlighting/Resources/XML-Mode.xshd
blob: 50fdc0e2c67e656653b7e687b45a5d1410c535de (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
<SyntaxDefinition name="XML" extensions=".xml;.xsl;.xslt;.xsd;.manifest;.config;.addin;.xshd;.wxs;.wxi;.wxl;.proj;.csproj;.vbproj;.ilproj;.booproj;.build;.xfrm;.targets;.xaml;.xpt;.xft;.map;.wsdl;.disco;.ps1xml;.nuspec" xmlns="http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008">
	<Color foreground="Green" name="Comment" exampleText="&lt;!-- comment --&gt;" />
	<Color foreground="#3F92D6" name="CData" exampleText="&lt;![CDATA[data]]&gt;" />
	<Color foreground="#C8C8C7" name="DocType" exampleText="&lt;!DOCTYPE rootElement&gt;" />
	<Color foreground="#3F92D6" name="XmlDeclaration" exampleText='&lt;?xml version="1.0"?&gt;' />
	<Color foreground="#3F92D6" name="XmlTag" exampleText='&lt;tag attribute="value" /&gt;' />
	<Color foreground="#92CAF4" name="AttributeName" exampleText='&lt;tag attribute="value" /&gt;' />
	<Color foreground="#C8C8C7" name="AttributeValue" exampleText='&lt;tag attribute="value" /&gt;' />
	<Color foreground="Teal" name="Entity" exampleText="index.aspx?a=1&amp;amp;b=2" />
	<Color foreground="Red" name="BrokenEntity" exampleText="index.aspx?a=1&amp;b=2" />
	
	<RuleSet>
		<Span color="Comment" multiline="true">
			<Begin>&lt;!--</Begin>
			<End>--&gt;</End>
		</Span>
		<Span color="CData" multiline="true">
			<Begin>&lt;!\[CDATA\[</Begin>
			<End>]]&gt;</End>
		</Span>
		<Span color="DocType" multiline="true">
			<Begin>&lt;!DOCTYPE</Begin>
			<End>&gt;</End>
		</Span>
		<Span color="XmlDeclaration" multiline="true">
			<Begin>&lt;\?</Begin>
			<End>\?&gt;</End>
		</Span>
		<Span color="XmlTag" multiline="true">
			<Begin>&lt;</Begin>
			<End>&gt;</End>
			<RuleSet>
				<!-- Treat the position before '<' as end, as that's not a valid character
				     in attribute names and indicates the user forgot a closing quote. -->
				<Span color="AttributeValue" multiline="true" ruleSet="EntitySet">
					<Begin>"</Begin>
					<End>"|(?=&lt;)</End>
				</Span>
				<Span color="AttributeValue" multiline="true" ruleSet="EntitySet">
					<Begin>'</Begin>
					<End>'|(?=&lt;)</End>
				</Span>
				<Rule color="AttributeName">[\d\w_\-\.]+(?=(\s*=))</Rule>
				<Rule color="AttributeValue">=</Rule>
			</RuleSet>
		</Span>
		<Import ruleSet="EntitySet"/>
	</RuleSet>
	
	<RuleSet name="EntitySet">
		<Rule color="Entity">
			&amp;
			[\w\d\#]+
			;
		</Rule>

		<Rule color="BrokenEntity">
			&amp;
			[\w\d\#]*
			#missing ;
		</Rule>
	</RuleSet>
</SyntaxDefinition>