ui-layout-basic-controls.xsd 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
  3. targetNamespace="ui-layout-basic-controls"
  4. xmlns:tns="ui-layout-basic-controls"
  5. elementFormDefault="qualified"
  6. version="1.2">
  7. <!-- ENHANCEMENT: Control Instance Base Type with accessibility and data binding -->
  8. <xs:complexType name="BasicControlInstanceType" mixed="true">
  9. <xs:group ref="tns:BasicControlContentGroup" minOccurs="0" maxOccurs="unbounded"/>
  10. <!-- ENHANCEMENT: Data binding attributes -->
  11. <xs:attribute name="data-context" type="xs:string"/>
  12. <xs:attribute name="binding-path" type="xs:string"/>
  13. <xs:attribute name="command-binding" type="xs:string"/>
  14. <xs:attribute name="validation-rule" type="xs:string"/>
  15. <xs:attribute name="converter" type="xs:string"/>
  16. <!-- ENHANCEMENT: Accessibility attributes -->
  17. <xs:attribute name="aria-label" type="xs:string"/>
  18. <xs:attribute name="aria-description" type="xs:string"/>
  19. <xs:attribute name="aria-role" type="xs:string"/>
  20. <xs:attribute name="tab-index" type="xs:int" default="0"/>
  21. <xs:attribute name="access-key" type="xs:string"/>
  22. <xs:attribute name="high-contrast-support" type="xs:boolean" default="true"/>
  23. <xs:attribute name="screen-reader-text" type="xs:string"/>
  24. <xs:anyAttribute processContents="lax"/>
  25. </xs:complexType>
  26. <!-- Basic Control Content Group -->
  27. <xs:group name="BasicControlContentGroup">
  28. <xs:choice>
  29. <!-- Core Basic Controls -->
  30. <xs:element name="Label" type="tns:BasicControlInstanceType"/>
  31. <xs:element name="TextBox" type="tns:BasicControlInstanceType"/>
  32. <xs:element name="ComboBox" type="tns:BasicControlInstanceType"/>
  33. <xs:element name="Button" type="tns:BasicControlInstanceType"/>
  34. <xs:element name="Panel" type="tns:BasicControlInstanceType"/>
  35. <xs:element name="PopupPanel" type="tns:BasicControlInstanceType"/>
  36. <xs:element name="Menu" type="tns:BasicControlInstanceType"/>
  37. <xs:element name="ListView" type="tns:BasicControlInstanceType"/>
  38. <xs:element name="TreeView" type="tns:BasicControlInstanceType"/>
  39. <xs:element name="TabControl" type="tns:BasicControlInstanceType"/>
  40. <xs:element name="ButtonBar" type="tns:BasicControlInstanceType"/>
  41. <xs:element name="ListBox" type="tns:BasicControlInstanceType"/>
  42. <xs:element name="CheckBox" type="tns:BasicControlInstanceType"/>
  43. <xs:element name="RadioButton" type="tns:BasicControlInstanceType"/>
  44. <xs:element name="Image" type="tns:BasicControlInstanceType"/>
  45. <xs:element name="StatusBar" type="tns:BasicControlInstanceType"/>
  46. <xs:element name="ToolBar" type="tns:BasicControlInstanceType"/>
  47. <xs:element name="SplitPanel" type="tns:BasicControlInstanceType"/>
  48. <xs:element name="Separator" type="tns:BasicControlInstanceType"/>
  49. <!-- ENHANCEMENT: Additional controls -->
  50. <xs:element name="ProgressBar" type="tns:BasicControlInstanceType"/>
  51. <xs:element name="DatePicker" type="tns:BasicControlInstanceType"/>
  52. <xs:element name="NumericUpDown" type="tns:BasicControlInstanceType"/>
  53. <xs:element name="Slider" type="tns:BasicControlInstanceType"/>
  54. <!-- Structure Elements -->
  55. <xs:element name="FormField" type="tns:BasicControlInstanceType"/>
  56. <xs:element name="slot" type="tns:SlotType"/>
  57. <!-- Supporting Elements -->
  58. <xs:element name="menu-items" type="tns:MenuItemsType"/>
  59. <xs:element name="columns" type="tns:ColumnsType"/>
  60. <xs:element name="items" type="tns:ItemsType"/>
  61. <!-- ENHANCEMENT: Data binding and accessibility elements -->
  62. <xs:element name="data-binding" type="tns:DataBindingDetailsType"/>
  63. <xs:element name="accessibility" type="tns:AccessibilityDetailsType"/>
  64. </xs:choice>
  65. </xs:group>
  66. <!-- ENHANCEMENT: Enhanced Slot Definition -->
  67. <xs:complexType name="SlotType">
  68. <xs:complexContent>
  69. <xs:extension base="tns:BasicControlInstanceType">
  70. <xs:attribute name="name" type="xs:string" use="required"/>
  71. <xs:attribute name="allowed-controls" type="xs:string"/>
  72. <xs:attribute name="required" type="xs:boolean" default="false"/>
  73. <xs:attribute name="default" type="xs:boolean" default="false"/>
  74. <!-- ENHANCEMENT: Accessibility and validation -->
  75. <xs:attribute name="accessibility-landmark" type="xs:string"/>
  76. <xs:attribute name="data-validation" type="xs:string"/>
  77. </xs:extension>
  78. </xs:complexContent>
  79. </xs:complexType>
  80. <!-- ENHANCEMENT: Data Binding Details -->
  81. <xs:complexType name="DataBindingDetailsType">
  82. <xs:sequence>
  83. <xs:element name="binding" type="tns:BindingDetailType" maxOccurs="unbounded"/>
  84. </xs:sequence>
  85. </xs:complexType>
  86. <xs:complexType name="BindingDetailType">
  87. <xs:attribute name="property" type="xs:string" use="required"/>
  88. <xs:attribute name="source-path" type="xs:string" use="required"/>
  89. <xs:attribute name="mode" type="tns:BindingModeEnum" default="TwoWay"/>
  90. <xs:attribute name="converter" type="xs:string"/>
  91. <xs:attribute name="validation-rule" type="xs:string"/>
  92. <xs:attribute name="update-trigger" type="tns:UpdateTriggerEnum" default="PropertyChanged"/>
  93. </xs:complexType>
  94. <xs:simpleType name="BindingModeEnum">
  95. <xs:restriction base="xs:string">
  96. <xs:enumeration value="OneWay"/>
  97. <xs:enumeration value="TwoWay"/>
  98. <xs:enumeration value="OneTime"/>
  99. <xs:enumeration value="OneWayToSource"/>
  100. </xs:restriction>
  101. </xs:simpleType>
  102. <xs:simpleType name="UpdateTriggerEnum">
  103. <xs:restriction base="xs:string">
  104. <xs:enumeration value="PropertyChanged"/>
  105. <xs:enumeration value="LostFocus"/>
  106. <xs:enumeration value="Explicit"/>
  107. </xs:restriction>
  108. </xs:simpleType>
  109. <!-- ENHANCEMENT: Accessibility Details -->
  110. <xs:complexType name="AccessibilityDetailsType">
  111. <xs:sequence>
  112. <xs:element name="screen-reader" type="tns:ScreenReaderDetailsType" minOccurs="0"/>
  113. <xs:element name="keyboard-support" type="tns:KeyboardSupportType" minOccurs="0"/>
  114. <xs:element name="visual-support" type="tns:VisualSupportType" minOccurs="0"/>
  115. </xs:sequence>
  116. </xs:complexType>
  117. <xs:complexType name="ScreenReaderDetailsType">
  118. <xs:attribute name="label" type="xs:string"/>
  119. <xs:attribute name="description" type="xs:string"/>
  120. <xs:attribute name="role" type="xs:string"/>
  121. <xs:attribute name="live-region" type="xs:string"/>
  122. <xs:attribute name="owns" type="xs:string"/>
  123. <xs:attribute name="controls" type="xs:string"/>
  124. </xs:complexType>
  125. <xs:complexType name="KeyboardSupportType">
  126. <xs:attribute name="tab-stop" type="xs:boolean" default="true"/>
  127. <xs:attribute name="tab-index" type="xs:int" default="0"/>
  128. <xs:attribute name="access-key" type="xs:string"/>
  129. <xs:attribute name="shortcut-key" type="xs:string"/>
  130. <xs:attribute name="focus-on-click" type="xs:boolean" default="true"/>
  131. </xs:complexType>
  132. <xs:complexType name="VisualSupportType">
  133. <xs:attribute name="high-contrast" type="xs:boolean" default="true"/>
  134. <xs:attribute name="font-size-scale" type="xs:boolean" default="true"/>
  135. <xs:attribute name="color-blind-safe" type="xs:boolean" default="true"/>
  136. <xs:attribute name="animation-reduce" type="xs:boolean" default="false"/>
  137. </xs:complexType>
  138. <!-- ENHANCEMENT: Enhanced Supporting Types -->
  139. <xs:complexType name="MenuItemsType">
  140. <xs:sequence>
  141. <xs:element name="menu-item" maxOccurs="unbounded">
  142. <xs:complexType>
  143. <xs:sequence>
  144. <xs:element name="menu-items" type="tns:MenuItemsType" minOccurs="0"/>
  145. </xs:sequence>
  146. <xs:attribute name="text" type="xs:string" use="required"/>
  147. <xs:attribute name="action" type="xs:string"/>
  148. <xs:attribute name="separator" type="xs:boolean" default="false"/>
  149. <!-- ENHANCEMENT: Command binding and accessibility -->
  150. <xs:attribute name="shortcut-key" type="xs:string"/>
  151. <xs:attribute name="command-binding" type="xs:string"/>
  152. <xs:attribute name="aria-label" type="xs:string"/>
  153. </xs:complexType>
  154. </xs:element>
  155. </xs:sequence>
  156. </xs:complexType>
  157. <xs:complexType name="ColumnsType">
  158. <xs:sequence>
  159. <xs:element name="column" maxOccurs="unbounded">
  160. <xs:complexType>
  161. <xs:attribute name="name" type="xs:string" use="required"/>
  162. <xs:attribute name="text" type="xs:string" use="required"/>
  163. <xs:attribute name="width" type="xs:string"/>
  164. <xs:attribute name="sortable" type="xs:boolean" default="true"/>
  165. <!-- ENHANCEMENT: Data binding and accessibility -->
  166. <xs:attribute name="data-type" type="xs:string"/>
  167. <xs:attribute name="binding-path" type="xs:string"/>
  168. <xs:attribute name="converter" type="xs:string"/>
  169. <xs:attribute name="sort-member-path" type="xs:string"/>
  170. <xs:attribute name="aria-label" type="xs:string"/>
  171. </xs:complexType>
  172. </xs:element>
  173. </xs:sequence>
  174. </xs:complexType>
  175. <xs:complexType name="ItemsType">
  176. <xs:sequence>
  177. <xs:element name="item" maxOccurs="unbounded">
  178. <xs:complexType>
  179. <xs:attribute name="value" type="xs:string"/>
  180. <xs:attribute name="text" type="xs:string"/>
  181. <!-- ENHANCEMENT: Data binding and accessibility -->
  182. <xs:attribute name="data-context" type="xs:string"/>
  183. <xs:attribute name="command-parameter" type="xs:string"/>
  184. <xs:attribute name="aria-label" type="xs:string"/>
  185. </xs:complexType>
  186. </xs:element>
  187. </xs:sequence>
  188. <!-- ENHANCEMENT: Collection-level data binding -->
  189. <xs:attribute name="items-source" type="xs:string"/>
  190. <xs:attribute name="display-member-path" type="xs:string"/>
  191. <xs:attribute name="value-member-path" type="xs:string"/>
  192. </xs:complexType>
  193. </xs:schema>