1 | <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"> |
---|
2 | <Color foreground="Green" name="Comment" exampleText="<!-- comment -->" /> |
---|
3 | <Color foreground="Blue" name="CData" exampleText="<![CDATA[data]]>" /> |
---|
4 | <Color foreground="Blue" name="DocType" exampleText="<!DOCTYPE rootElement>" /> |
---|
5 | <Color foreground="Blue" name="XmlDeclaration" exampleText='<?xml version="1.0"?>' /> |
---|
6 | <Color foreground="DarkMagenta" name="XmlTag" exampleText='<tag attribute="value" />' /> |
---|
7 | <Color foreground="Red" name="AttributeName" exampleText='<tag attribute="value" />' /> |
---|
8 | <Color foreground="Blue" name="AttributeValue" exampleText='<tag attribute="value" />' /> |
---|
9 | <Color foreground="Teal" name="Entity" exampleText="index.aspx?a=1&amp;b=2" /> |
---|
10 | <Color foreground="Olive" name="BrokenEntity" exampleText="index.aspx?a=1&b=2" /> |
---|
11 | |
---|
12 | <RuleSet> |
---|
13 | <Span color="Comment" multiline="true"> |
---|
14 | <Begin><!--</Begin> |
---|
15 | <End>--></End> |
---|
16 | </Span> |
---|
17 | <Span color="CData" multiline="true"> |
---|
18 | <Begin><!\[CDATA\[</Begin> |
---|
19 | <End>]]></End> |
---|
20 | </Span> |
---|
21 | <Span color="DocType" multiline="true"> |
---|
22 | <Begin><!DOCTYPE</Begin> |
---|
23 | <End>></End> |
---|
24 | </Span> |
---|
25 | <Span color="XmlDeclaration" multiline="true"> |
---|
26 | <Begin><\?</Begin> |
---|
27 | <End>\?></End> |
---|
28 | </Span> |
---|
29 | <Span color="XmlTag" multiline="true"> |
---|
30 | <Begin><</Begin> |
---|
31 | <End>></End> |
---|
32 | <RuleSet> |
---|
33 | <!-- Treat the position before '<' as end, as that's not a valid character |
---|
34 | in attribute names and indicates the user forgot a closing quote. --> |
---|
35 | <Span color="AttributeValue" multiline="true" ruleSet="EntitySet"> |
---|
36 | <Begin>"</Begin> |
---|
37 | <End>"|(?=<)</End> |
---|
38 | </Span> |
---|
39 | <Span color="AttributeValue" multiline="true" ruleSet="EntitySet"> |
---|
40 | <Begin>'</Begin> |
---|
41 | <End>'|(?=<)</End> |
---|
42 | </Span> |
---|
43 | <Rule color="AttributeName">[\d\w_\-\.]+(?=(\s*=))</Rule> |
---|
44 | <Rule color="AttributeValue">=</Rule> |
---|
45 | </RuleSet> |
---|
46 | </Span> |
---|
47 | <Import ruleSet="EntitySet"/> |
---|
48 | </RuleSet> |
---|
49 | |
---|
50 | <RuleSet name="EntitySet"> |
---|
51 | <Rule color="Entity"> |
---|
52 | & |
---|
53 | [\w\d\#]+ |
---|
54 | ; |
---|
55 | </Rule> |
---|
56 | |
---|
57 | <Rule color="BrokenEntity"> |
---|
58 | & |
---|
59 | [\w\d\#]* |
---|
60 | #missing ; |
---|
61 | </Rule> |
---|
62 | </RuleSet> |
---|
63 | </SyntaxDefinition> |
---|