PageRenderTime 1200ms CodeModel.GetById 1194ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/AvalonEdit/ICSharpCode.AvalonEdit/Highlighting/Resources/ModeV2.xsd

http://github.com/icsharpcode/ILSpy
XML Schema | 168 lines | 151 code | 17 blank | 0 comment | 0 complexity | 441362a5096bbf34d07760bef2ca3b1e MD5 | raw file
  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:attribute name="underline" type="xsd:boolean" use="optional" />
 39		<xsd:anyAttribute namespace="##other" processContents="lax" />
 40	</xsd:attributeGroup>
 41	
 42	<xsd:attributeGroup name="ColorReferenceAttributes">
 43		<xsd:attributeGroup ref="ColorAttributes" />
 44		<xsd:attribute name="color" type="xsd:string" use="optional" />
 45	</xsd:attributeGroup>
 46	
 47	<xsd:element name="Color">
 48		<xsd:complexType>
 49			<xsd:attribute name="name" type="xsd:string" use="required" />
 50			<xsd:attribute name="exampleText" type="xsd:string" use="optional" />
 51			<xsd:attributeGroup ref="ColorAttributes"/>
 52		</xsd:complexType>
 53	</xsd:element>
 54	
 55	<xsd:element name="Property">
 56		<xsd:complexType>
 57			<xsd:attribute name="name" type="xsd:string" use="required" />
 58			<xsd:attribute name="value" type="xsd:string" use="required" />
 59			<xsd:anyAttribute namespace="##other" processContents="lax" />
 60		</xsd:complexType>
 61	</xsd:element>
 62	
 63	<!-- Regular expression -->
 64	<xsd:simpleType name="regex">
 65		<xsd:restriction base="xsd:string"/>
 66	</xsd:simpleType>
 67	
 68	<xsd:simpleType name="regexIgnorePatternWhitespace">
 69		<xsd:restriction base="xsd:string"/>
 70	</xsd:simpleType>
 71	
 72	<!-- Keywords -->
 73	<xsd:element name="Keywords">
 74		<xsd:complexType>
 75			<xsd:sequence>
 76				<xsd:element ref="Word" minOccurs="1" maxOccurs="unbounded"/>
 77			</xsd:sequence>
 78			<xsd:attributeGroup ref="ColorReferenceAttributes"/>
 79		</xsd:complexType>
 80	</xsd:element>
 81	
 82	<xsd:element name="Word">
 83		<xsd:complexType>
 84			<xsd:simpleContent>
 85				<xsd:extension base="xsd:string">
 86					<xsd:anyAttribute namespace="##other" processContents="lax" />
 87				</xsd:extension>
 88			</xsd:simpleContent>
 89		</xsd:complexType>
 90	</xsd:element>
 91	
 92	<!-- Spans -->
 93	<xsd:element name="Span">
 94		<xsd:complexType>
 95			<xsd:sequence>
 96				<xsd:element ref="Begin" minOccurs="0" maxOccurs="1"/>
 97				<xsd:element ref="End" minOccurs="0" maxOccurs="1"/>
 98				<xsd:element ref="RuleSet" minOccurs="0" maxOccurs="1"/>
 99			</xsd:sequence>
100			
101			<xsd:attributeGroup ref="ColorReferenceAttributes"/>
102			<xsd:attribute name="multiline" type="xsd:boolean" use="optional"/>
103			<xsd:attribute name="ruleSet" type="xsd:string" use="optional"/>
104			<xsd:attribute name="begin" type="regex" use="optional"/>
105			<xsd:attribute name="end" type="regex" use="optional"/>
106		</xsd:complexType>
107	</xsd:element>
108	
109	<xsd:complexType name="SpanBeginEnd">
110		<xsd:simpleContent>
111			<xsd:extension base="regexIgnorePatternWhitespace">
112				<xsd:attributeGroup ref="ColorReferenceAttributes"/>
113			</xsd:extension>
114		</xsd:simpleContent>
115	</xsd:complexType>
116	
117	<xsd:element name="Begin" type="SpanBeginEnd"/>
118	<xsd:element name="End" type="SpanBeginEnd"/>
119	
120	<!-- Imports -->
121	<xsd:element name="Import">
122		<xsd:complexType>
123			<xsd:attribute name="ruleSet" type="xsd:string" use="required"/>
124		</xsd:complexType>
125	</xsd:element>
126	
127	<!-- Rules -->
128	<xsd:element name="Rule">
129		<xsd:complexType>
130			<xsd:simpleContent>
131				<xsd:extension base="regexIgnorePatternWhitespace">
132					<xsd:attributeGroup ref="ColorReferenceAttributes"/>
133				</xsd:extension>
134			</xsd:simpleContent>
135		</xsd:complexType>
136	</xsd:element>
137	
138	<!-- Rule set -->
139	<xsd:element name="RuleSet">
140		<xsd:complexType>
141			<xsd:choice minOccurs="0" maxOccurs="unbounded">
142				<xsd:element ref="Keywords"/>
143				<xsd:element ref="Span"/>
144				<xsd:element ref="Import"/>
145				<xsd:element ref="Rule"/>
146				<xsd:any namespace="##other" processContents="lax" />
147			</xsd:choice>
148			<xsd:attribute name="name" type="xsd:string" use="optional" />
149			<xsd:attribute name="ignoreCase" type="xsd:boolean" use="optional" />
150			<xsd:anyAttribute namespace="##other" processContents="lax" />
151		</xsd:complexType>
152	</xsd:element>
153	
154	<!-- Main syntax definition -->
155	<xsd:element name="SyntaxDefinition">
156		<xsd:complexType>
157			<xsd:choice minOccurs="1" maxOccurs="unbounded">
158				<xsd:element ref="Property"/>
159				<xsd:element ref="Color"/>
160				<xsd:element ref="RuleSet"/>
161				<xsd:any namespace="##other" processContents="lax" />
162			</xsd:choice>
163			<xsd:attribute name="name" type="xsd:string" use="optional" />
164			<xsd:attribute name="extensions" type="xsd:string" use="optional" />
165			<xsd:anyAttribute namespace="##other" processContents="lax" />
166		</xsd:complexType>
167	</xsd:element>
168</xsd:schema>