ActiproSoftware.SyntaxEditor.LanguageDefinition.xsd
上传用户:lanchensha
上传日期:2022-02-27
资源大小:7530k
文件大小:22k
源码类别:

编辑器/阅读器

开发平台:

C#

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!--
  3. XSD Schema for Actipro SyntaxEditor XML Language Definition 4.0
  4. Copyright (c) 2001-2006 Actipro Software LLC.  All rights reserved.
  5. http://www.ActiproSoftware.com/Products/DotNet/
  6. -->
  7. <xs:schema id="LanguageDefinition" targetNamespace="http://ActiproSoftware/SyntaxEditor/4.0/LanguageDefinition" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://ActiproSoftware/SyntaxEditor/4.0/LanguageDefinition" elementFormDefault="qualified">
  8. <!-- -->
  9. <xs:simpleType name="Boolean">
  10. <xs:restriction base="xs:string">
  11. <xs:enumeration value="True" />
  12. <xs:enumeration value="False" />
  13. </xs:restriction>
  14. </xs:simpleType>
  15. <!-- -->
  16. <xs:simpleType name="CaseSensitivity">
  17. <xs:restriction base="xs:string">
  18. <xs:enumeration value="Sensitive" />
  19. <xs:enumeration value="Insensitive" />
  20. <xs:enumeration value="AutoCorrect" />
  21. </xs:restriction>
  22. </xs:simpleType>
  23. <!-- -->
  24. <xs:simpleType name="DefaultableBoolean">
  25. <xs:restriction base="xs:string">
  26. <xs:enumeration value="Default" />
  27. <xs:enumeration value="True" />
  28. <xs:enumeration value="False" />
  29. </xs:restriction>
  30. </xs:simpleType>
  31. <!-- -->
  32. <xs:simpleType name="HighlightingStyleBorderCornerStyle">
  33. <xs:restriction base="xs:string">
  34. <xs:enumeration value="Square" />
  35. <xs:enumeration value="SinglePixelRounded" />
  36. </xs:restriction>
  37. </xs:simpleType>
  38. <!-- -->
  39. <xs:simpleType name="HighlightingStyleLineStyle">
  40. <xs:restriction base="xs:string">
  41. <xs:enumeration value="Default" />
  42. <xs:enumeration value="Solid" />
  43. <xs:enumeration value="DashDot" />
  44. <xs:enumeration value="Dot" />
  45. <xs:enumeration value="Dash" />
  46. <xs:enumeration value="Wave" />
  47. <xs:enumeration value="None" />
  48. </xs:restriction>
  49. </xs:simpleType>
  50. <!-- -->
  51. <xs:simpleType name="HighlightingStyleLineWeight">
  52. <xs:restriction base="xs:string">
  53. <xs:enumeration value="Single" />
  54. <xs:enumeration value="Double" />
  55. </xs:restriction>
  56. </xs:simpleType>
  57. <!-- -->
  58. <xs:simpleType name="ModifierKeys">
  59. <xs:restriction base="xs:string">
  60. <xs:enumeration value="Control" />
  61. <xs:enumeration value="Shift" />
  62. <xs:enumeration value="Alt" />
  63. <xs:enumeration value="ControlShift" />
  64. <xs:enumeration value="ControlAlt" />
  65. <xs:enumeration value="ShiftAlt" />
  66. <xs:enumeration value="ControlShiftAlt" />
  67. <xs:enumeration value="None" />
  68. <xs:enumeration value="AnyControl" />
  69. <xs:enumeration value="AnyShift" />
  70. <xs:enumeration value="AnyAlt" />
  71. <xs:enumeration value="AnyControlShift" />
  72. <xs:enumeration value="AnyControlAlt" />
  73. <xs:enumeration value="AnyShiftAlt" />
  74. <xs:enumeration value="Any" />
  75. </xs:restriction>
  76. </xs:simpleType>
  77. <!-- -->
  78. <xs:simpleType name="PatternGroupType">
  79. <xs:restriction base="xs:string">
  80. <xs:enumeration value="StartScope" />
  81. <xs:enumeration value="EndScope" />
  82. </xs:restriction>
  83. </xs:simpleType>
  84. <!-- -->
  85. <xs:complexType name="ExplicitPatternGroup">
  86. <xs:sequence>
  87. <xs:element name="ExplicitPattern" minOccurs="0" maxOccurs="unbounded">
  88. <xs:annotation>
  89. <xs:documentation>A pattern within an explicit pattern group.</xs:documentation>
  90. </xs:annotation>
  91. <xs:complexType>
  92. <xs:attribute name="Value" type="xs:string" use="required" />
  93. </xs:complexType>
  94. </xs:element>
  95. <xs:element name="ExplicitPatterns" minOccurs="0">
  96. <xs:annotation>
  97. <xs:documentation>A set of patterns within an explicit pattern group, delimited by whitespace.</xs:documentation>
  98. </xs:annotation>
  99. </xs:element>
  100. </xs:sequence>
  101. <xs:attribute name="Key" type="xs:string" use="optional" />
  102. <xs:attribute name="TokenKey" type="xs:string" use="required" />
  103. <xs:attribute name="TokenID" type="xs:string" use="optional" />
  104. <xs:attribute name="Style" type="xs:string" use="optional" />
  105. <xs:attribute name="PatternValue" type="xs:string" use="optional" />
  106. <xs:attribute name="LookBehind" type="xs:string" use="optional" />
  107. <xs:attribute name="LookAhead" type="xs:string" use="optional" />
  108. <xs:attribute name="CaseSensitivity" type="CaseSensitivity" use="optional" />
  109. <xs:attribute name="IsWhitespace" type="Boolean" use="optional" />
  110. <xs:attribute name="IsContentDivider" type="Boolean" use="optional" />
  111. <xs:attribute name="StartBracket" type="xs:string" use="optional" />
  112. <xs:attribute name="EndBracket" type="xs:string" use="optional" />
  113. </xs:complexType>
  114. <!-- -->
  115. <xs:complexType name="ScopeExplicitPatternGroup">
  116. <xs:attribute name="Type" type="PatternGroupType" use="required" />
  117. <xs:attribute name="Key" type="xs:string" use="optional" />
  118. <xs:attribute name="TokenKey" type="xs:string" use="required" />
  119. <xs:attribute name="TokenID" type="xs:string" use="optional" />
  120. <xs:attribute name="Style" type="xs:string" use="optional" />
  121. <xs:attribute name="PatternValue" type="xs:string" use="optional" />
  122. <xs:attribute name="LookBehind" type="xs:string" use="optional" />
  123. <xs:attribute name="LookAhead" type="xs:string" use="optional" />
  124. <xs:attribute name="CaseSensitivity" type="CaseSensitivity" use="optional" />
  125. <xs:attribute name="IsWhitespace" type="Boolean" use="optional" />
  126. <xs:attribute name="IsContentDivider" type="Boolean" use="optional" />
  127. </xs:complexType>
  128. <!-- -->
  129. <xs:complexType name="RegexPatternGroup">
  130. <xs:sequence>
  131. <xs:element name="RegexPattern" minOccurs="0" maxOccurs="unbounded">
  132. <xs:annotation>
  133. <xs:documentation>A pattern within a regular expression pattern group.</xs:documentation>
  134. </xs:annotation>
  135. <xs:complexType>
  136. <xs:attribute name="Value" type="xs:string" use="required" />
  137. </xs:complexType>
  138. </xs:element>
  139. </xs:sequence>
  140. <xs:attribute name="Key" type="xs:string" use="optional" />
  141. <xs:attribute name="TokenKey" type="xs:string" use="required" />
  142. <xs:attribute name="TokenID" type="xs:string" use="optional" />
  143. <xs:attribute name="Style" type="xs:string" use="optional" />
  144. <xs:attribute name="PatternValue" type="xs:string" use="optional" />
  145. <xs:attribute name="LookBehind" type="xs:string" use="optional" />
  146. <xs:attribute name="LookAhead" type="xs:string" use="optional" />
  147. <xs:attribute name="CaseSensitivity" type="CaseSensitivity" use="optional" />
  148. <xs:attribute name="IsWhitespace" type="Boolean" use="optional" />
  149. <xs:attribute name="IsContentDivider" type="Boolean" use="optional" />
  150. <xs:attribute name="StartBracket" type="xs:string" use="optional" />
  151. <xs:attribute name="EndBracket" type="xs:string" use="optional" />
  152. </xs:complexType>
  153. <!-- -->
  154. <xs:complexType name="ScopeRegexPatternGroup">
  155. <xs:attribute name="Type" type="PatternGroupType" use="optional" />
  156. <xs:attribute name="Key" type="xs:string" use="optional" />
  157. <xs:attribute name="TokenKey" type="xs:string" use="required" />
  158. <xs:attribute name="TokenID" type="xs:string" use="optional" />
  159. <xs:attribute name="Style" type="xs:string" use="optional" />
  160. <xs:attribute name="PatternValue" type="xs:string" use="optional" />
  161. <xs:attribute name="LookBehind" type="xs:string" use="optional" />
  162. <xs:attribute name="LookAhead" type="xs:string" use="optional" />
  163. <xs:attribute name="CaseSensitivity" type="CaseSensitivity" use="optional" />
  164. <xs:attribute name="IsWhitespace" type="Boolean" use="optional" />
  165. <xs:attribute name="IsContentDivider" type="Boolean" use="optional" />
  166. </xs:complexType>
  167. <!-- -->
  168. <xs:element name="SyntaxLanguage">
  169. <xs:annotation>
  170. <xs:documentation>The root element for a dynamic language XML definition.</xs:documentation>
  171. </xs:annotation>
  172. <xs:complexType>
  173. <xs:sequence>
  174. <xs:element name="Properties" minOccurs="0">
  175. <xs:annotation>
  176. <xs:documentation>A set of string-based properties that are assigned to the language.</xs:documentation>
  177. </xs:annotation>
  178. <xs:complexType>
  179. <xs:choice>
  180. <xs:element name="Property" minOccurs="0" maxOccurs="unbounded">
  181. <xs:annotation>
  182. <xs:documentation>A string-based property that is assigned to the language.</xs:documentation>
  183. </xs:annotation>
  184. <xs:complexType>
  185. <xs:attribute name="Key" type="xs:string" use="required" />
  186. <xs:attribute name="Value" type="xs:string" use="required" />
  187. </xs:complexType>
  188. </xs:element>
  189. </xs:choice>
  190. </xs:complexType>
  191. </xs:element>
  192. <xs:element name="Triggers" minOccurs="0">
  193. <xs:annotation>
  194. <xs:documentation>A set of triggers that fire when certain events occur.</xs:documentation>
  195. </xs:annotation>
  196. <xs:complexType>
  197. <xs:choice maxOccurs="unbounded">
  198. <xs:element name="AutoReplaceTrigger" minOccurs="0" maxOccurs="unbounded">
  199. <xs:annotation>
  200. <xs:documentation>A trigger that executes auto-replace functionality.</xs:documentation>
  201. </xs:annotation>
  202. <xs:complexType>
  203. <xs:sequence>
  204. <xs:element name="AutoReplaceTriggerActivators">
  205. <xs:annotation>
  206. <xs:documentation>A set of characters that cause the trigger to fire.</xs:documentation>
  207. </xs:annotation>
  208. <xs:complexType>
  209. <xs:choice>
  210. <xs:element name="AutoReplaceTriggerActivator" maxOccurs="unbounded">
  211. <xs:annotation>
  212. <xs:documentation>A character that causes the trigger to fire.</xs:documentation>
  213. </xs:annotation>
  214. <xs:complexType>
  215. <xs:attribute name="Character" type="xs:string" use="required" />
  216. </xs:complexType>
  217. </xs:element>
  218. </xs:choice>
  219. </xs:complexType>
  220. </xs:element>
  221. <xs:element name="AutoReplaceTriggerValidStates" minOccurs="0">
  222. <xs:annotation>
  223. <xs:documentation>A set of the lexical states in which the trigger is valid.</xs:documentation>
  224. </xs:annotation>
  225. <xs:complexType>
  226. <xs:choice>
  227. <xs:element name="AutoReplaceTriggerValidState" maxOccurs="unbounded">
  228. <xs:annotation>
  229. <xs:documentation>A lexical state in which the trigger is valid.</xs:documentation>
  230. </xs:annotation>
  231. <xs:complexType>
  232. <xs:attribute name="State" type="xs:string" use="required" />
  233. </xs:complexType>
  234. </xs:element>
  235. </xs:choice>
  236. </xs:complexType>
  237. </xs:element>
  238. </xs:sequence>
  239. <xs:attribute name="Key" type="xs:string" use="required" />
  240. <xs:attribute name="AllowGlobalLookup" type="Boolean" use="optional" />
  241. </xs:complexType>
  242. </xs:element>
  243. <xs:element name="KeyPressTrigger" minOccurs="0" maxOccurs="unbounded">
  244. <xs:annotation>
  245. <xs:documentation>A trigger that executes when a key is pressed while in a certain lexical state.</xs:documentation>
  246. </xs:annotation>
  247. <xs:complexType>
  248. <xs:sequence>
  249. <xs:element name="KeyPressTriggerValidStates" minOccurs="0">
  250. <xs:annotation>
  251. <xs:documentation>A set of the lexical states in which the trigger is valid.</xs:documentation>
  252. </xs:annotation>
  253. <xs:complexType>
  254. <xs:choice>
  255. <xs:element name="KeyPressTriggerValidState" maxOccurs="unbounded">
  256. <xs:annotation>
  257. <xs:documentation>A lexical state in which the trigger is valid.</xs:documentation>
  258. </xs:annotation>
  259. <xs:complexType>
  260. <xs:attribute name="State" type="xs:string" use="required" />
  261. </xs:complexType>
  262. </xs:element>
  263. </xs:choice>
  264. </xs:complexType>
  265. </xs:element>
  266. </xs:sequence>
  267. <xs:attribute name="Key" type="xs:string" use="required" />
  268. <xs:attribute name="Character" type="xs:string" use="required" />
  269. <xs:attribute name="AllowInReadOnlyMode" type="Boolean" use="optional" />
  270. </xs:complexType>
  271. </xs:element>
  272. </xs:choice>
  273. </xs:complexType>
  274. </xs:element>
  275. <xs:element name="Styles">
  276. <xs:annotation>
  277. <xs:documentation>A set of highlighting styles.</xs:documentation>
  278. </xs:annotation>
  279. <xs:complexType>
  280. <xs:choice>
  281. <xs:element name="Style" minOccurs="0" maxOccurs="unbounded">
  282. <xs:annotation>
  283. <xs:documentation>A highlighting style definition.</xs:documentation>
  284. </xs:annotation>
  285. <xs:complexType>
  286. <xs:attribute name="Key" type="xs:string" use="required" />
  287. <xs:attribute name="Name" type="xs:string" use="optional" />
  288. <xs:attribute name="ForeColor" type="xs:string" use="optional" />
  289. <xs:attribute name="BackColor" type="xs:string" use="optional" />
  290. <xs:attribute name="Bold" type="DefaultableBoolean" use="optional" />
  291. <xs:attribute name="BorderColor" type="xs:string" use="optional" />
  292. <xs:attribute name="BorderCornerStyle" type="HighlightingStyleBorderCornerStyle" use="optional" />
  293. <xs:attribute name="BorderStyle" type="HighlightingStyleLineStyle" use="optional" />
  294. <xs:attribute name="CursorName" type="xs:string" use="optional" />
  295. <xs:attribute name="CursorModifierKeys" type="ModifierKeys" use="optional" />
  296. <xs:attribute name="FontFamilyName" type="xs:string" use="optional" />
  297. <xs:attribute name="FontSize" type="xs:string" use="optional" />
  298. <xs:attribute name="Italic" type="DefaultableBoolean" use="optional" />
  299. <xs:attribute name="StrikeOutColor" type="xs:string" use="optional" />
  300. <xs:attribute name="StrikeOutStyle" type="HighlightingStyleLineStyle" use="optional" />
  301. <xs:attribute name="StrikeOutWeight" type="HighlightingStyleLineWeight" use="optional" />
  302. <xs:attribute name="UnderlineColor" type="xs:string" use="optional" />
  303. <xs:attribute name="UnderlineStyle" type="HighlightingStyleLineStyle" use="optional" />
  304. <xs:attribute name="UnderlineWeight" type="HighlightingStyleLineWeight" use="optional" />
  305. </xs:complexType>
  306. </xs:element>
  307. </xs:choice>
  308. </xs:complexType>
  309. </xs:element>
  310. <xs:element name="Macros" minOccurs="0">
  311. <xs:annotation>
  312. <xs:documentation>A set of lexical macros.</xs:documentation>
  313. </xs:annotation>
  314. <xs:complexType>
  315. <xs:choice>
  316. <xs:element name="Macro" minOccurs="0" maxOccurs="unbounded">
  317. <xs:annotation>
  318. <xs:documentation>A macro definition.</xs:documentation>
  319. </xs:annotation>
  320. <xs:complexType>
  321. <xs:attribute name="Key" type="xs:string" use="required" />
  322. <xs:attribute name="Value" type="xs:string" use="required" />
  323. </xs:complexType>
  324. </xs:element>
  325. </xs:choice>
  326. </xs:complexType>
  327. </xs:element>
  328. <xs:element name="States">
  329. <xs:annotation>
  330. <xs:documentation>A set of lexical states within the language.</xs:documentation>
  331. </xs:annotation>
  332. <xs:complexType>
  333. <xs:choice>
  334. <xs:element name="State" minOccurs="0" maxOccurs="unbounded">
  335. <xs:annotation>
  336. <xs:documentation>A lexical state definition.</xs:documentation>
  337. </xs:annotation>
  338. <xs:complexType>
  339. <xs:sequence>
  340. <xs:element name="Scopes" minOccurs="0">
  341. <xs:annotation>
  342. <xs:documentation>A set of lexical scopes that start and end the lexical state.</xs:documentation>
  343. </xs:annotation>
  344. <xs:complexType>
  345. <xs:choice maxOccurs="unbounded">
  346. <xs:element name="Scope">
  347. <xs:annotation>
  348. <xs:documentation>A lexical scope definition.</xs:documentation>
  349. </xs:annotation>
  350. <xs:complexType>
  351. <xs:choice maxOccurs="unbounded">
  352. <xs:element name="ExplicitPatternGroup" type="ScopeExplicitPatternGroup">
  353. <xs:annotation>
  354. <xs:documentation>An explicit pattern group the defines the lexical scope pattern.</xs:documentation>
  355. </xs:annotation>
  356. </xs:element>
  357. <xs:element name="RegexPatternGroup" type="ScopeRegexPatternGroup">
  358. <xs:annotation>
  359. <xs:documentation>An regular expression pattern group the defines the lexical scope pattern.</xs:documentation>
  360. </xs:annotation>
  361. </xs:element>
  362. <xs:element name="StateTransition">
  363. <xs:annotation>
  364. <xs:documentation>A state transition to another language that occurs when the scope is matched.</xs:documentation>
  365. </xs:annotation>
  366. <xs:complexType>
  367. <xs:choice>
  368. <xs:element name="ExplicitPatternGroup" type="ExplicitPatternGroup">
  369. <xs:annotation>
  370. <xs:documentation>An explicit pattern group that defines patterns that will exit the child language when matched.</xs:documentation>
  371. </xs:annotation>
  372. </xs:element>
  373. <xs:element name="RegexPatternGroup" type="RegexPatternGroup">
  374. <xs:annotation>
  375. <xs:documentation>A regular expression pattern group that defines patterns that will exit the child language when matched.</xs:documentation>
  376. </xs:annotation>
  377. </xs:element>
  378. </xs:choice>
  379. <xs:attribute name="Filename" type="xs:string" use="required" />
  380. <xs:attribute name="State" type="xs:string" use="optional" />
  381. <xs:attribute name="ChildLanguageBackColor" type="xs:string" use="optional" />
  382. </xs:complexType>
  383. </xs:element>
  384. </xs:choice>
  385. <xs:attribute name="BracketHighlight" type="Boolean" use="optional" />
  386. </xs:complexType>
  387. </xs:element>
  388. </xs:choice>
  389. </xs:complexType>
  390. </xs:element>
  391. <xs:element name="PatternGroups" minOccurs="0">
  392. <xs:annotation>
  393. <xs:documentation>A set of lexical pattern groups that define the patterns recognized in the lexical state.</xs:documentation>
  394. </xs:annotation>
  395. <xs:complexType>
  396. <xs:choice maxOccurs="unbounded">
  397. <xs:element name="ExplicitPatternGroup" type="ExplicitPatternGroup">
  398. <xs:annotation>
  399. <xs:documentation>An explicit pattern group that defines patterns recognized in the lexical state.</xs:documentation>
  400. </xs:annotation>
  401. </xs:element>
  402. <xs:element name="RegexPatternGroup" type="RegexPatternGroup">
  403. <xs:annotation>
  404. <xs:documentation>A regular expression pattern group that defines patterns recognized in the lexical state.</xs:documentation>
  405. </xs:annotation>
  406. </xs:element>
  407. </xs:choice>
  408. </xs:complexType>
  409. </xs:element>
  410. <xs:element name="ChildStates" minOccurs="0">
  411. <xs:annotation>
  412. <xs:documentation>A set of child lexical states that can be entered from this lexical state if their start scope is recognized.</xs:documentation>
  413. </xs:annotation>
  414. <xs:complexType>
  415. <xs:choice maxOccurs="unbounded">
  416. <xs:element name="ChildState">
  417. <xs:annotation>
  418. <xs:documentation>A child lexical state that can be entered from this lexical state if its start scope is recognized.</xs:documentation>
  419. </xs:annotation>
  420. <xs:complexType>
  421. <xs:attribute name="Key" type="xs:string" use="required" />
  422. </xs:complexType>
  423. </xs:element>
  424. </xs:choice>
  425. </xs:complexType>
  426. </xs:element>
  427. </xs:sequence>
  428. <xs:attribute name="Key" type="xs:string" use="required" />
  429. <xs:attribute name="ID" type="xs:string" use="optional" />
  430. <xs:attribute name="TokenKey" type="xs:string" use="optional" />
  431. <xs:attribute name="TokenID" type="xs:string" use="optional" />
  432. <xs:attribute name="Style" type="xs:string" use="optional" />
  433. <xs:attribute name="Filename" type="xs:string" use="optional" />
  434. <xs:attribute name="ChildLanguageBackColor" type="xs:string" use="optional" />
  435. </xs:complexType>
  436. </xs:element>
  437. </xs:choice>
  438. </xs:complexType>
  439. </xs:element>
  440. <xs:element name="ExampleText" minOccurs="0">
  441. <xs:annotation>
  442. <xs:documentation>Example language code that can be used for testing lexical parsing.</xs:documentation>
  443. </xs:annotation>
  444. </xs:element>
  445. </xs:sequence>
  446. <xs:attribute name="Key" type="xs:string" use="required" />
  447. <xs:attribute name="LanguageDefinitionVersion" type="xs:string" use="required" />
  448. <xs:attribute name="Secure" type="Boolean" use="required" />
  449. <xs:attribute name="WordContainsAdditionalCharacters" type="xs:string" use="optional" />
  450. <xs:attribute name="WordStandaloneCharacters" type="xs:string" use="optional" />
  451. <xs:attribute name="SyntaxLanguageTypeName" type="xs:string" use="optional" />
  452. <xs:attribute name="StateIDTypeName" type="xs:string" use="optional" />
  453. <xs:attribute name="TokenIDTypeName" type="xs:string" use="optional" />
  454. </xs:complexType>
  455. </xs:element>
  456. <!-- -->
  457. </xs:schema>