Free cookie consent management tool by TermsFeed Policy Generator

source: stable/HeuristicLab.ExtLibs/HeuristicLab.AvalonEdit/5.0.1/AvalonEdit-5.0.1/Highlighting/Resources/ModeV1.xsd @ 13397

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

#2077: created branch and added first version

File size: 14.5 KB
Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" >
3  <xsd:annotation>
4    <xsd:documentation>
5    This schema defines the syntax for mode definitions in SharpDevelop.
6    The schema can be simplified quite a bit but it does the job as is.
7   
8   
9    If you are using this file as a reference it is probably easiest to scroll to
10    the botton to find the definition of the root element called SyntaxDefinition and
11    then unwind the different type definitions and refernces.
12   
13    Note on coloring:
14    Many tags define how some symbol should be colored. If a specific symbol
15    can not be matched onto either a Span definition, Keyword, or a Digit/Number it
16    will be rendered in the current default color. Which is the default color of the
17    current span or the default color of the mode as a whole if no span has been entered.
18    </xsd:documentation>
19  </xsd:annotation>
20 
21  <!-- Defines the default rendering of the mode -->
22  <xsd:complexType name="EnvironmentEntry">
23    <xsd:attribute name="bold" type="xsd:boolean" />
24    <xsd:attribute name="italic" type="xsd:boolean" />
25    <xsd:attribute name="color" type="xsd:string" />
26    <xsd:attribute name="bgcolor" type="xsd:string" />
27  </xsd:complexType>
28 
29  <xsd:complexType name="CustomEnvironmentEntry">
30    <xsd:attribute name="name" type="xsd:string" use="required" />
31    <xsd:attribute name="bold" type="xsd:boolean" />
32    <xsd:attribute name="italic" type="xsd:boolean" />
33    <xsd:attribute name="color" type="xsd:string" />
34    <xsd:attribute name="bgcolor" type="xsd:string" />
35  </xsd:complexType>
36 
37  <!-- The environment tag defines the coloring of various attributes in SharpDevelop -->
38  <xsd:complexType name="Environment">
39   
40    <xsd:choice minOccurs="0" maxOccurs="unbounded">
41      <xsd:element name="Default" type="EnvironmentEntry" minOccurs="0" maxOccurs="1" />
42      <xsd:element name="Selection" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
43      <xsd:element name="VRuler" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
44      <xsd:element name="InvalidLines" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
45      <xsd:element name="CaretMarker" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
46      <xsd:element name="CaretLine" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
47     
48      <xsd:element name="LineNumbers" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
49     
50      <xsd:element name="FoldLine" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
51      <xsd:element name="FoldMarker" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
52      <xsd:element name="SelectedFoldLine" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
53     
54      <xsd:element name="EOLMarkers" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
55      <xsd:element name="SpaceMarkers" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
56      <xsd:element name="TabMarkers" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
57     
58      <xsd:element name="Custom" type="CustomEnvironmentEntry" minOccurs="0" maxOccurs="unbounded"/>
59    </xsd:choice>
60  </xsd:complexType>
61 
62  <xsd:complexType name="Properties">
63    <xsd:sequence>
64      <xsd:element name="Property" type="Property" minOccurs="0" maxOccurs="unbounded"/>
65    </xsd:sequence>
66  </xsd:complexType>
67 
68  <xsd:complexType name="Property">
69    <!-- The actual KeyWord, typically reserved words or symbols in a programming language -->
70    <xsd:attribute name="name" type="xsd:string" />
71    <xsd:attribute name="value" type="xsd:string" />
72  </xsd:complexType>
73 
74  <!-- The Digits tag defines the color for rendering Digits-->
75  <xsd:complexType name="Digits">
76    <xsd:attribute name="name" type="xsd:string" />
77    <xsd:attribute name="bold" type="xsd:boolean" />
78    <xsd:attribute name="italic" type="xsd:boolean" />
79    <xsd:attribute name="color" type="xsd:string" />
80    <xsd:attribute name="bgcolor" type="xsd:string" />
81  </xsd:complexType>
82 
83  <!-- Defines the delimiting characters of the syntax, e.g., the characters that, "break up" a line
84    into separate symbols, typically key words. It is not necessary, or desirable to include the
85    characters that denot the start or end of a span. Space and Tab are implicitly defined as delimeters
86    and they don't need to be includeded explicitly (this will probably be changed at some future time).-->
87  <xsd:complexType name="Delimiters">
88    <xsd:simpleContent>
89      <xsd:extension base="xsd:string">
90      </xsd:extension>
91    </xsd:simpleContent>
92  </xsd:complexType>
93 
94  <!-- The beginning symbol of a Span -->
95  <xsd:complexType name="Begin">
96    <xsd:simpleContent>
97      <xsd:extension base="xsd:string">
98        <xsd:attribute name="singleword" type="xsd:boolean" />
99        <xsd:attribute name="startofline" type="xsd:boolean" />
100        <!-- The default rendering style for the Begin symbol. If not specified
101           the defaul rendering style for the span will be used. -->
102        <xsd:attribute name="bold" type="xsd:boolean" />
103        <xsd:attribute name="italic" type="xsd:boolean" />
104        <xsd:attribute name="color" type="xsd:string" />
105        <xsd:attribute name="bgcolor" type="xsd:string" />
106      </xsd:extension>
107    </xsd:simpleContent>
108  </xsd:complexType>
109 
110  <!-- The end symbol of a Span -->
111  <xsd:complexType name="End">
112    <xsd:simpleContent>
113      <xsd:extension base="xsd:string">
114        <xsd:attribute name="singleword" type="xsd:boolean" />
115        <!-- The default rendering style for the End symbol. If not specified
116           the defaul rendering style for the span will be used. -->
117        <xsd:attribute name="bold" type="xsd:boolean" />
118        <xsd:attribute name="italic" type="xsd:boolean" />
119        <xsd:attribute name="color" type="xsd:string" />
120        <xsd:attribute name="bgcolor" type="xsd:string" />
121      </xsd:extension>
122    </xsd:simpleContent>
123  </xsd:complexType>
124 
125  <xsd:complexType name="Span">
126    <xsd:sequence>
127      <!-- Defines the symbol that indicates the beginning of the span. -->
128      <xsd:element name="Begin" type="Begin" />
129      <!-- Defines the symbol that indicates the end of the span. May be omitted for
130         one-line spans. -->
131      <xsd:element name="End" minOccurs="0" type="End" />
132    </xsd:sequence>
133    <!-- The name of the span definition -->
134    <xsd:attribute name="name" type="xsd:string" use="required" />
135    <!-- Defines the rule set that is applicable in the Span. May be omitted. -->
136    <xsd:attribute name="rule" type="xsd:string" />
137    <!-- Defines wether the Span should terminate automatically at the end of line. Typical examples
138           include one-line comments such as // in C++ or REM in Windows .Bat files. -->
139    <xsd:attribute name="stopateol" type="xsd:boolean" />
140   
141    <!-- OBSOLUTE: Defines whether C-style escape sequences using \ are applicable or not in the span. -->
142    <xsd:attribute name="noescapesequences" type="xsd:boolean" />
143   
144    <!-- defines the escape character -->
145    <xsd:attribute name="escapecharacter" type="xsd:string" />
146   
147    <!-- The default rendering style for the span -->
148    <xsd:attribute name="bold" type="xsd:boolean" />
149    <xsd:attribute name="italic" type="xsd:boolean" />
150    <xsd:attribute name="color" type="xsd:string" />
151    <xsd:attribute name="bgcolor" type="xsd:string" />
152  </xsd:complexType>
153 
154  <xsd:complexType name="MarkPrevious">
155    <xsd:simpleContent>
156      <xsd:extension base="xsd:string">
157        <!-- Svante Lidman, looking in the code it is a bit unclear what the intent is here... -->
158        <xsd:attribute name="markmarker" type="xsd:boolean" />
159        <!-- The rendering style to be used -->
160        <xsd:attribute name="bold" type="xsd:boolean" />
161        <xsd:attribute name="italic" type="xsd:boolean" />
162        <xsd:attribute name="color" type="xsd:string" />
163        <xsd:attribute name="bgcolor" type="xsd:string" />
164      </xsd:extension>
165    </xsd:simpleContent>
166  </xsd:complexType>
167 
168  <!-- Allows you to define the coloring of the symbol that follows a specified symbol -->
169  <xsd:complexType name="MarkFollowing">
170    <xsd:simpleContent>
171      <xsd:extension base="xsd:string">
172        <!-- Svante Lidman, looking in the code it is a bit unclear what the intent is here... -->
173        <xsd:attribute name="markmarker" type="xsd:boolean" />
174        <!-- The rendering style to be used -->
175        <xsd:attribute name="bold" type="xsd:boolean" />
176        <xsd:attribute name="italic" type="xsd:boolean" />
177        <xsd:attribute name="color" type="xsd:string" />
178        <xsd:attribute name="bgcolor" type="xsd:string" />
179      </xsd:extension>
180    </xsd:simpleContent>
181  </xsd:complexType>
182 
183  <xsd:complexType name="Key">
184    <!-- The actual KeyWord, typically reserved words or symbols in a programming language -->
185    <xsd:attribute name="word" type="xsd:string" />
186  </xsd:complexType>
187 
188 
189  <!-- A grouping of keywords that sholuld be colored the same way -->
190  <xsd:complexType name="KeyWords">
191    <xsd:sequence>
192      <!-- allow groups with 0 keywords: this simplifies the syntax highlighting editor -->
193      <!-- A KeyWord -->
194      <xsd:element name="Key" type="Key" minOccurs="0" maxOccurs="unbounded">
195      </xsd:element>
196    </xsd:sequence>
197    <!-- The name of the KeyWord group -->
198    <xsd:attribute name="name" type="xsd:string" />
199    <!-- The rendering style of the  KeyWord group -->
200    <xsd:attribute name="bold" type="xsd:boolean" />
201    <xsd:attribute name="italic" type="xsd:boolean" />
202    <xsd:attribute name="color" type="xsd:string" />
203    <xsd:attribute name="bgcolor" type="xsd:string" />
204  </xsd:complexType>
205 
206  <xsd:complexType name="RuleSet">
207    <xsd:sequence>
208      <!-- Defines the delimiting characters of the syntax, e.g., the characters that, "break up" a line
209             into separate symbols, typically key words. It is not necessary, or desirable to include the
210             characters that denot the start or end of a span. Space and Tab are implicitly defined as delimeters
211             and they don't need to be includeded explicitly (this will probably be changed at some future time).-->
212      <xsd:element name="Delimiters" type="Delimiters" minOccurs="0" maxOccurs="1">
213      </xsd:element>
214      <!-- A Span tag defines a scope, or what can be seen as a separate parsing context where a different set of
215               highlighting rules are applicable compared to the text where the span is found.
216               Examples of spans include:
217               - A string in a language as C
218               - A <script> tag in Html
219               - The internals of a tag in XML (between < and >).
220               A span can have a rule set associated with it that defines the highlighting rules that are applicable
221               in the span. -->
222      <xsd:element name="Span" type="Span" minOccurs="0" maxOccurs="unbounded">
223      </xsd:element>
224      <!-- The MarkPrevious tag allows you to define the coloring of the item that preceeds a specific
225               symbol. An example of where this comes in handy is when coloring the contents of an XML-tag,
226               in particular the attributes and attribute names. The following definition:
227               <MarkPrevious bold="false" italic="false" color="Red">=</MarkPrevious>
228         will make teh highlighter color words that are followed by an = to be colored in Red.
229         You can see this in this file if you view it with the default XML-mode in SharpDevelop. -->
230      <xsd:element name="MarkPrevious" type="MarkPrevious" minOccurs="0" maxOccurs="unbounded">
231      </xsd:element>
232      <!-- The MarkFollowing tag works similarly as the MarkPrevious tag but relates to the coloring
233            of the symbol that follows the specified symbol. -->
234      <xsd:element name="MarkFollowing" type="MarkFollowing" minOccurs="0" maxOccurs="unbounded">
235      </xsd:element>
236      <!-- Defines a group of keywords that should be colored the same way -->
237      <xsd:element name="KeyWords" type="KeyWords" minOccurs="0" maxOccurs="unbounded">
238      </xsd:element>
239    </xsd:sequence>
240    <!-- The name of the RuleSet. Used when you refer to the RuleSet in the rule attribute of a Span tag.
241           Each mode file should have a rule definition without a defined name. This denotes the default rule
242           set for the mode. -->
243    <xsd:attribute name="name" type="xsd:string" />
244    <!-- Allows you to use another mode, defined in another file as a RuleSet. For an example see the
245           use of the JavaScript mode from the HTML-mode. -->
246    <xsd:attribute name="reference" type="xsd:string" />
247    <!-- Defines whether case is significant for matching keywords in the mode. -->
248    <xsd:attribute name="ignorecase" type="xsd:boolean" />
249    <!-- OBSOLETE: noescapesequences -->
250    <xsd:attribute name="noescapesequences" type="xsd:boolean" />
251    <!-- defines the escape character -->
252    <xsd:attribute name="escapecharacter" type="xsd:string" />
253  </xsd:complexType>
254 
255  <!-- The RuleSets tag is just a grouping of the set of RuleSets for a mode. -->
256  <xsd:complexType name="RuleSets">
257    <xsd:sequence minOccurs="0" maxOccurs="unbounded">
258      <!-- Any number of RuleSet tag can be defined in a mode -->
259      <xsd:element name="RuleSet" type="RuleSet" minOccurs="1" maxOccurs="unbounded">
260      </xsd:element>
261    </xsd:sequence>
262  </xsd:complexType>
263 
264  <!-- SyntaxDefinition is the root-element in a mode definition file -->
265  <xsd:element name="SyntaxDefinition">
266    <xsd:complexType>
267      <xsd:sequence>
268        <!-- The Environment tag defines colors, for various standard elements in the SharpDevelop GUI, if
269             not given the default values are used. -->
270        <xsd:element name="Environment" type="Environment" minOccurs="0" maxOccurs="1"/>
271       
272        <!-- The Properties section defines properties which are bound to the highlighting -->
273        <xsd:element name="Properties" type="Properties" minOccurs="0" maxOccurs="1" />
274       
275        <!-- The Digits tag defines the color for rendering Digits-->
276        <xsd:element name="Digits" type="Digits" minOccurs="0" maxOccurs="1"/>
277       
278        <!-- The RuleSets tag defines the rule sets that are used in the mode. Note that all modes are defined in
279           a flat structture even if they are used recursively. For an example of a mode that uses
280           multiple rule sets see the XML-mode. There is a top level rule-set and and another rule-set
281           that handles highligting within a tag, i.e., between < and >. -->
282        <xsd:element name="RuleSets" type="RuleSets" />
283      </xsd:sequence>
284      <!-- The name of the mode. This is used when you, in the defintion of a RuleSet refers to another
285         mode. I.e., one that is defined in an external file. For an example of this see the HTML-Mode that
286         uses the JavaScript-mode this way. -->
287      <xsd:attribute name="name" type="xsd:string" />
288      <!-- The file extensions that the mode is applicable for. Extensions must be written with lower case and
289         should include the ., as in .txt. If several extensions are applicable they should be separeated with | -->
290      <xsd:attribute name="extensions" type="xsd:string" />
291      <!-- Name of a syntax mode where rulesets, spans, keywords and other settings are imported from -->
292      <xsd:attribute name="extends" type="xsd:string" />
293    </xsd:complexType>
294  </xsd:element>
295
296</xsd:schema>
Note: See TracBrowser for help on using the repository browser.