Free cookie consent management tool by TermsFeed Policy Generator

source: branches/2839_HiveProjectManagement/HeuristicLab.ExtLibs/HeuristicLab.AvalonEdit/5.0.1/AvalonEdit-5.0.1/Highlighting/Resources/ModeV2.xsd @ 18242

Last change on this file since 18242 was 11700, checked in by jkarder, 10 years ago

#2077: created branch and added first version

File size: 5.5 KB
Line 
1<?xml version="1.0" encoding="utf-8"?>
2<xsd:schema version="2" elementFormDefault="qualified" targetNamespace="http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008" xmlns="http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
3  <!-- Font Weight -->
4  <xsd:simpleType name="FontWeight">
5    <xsd:union>
6      <xsd:simpleType>
7        <xsd:restriction base="xsd:integer">
8          <xsd:minInclusive value="1"/>
9          <xsd:maxInclusive value="999"/>
10        </xsd:restriction>
11      </xsd:simpleType>
12      <xsd:simpleType>
13        <xsd:restriction base="xsd:string">
14          <xsd:enumeration value="bold"/>
15          <xsd:enumeration value="normal"/>
16          <xsd:enumeration value="regular"/>
17          <!-- should we support other font weight names? -->
18        </xsd:restriction>
19      </xsd:simpleType>
20    </xsd:union>
21  </xsd:simpleType>
22 
23  <!-- Font Style -->
24  <xsd:simpleType name="FontStyle">
25    <xsd:restriction base="xsd:string">
26      <xsd:enumeration value="italic"/>
27      <xsd:enumeration value="normal"/>
28      <xsd:enumeration value="oblique"/>
29    </xsd:restriction>
30  </xsd:simpleType>
31 
32  <!-- Color -->
33  <xsd:attributeGroup name="ColorAttributes">
34    <xsd:attribute name="foreground" type="xsd:string" use="optional" />
35    <xsd:attribute name="background" type="xsd:string" use="optional" />
36    <xsd:attribute name="fontWeight" type="FontWeight" use="optional" />
37    <xsd:attribute name="fontStyle" type="FontStyle" use="optional" />
38    <xsd:anyAttribute namespace="##other" processContents="lax" />
39  </xsd:attributeGroup>
40 
41  <xsd:attributeGroup name="ColorReferenceAttributes">
42    <xsd:attributeGroup ref="ColorAttributes" />
43    <xsd:attribute name="color" type="xsd:string" use="optional" />
44  </xsd:attributeGroup>
45 
46  <xsd:element name="Color">
47    <xsd:complexType>
48      <xsd:attribute name="name" type="xsd:string" use="required" />
49      <xsd:attribute name="exampleText" type="xsd:string" use="optional" />
50      <xsd:attributeGroup ref="ColorAttributes"/>
51    </xsd:complexType>
52  </xsd:element>
53 
54  <xsd:element name="Property">
55    <xsd:complexType>
56      <xsd:attribute name="name" type="xsd:string" use="required" />
57      <xsd:attribute name="value" type="xsd:string" use="required" />
58      <xsd:anyAttribute namespace="##other" processContents="lax" />
59    </xsd:complexType>
60  </xsd:element>
61 
62  <!-- Regular expression -->
63  <xsd:simpleType name="regex">
64    <xsd:restriction base="xsd:string"/>
65  </xsd:simpleType>
66 
67  <xsd:simpleType name="regexIgnorePatternWhitespace">
68    <xsd:restriction base="xsd:string"/>
69  </xsd:simpleType>
70 
71  <!-- Keywords -->
72  <xsd:element name="Keywords">
73    <xsd:complexType>
74      <xsd:sequence>
75        <xsd:element ref="Word" minOccurs="1" maxOccurs="unbounded"/>
76      </xsd:sequence>
77      <xsd:attributeGroup ref="ColorReferenceAttributes"/>
78    </xsd:complexType>
79  </xsd:element>
80 
81  <xsd:element name="Word">
82    <xsd:complexType>
83      <xsd:simpleContent>
84        <xsd:extension base="xsd:string">
85          <xsd:anyAttribute namespace="##other" processContents="lax" />
86        </xsd:extension>
87      </xsd:simpleContent>
88    </xsd:complexType>
89  </xsd:element>
90 
91  <!-- Spans -->
92  <xsd:element name="Span">
93    <xsd:complexType>
94      <xsd:sequence>
95        <xsd:element ref="Begin" minOccurs="0" maxOccurs="1"/>
96        <xsd:element ref="End" minOccurs="0" maxOccurs="1"/>
97        <xsd:element ref="RuleSet" minOccurs="0" maxOccurs="1"/>
98      </xsd:sequence>
99     
100      <xsd:attributeGroup ref="ColorReferenceAttributes"/>
101      <xsd:attribute name="multiline" type="xsd:boolean" use="optional"/>
102      <xsd:attribute name="ruleSet" type="xsd:string" use="optional"/>
103      <xsd:attribute name="begin" type="regex" use="optional"/>
104      <xsd:attribute name="end" type="regex" use="optional"/>
105    </xsd:complexType>
106  </xsd:element>
107 
108  <xsd:complexType name="SpanBeginEnd">
109    <xsd:simpleContent>
110      <xsd:extension base="regexIgnorePatternWhitespace">
111        <xsd:attributeGroup ref="ColorReferenceAttributes"/>
112      </xsd:extension>
113    </xsd:simpleContent>
114  </xsd:complexType>
115 
116  <xsd:element name="Begin" type="SpanBeginEnd"/>
117  <xsd:element name="End" type="SpanBeginEnd"/>
118 
119  <!-- Imports -->
120  <xsd:element name="Import">
121    <xsd:complexType>
122      <xsd:attribute name="ruleSet" type="xsd:string" use="required"/>
123    </xsd:complexType>
124  </xsd:element>
125 
126  <!-- Rules -->
127  <xsd:element name="Rule">
128    <xsd:complexType>
129      <xsd:simpleContent>
130        <xsd:extension base="regexIgnorePatternWhitespace">
131          <xsd:attributeGroup ref="ColorReferenceAttributes"/>
132        </xsd:extension>
133      </xsd:simpleContent>
134    </xsd:complexType>
135  </xsd:element>
136 
137  <!-- Rule set -->
138  <xsd:element name="RuleSet">
139    <xsd:complexType>
140      <xsd:choice minOccurs="0" maxOccurs="unbounded">
141        <xsd:element ref="Keywords"/>
142        <xsd:element ref="Span"/>
143        <xsd:element ref="Import"/>
144        <xsd:element ref="Rule"/>
145        <xsd:any namespace="##other" processContents="lax" />
146      </xsd:choice>
147      <xsd:attribute name="name" type="xsd:string" use="optional" />
148      <xsd:attribute name="ignoreCase" type="xsd:boolean" use="optional" />
149      <xsd:anyAttribute namespace="##other" processContents="lax" />
150    </xsd:complexType>
151  </xsd:element>
152 
153  <!-- Main syntax definition -->
154  <xsd:element name="SyntaxDefinition">
155    <xsd:complexType>
156      <xsd:choice minOccurs="1" maxOccurs="unbounded">
157        <xsd:element ref="Property"/>
158        <xsd:element ref="Color"/>
159        <xsd:element ref="RuleSet"/>
160        <xsd:any namespace="##other" processContents="lax" />
161      </xsd:choice>
162      <xsd:attribute name="name" type="xsd:string" use="optional" />
163      <xsd:attribute name="extensions" type="xsd:string" use="optional" />
164      <xsd:anyAttribute namespace="##other" processContents="lax" />
165    </xsd:complexType>
166  </xsd:element>
167</xsd:schema>
Note: See TracBrowser for help on using the repository browser.