|
4 | 4 | <xsd:documentation> |
5 | 5 | This schema defines the syntax for mode definitions in SharpDevelop. |
6 | 6 | The schema can be simplified quite a bit but it does the job as is. |
7 | | - |
8 | | - |
| 7 | + |
| 8 | + |
9 | 9 | If you are using this file as a reference it is probably easiest to scroll to |
10 | 10 | the botton to find the definition of the root element called SyntaxDefinition and |
11 | 11 | then unwind the different type definitions and refernces. |
12 | | - |
| 12 | + |
13 | 13 | Note on coloring: |
14 | 14 | Many tags define how some symbol should be colored. If a specific symbol |
15 | 15 | can not be matched onto either a Span definition, Keyword, or a Digit/Number it |
16 | 16 | will be rendered in the current default color. Which is the default color of the |
17 | 17 | current span or the default color of the mode as a whole if no span has been entered. |
18 | 18 | </xsd:documentation> |
19 | 19 | </xsd:annotation> |
20 | | - |
| 20 | + |
21 | 21 | <!-- Defines the default rendering of the mode --> |
22 | 22 | <xsd:complexType name="EnvironmentEntry"> |
23 | 23 | <xsd:attribute name="bold" type="xsd:boolean" /> |
24 | 24 | <xsd:attribute name="italic" type="xsd:boolean" /> |
25 | 25 | <xsd:attribute name="color" type="xsd:string" /> |
26 | 26 | <xsd:attribute name="bgcolor" type="xsd:string" /> |
27 | 27 | </xsd:complexType> |
28 | | - |
| 28 | + |
29 | 29 | <xsd:complexType name="CustomEnvironmentEntry"> |
30 | 30 | <xsd:attribute name="name" type="xsd:string" use="required" /> |
31 | 31 | <xsd:attribute name="bold" type="xsd:boolean" /> |
32 | 32 | <xsd:attribute name="italic" type="xsd:boolean" /> |
33 | 33 | <xsd:attribute name="color" type="xsd:string" /> |
34 | 34 | <xsd:attribute name="bgcolor" type="xsd:string" /> |
35 | 35 | </xsd:complexType> |
36 | | - |
| 36 | + |
37 | 37 | <!-- The environment tag defines the coloring of various attributes in SharpDevelop --> |
38 | 38 | <xsd:complexType name="Environment"> |
39 | | - |
| 39 | + |
40 | 40 | <xsd:choice minOccurs="0" maxOccurs="unbounded"> |
41 | 41 | <xsd:element name="Default" type="EnvironmentEntry" minOccurs="0" maxOccurs="1" /> |
42 | 42 | <xsd:element name="Selection" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/> |
43 | 43 | <xsd:element name="VRuler" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/> |
44 | 44 | <xsd:element name="InvalidLines" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/> |
45 | 45 | <xsd:element name="CaretMarker" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/> |
46 | 46 | <xsd:element name="CaretLine" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/> |
47 | | - |
| 47 | + |
48 | 48 | <xsd:element name="LineNumbers" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/> |
49 | | - |
| 49 | + |
50 | 50 | <xsd:element name="FoldLine" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/> |
51 | 51 | <xsd:element name="FoldMarker" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/> |
52 | 52 | <xsd:element name="SelectedFoldLine" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/> |
53 | | - |
| 53 | + |
54 | 54 | <xsd:element name="EOLMarkers" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/> |
55 | 55 | <xsd:element name="SpaceMarkers" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/> |
56 | 56 | <xsd:element name="TabMarkers" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/> |
57 | | - |
| 57 | + |
58 | 58 | <xsd:element name="Custom" type="CustomEnvironmentEntry" minOccurs="0" maxOccurs="unbounded"/> |
59 | 59 | </xsd:choice> |
60 | 60 | </xsd:complexType> |
61 | | - |
| 61 | + |
62 | 62 | <xsd:complexType name="Properties"> |
63 | 63 | <xsd:sequence> |
64 | 64 | <xsd:element name="Property" type="Property" minOccurs="0" maxOccurs="unbounded"/> |
65 | 65 | </xsd:sequence> |
66 | 66 | </xsd:complexType> |
67 | | - |
| 67 | + |
68 | 68 | <xsd:complexType name="Property"> |
69 | 69 | <!-- The actual KeyWord, typically reserved words or symbols in a programming language --> |
70 | 70 | <xsd:attribute name="name" type="xsd:string" /> |
71 | 71 | <xsd:attribute name="value" type="xsd:string" /> |
72 | 72 | </xsd:complexType> |
73 | | - |
| 73 | + |
74 | 74 | <!-- The Digits tag defines the color for rendering Digits--> |
75 | 75 | <xsd:complexType name="Digits"> |
76 | 76 | <xsd:attribute name="name" type="xsd:string" /> |
|
79 | 79 | <xsd:attribute name="color" type="xsd:string" /> |
80 | 80 | <xsd:attribute name="bgcolor" type="xsd:string" /> |
81 | 81 | </xsd:complexType> |
82 | | - |
| 82 | + |
83 | 83 | <!-- Defines the delimiting characters of the syntax, e.g., the characters that, "break up" a line |
84 | 84 | into separate symbols, typically key words. It is not necessary, or desirable to include the |
85 | 85 | characters that denot the start or end of a span. Space and Tab are implicitly defined as delimeters |
|
90 | 90 | </xsd:extension> |
91 | 91 | </xsd:simpleContent> |
92 | 92 | </xsd:complexType> |
93 | | - |
| 93 | + |
94 | 94 | <!-- The beginning symbol of a Span --> |
95 | 95 | <xsd:complexType name="Begin"> |
96 | 96 | <xsd:simpleContent> |
|
106 | 106 | </xsd:extension> |
107 | 107 | </xsd:simpleContent> |
108 | 108 | </xsd:complexType> |
109 | | - |
| 109 | + |
110 | 110 | <!-- The end symbol of a Span --> |
111 | 111 | <xsd:complexType name="End"> |
112 | 112 | <xsd:simpleContent> |
|
121 | 121 | </xsd:extension> |
122 | 122 | </xsd:simpleContent> |
123 | 123 | </xsd:complexType> |
124 | | - |
| 124 | + |
125 | 125 | <xsd:complexType name="Span"> |
126 | 126 | <xsd:sequence> |
127 | 127 | <!-- Defines the symbol that indicates the beginning of the span. --> |
|
137 | 137 | <!-- Defines wether the Span should terminate automatically at the end of line. Typical examples |
138 | 138 | include one-line comments such as // in C++ or REM in Windows .Bat files. --> |
139 | 139 | <xsd:attribute name="stopateol" type="xsd:boolean" /> |
140 | | - |
| 140 | + |
141 | 141 | <!-- OBSOLUTE: Defines whether C-style escape sequences using \ are applicable or not in the span. --> |
142 | 142 | <xsd:attribute name="noescapesequences" type="xsd:boolean" /> |
143 | | - |
| 143 | + |
144 | 144 | <!-- defines the escape character --> |
145 | 145 | <xsd:attribute name="escapecharacter" type="xsd:string" /> |
146 | | - |
| 146 | + |
147 | 147 | <!-- The default rendering style for the span --> |
148 | 148 | <xsd:attribute name="bold" type="xsd:boolean" /> |
149 | 149 | <xsd:attribute name="italic" type="xsd:boolean" /> |
150 | 150 | <xsd:attribute name="color" type="xsd:string" /> |
151 | 151 | <xsd:attribute name="bgcolor" type="xsd:string" /> |
152 | 152 | </xsd:complexType> |
153 | | - |
| 153 | + |
154 | 154 | <xsd:complexType name="MarkPrevious"> |
155 | 155 | <xsd:simpleContent> |
156 | 156 | <xsd:extension base="xsd:string"> |
|
164 | 164 | </xsd:extension> |
165 | 165 | </xsd:simpleContent> |
166 | 166 | </xsd:complexType> |
167 | | - |
| 167 | + |
168 | 168 | <!-- Allows you to define the coloring of the symbol that follows a specified symbol --> |
169 | 169 | <xsd:complexType name="MarkFollowing"> |
170 | 170 | <xsd:simpleContent> |
|
179 | 179 | </xsd:extension> |
180 | 180 | </xsd:simpleContent> |
181 | 181 | </xsd:complexType> |
182 | | - |
| 182 | + |
183 | 183 | <xsd:complexType name="Key"> |
184 | 184 | <!-- The actual KeyWord, typically reserved words or symbols in a programming language --> |
185 | 185 | <xsd:attribute name="word" type="xsd:string" /> |
186 | 186 | </xsd:complexType> |
187 | | - |
188 | | - |
| 187 | + |
| 188 | + |
189 | 189 | <!-- A grouping of keywords that sholuld be colored the same way --> |
190 | 190 | <xsd:complexType name="KeyWords"> |
191 | 191 | <xsd:sequence> |
|
202 | 202 | <xsd:attribute name="color" type="xsd:string" /> |
203 | 203 | <xsd:attribute name="bgcolor" type="xsd:string" /> |
204 | 204 | </xsd:complexType> |
205 | | - |
| 205 | + |
206 | 206 | <xsd:complexType name="RuleSet"> |
207 | 207 | <xsd:sequence> |
208 | 208 | <!-- Defines the delimiting characters of the syntax, e.g., the characters that, "break up" a line |
|
212 | 212 | <xsd:element name="Delimiters" type="Delimiters" minOccurs="0" maxOccurs="1"> |
213 | 213 | </xsd:element> |
214 | 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. |
| 215 | + highlighting rules are applicable compared to the text where the span is found. |
216 | 216 | Examples of spans include: |
217 | 217 | - A string in a language as C |
218 | 218 | - A <script> tag in Html |
|
251 | 251 | <!-- defines the escape character --> |
252 | 252 | <xsd:attribute name="escapecharacter" type="xsd:string" /> |
253 | 253 | </xsd:complexType> |
254 | | - |
| 254 | + |
255 | 255 | <!-- The RuleSets tag is just a grouping of the set of RuleSets for a mode. --> |
256 | 256 | <xsd:complexType name="RuleSets"> |
257 | 257 | <xsd:sequence minOccurs="0" maxOccurs="unbounded"> |
|
260 | 260 | </xsd:element> |
261 | 261 | </xsd:sequence> |
262 | 262 | </xsd:complexType> |
263 | | - |
| 263 | + |
264 | 264 | <!-- SyntaxDefinition is the root-element in a mode definition file --> |
265 | 265 | <xsd:element name="SyntaxDefinition"> |
266 | 266 | <xsd:complexType> |
267 | 267 | <xsd:sequence> |
268 | 268 | <!-- The Environment tag defines colors, for various standard elements in the SharpDevelop GUI, if |
269 | 269 | not given the default values are used. --> |
270 | 270 | <xsd:element name="Environment" type="Environment" minOccurs="0" maxOccurs="1"/> |
271 | | - |
| 271 | + |
272 | 272 | <!-- The Properties section defines properties which are bound to the highlighting --> |
273 | 273 | <xsd:element name="Properties" type="Properties" minOccurs="0" maxOccurs="1" /> |
274 | | - |
| 274 | + |
275 | 275 | <!-- The Digits tag defines the color for rendering Digits--> |
276 | 276 | <xsd:element name="Digits" type="Digits" minOccurs="0" maxOccurs="1"/> |
277 | | - |
| 277 | + |
278 | 278 | <!-- The RuleSets tag defines the rule sets that are used in the mode. Note that all modes are defined in |
279 | 279 | a flat structture even if they are used recursively. For an example of a mode that uses |
280 | 280 | multiple rule sets see the XML-mode. There is a top level rule-set and and another rule-set |
|
0 commit comments