| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338 |
- <?xml version="1.0" encoding="UTF-8"?>
- <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
- targetNamespace="ui-layout-definition"
- xmlns:tns="ui-layout-definition"
- xmlns:patterns="ui-layout-patterns"
- xmlns:views="ui-layout-views"
- xmlns:validation="ui-layout-validation"
- xmlns:basic="ui-layout-basic-controls"
- xmlns:winforms="ui-layout-winforms-controls"
- xmlns:avalonia="ui-layout-avalonia-controls"
- elementFormDefault="qualified"
- version="1.3">
- <!-- Import external schemas -->
- <xs:import namespace="ui-layout-patterns" schemaLocation="ui-layout-patterns.xsd"/>
- <xs:import namespace="ui-layout-views" schemaLocation="ui-layout-views.xsd"/>
- <xs:import namespace="ui-layout-validation" schemaLocation="ui-layout-validation.xsd"/>
- <xs:import namespace="ui-layout-basic-controls" schemaLocation="ui-layout-basic-controls.xsd"/>
- <xs:import namespace="ui-layout-winforms-controls" schemaLocation="ui-layout-winforms-controls.xsd"/>
- <xs:import namespace="ui-layout-avalonia-controls" schemaLocation="ui-layout-avalonia-controls.xsd"/>
- <!-- Root element -->
- <xs:element name="ui-layout-def" type="tns:UILayoutDefType"/>
- <!-- Root element for window include files -->
- <xs:element name="windows" type="tns:WindowIncludeFileType"/>
- <!-- Main document structure -->
- <xs:complexType name="UILayoutDefType">
- <xs:sequence>
- <xs:element name="validation-rules" type="tns:ValidationRulesType" minOccurs="0"/>
- <xs:element name="patterns" type="tns:PatternsType"/>
- <xs:element name="views" type="tns:ViewsType" minOccurs="0"/>
- <xs:element name="window-includes" type="tns:WindowIncludesType" minOccurs="0"/>
- <xs:element name="window" type="tns:WindowType" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:attribute name="version" type="xs:string" default="1.2"/>
- <!-- ENHANCEMENT: Version compatibility attributes -->
- <xs:attribute name="schema-version" type="xs:string" fixed="1.2"/>
- <xs:attribute name="min-version" type="xs:string" default="1.0"/>
- <xs:attribute name="max-version" type="xs:string" default="2.0"/>
- <xs:attribute name="target-platform" type="tns:PlatformEnum" default="basic"/>
- <!-- ENHANCEMENT: Accessibility compliance level -->
- <xs:attribute name="accessibility-compliance" type="tns:AccessibilityLevelEnum" default="basic"/>
- </xs:complexType>
- <!-- Platform Enumeration -->
- <xs:simpleType name="PlatformEnum">
- <xs:restriction base="xs:string">
- <xs:enumeration value="basic"/>
- <xs:enumeration value="winforms"/>
- <xs:enumeration value="avalonia"/>
- <xs:enumeration value="kde"/>
- <xs:enumeration value="web"/>
- <xs:enumeration value="mobile"/>
- <xs:enumeration value="mixed"/>
- </xs:restriction>
- </xs:simpleType>
- <!-- ENHANCEMENT: Accessibility Level Enumeration -->
- <xs:simpleType name="AccessibilityLevelEnum">
- <xs:restriction base="xs:string">
- <xs:enumeration value="none"/>
- <xs:enumeration value="basic"/>
- <xs:enumeration value="wcag-a"/>
- <xs:enumeration value="wcag-aa"/>
- <xs:enumeration value="wcag-aaa"/>
- <xs:enumeration value="section-508"/>
- </xs:restriction>
- </xs:simpleType>
- <!-- Window Include Files Structure -->
- <xs:complexType name="WindowIncludeFileType">
- <xs:sequence>
- <xs:element name="window" type="tns:WindowType" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:attribute name="target-platform" type="tns:PlatformEnum" default="basic"/>
- <!-- ENHANCEMENT: Version tracking for include files -->
- <xs:attribute name="schema-version" type="xs:string" default="1.2"/>
- </xs:complexType>
- <!-- Window Includes -->
- <xs:complexType name="WindowIncludesType">
- <xs:sequence>
- <xs:element name="window-include" type="tns:WindowIncludeType" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="WindowIncludeType">
- <xs:attribute name="src" type="xs:string" use="required"/>
- <xs:attribute name="important" type="xs:boolean" default="false"/>
- <xs:attribute name="platform" type="tns:PlatformEnum" default="basic"/>
- <!-- ENHANCEMENT: Version constraints for includes -->
- <xs:attribute name="min-version" type="xs:string"/>
- <xs:attribute name="max-version" type="xs:string"/>
- </xs:complexType>
- <!-- Validation Rules (simplified - just includes) -->
- <xs:complexType name="ValidationRulesType">
- <xs:sequence>
- <xs:element name="validation-include" type="tns:ValidationIncludeType" minOccurs="0" maxOccurs="unbounded"/>
- <xs:element name="rule" type="validation:ValidationRuleType" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="ValidationIncludeType">
- <xs:attribute name="src" type="xs:string" use="required"/>
- <xs:attribute name="important" type="xs:boolean" default="false"/>
- <!-- ENHANCEMENT: Version constraints -->
- <xs:attribute name="min-version" type="xs:string"/>
- <xs:attribute name="max-version" type="xs:string"/>
- </xs:complexType>
- <!-- Patterns (simplified - mainly includes) -->
- <xs:complexType name="PatternsType">
- <xs:sequence>
- <xs:element name="pattern-include" type="tns:PatternIncludeType" minOccurs="0" maxOccurs="unbounded"/>
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element name="control" type="patterns:ControlType"/>
- <xs:element name="structure" type="patterns:StructureType"/>
- <xs:element name="wireframe" type="patterns:WireframeType"/>
- </xs:choice>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="PatternIncludeType">
- <xs:attribute name="src" type="xs:string" use="required"/>
- <xs:attribute name="important" type="xs:boolean" default="false"/>
- <xs:attribute name="platform" type="tns:PlatformEnum" default="basic"/>
- <!-- ENHANCEMENT: Version constraints -->
- <xs:attribute name="min-version" type="xs:string"/>
- <xs:attribute name="max-version" type="xs:string"/>
- </xs:complexType>
- <!-- Views (simplified - mainly includes) -->
- <xs:complexType name="ViewsType">
- <xs:sequence>
- <xs:element name="view-include" type="tns:ViewIncludeType" minOccurs="0" maxOccurs="unbounded"/>
- <xs:element name="view" type="views:ViewType" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="ViewIncludeType">
- <xs:attribute name="src" type="xs:string" use="required"/>
- <xs:attribute name="important" type="xs:boolean" default="false"/>
- <!-- ENHANCEMENT: Version constraints -->
- <xs:attribute name="min-version" type="xs:string"/>
- <xs:attribute name="max-version" type="xs:string"/>
- </xs:complexType>
- <!-- ENHANCEMENT: Window Definition with data binding and accessibility -->
- <xs:complexType name="WindowType">
- <xs:sequence>
- <xs:element name="attributes" type="tns:WindowAttributesType" minOccurs="0"/>
- <xs:element name="view-properties" type="tns:ViewPropertiesType" minOccurs="0"/>
- <!-- ENHANCEMENT: Data binding support -->
- <xs:element name="data-binding" type="tns:DataBindingType" minOccurs="0"/>
- <!-- ENHANCEMENT: Accessibility configuration -->
- <xs:element name="accessibility" type="tns:AccessibilityType" minOccurs="0"/>
- <xs:choice>
- <xs:element name="slot-overrides" type="tns:SlotOverridesType"/>
- <xs:element name="wireframe-instance" type="tns:WireframeInstanceType"/>
- <xs:group ref="tns:PlatformControlContentGroup"/>
- </xs:choice>
- </xs:sequence>
- <xs:attribute name="name" type="xs:string" use="required"/>
- <xs:attribute name="title" type="xs:string" use="required"/>
- <xs:attribute name="wireframe" type="xs:string"/>
- <xs:attribute name="view" type="xs:string"/>
- <xs:attribute name="target-platform" type="tns:PlatformEnum" default="basic"/>
- <!-- ENHANCEMENT: Schema version tracking -->
- <xs:attribute name="schema-version" type="xs:string" default="1.2"/>
- </xs:complexType>
- <!-- ENHANCEMENT: Data Binding Support -->
- <xs:complexType name="DataBindingType">
- <xs:sequence>
- <xs:element name="data-context" type="tns:DataContextBindingType" minOccurs="0"/>
- <xs:element name="view-model" type="tns:ViewModelBindingType" minOccurs="0"/>
- <xs:element name="binding-properties" type="tns:BindingPropertiesType" minOccurs="0"/>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="DataContextBindingType">
- <xs:attribute name="source" type="xs:string" use="required"/>
- <xs:attribute name="type" type="xs:string"/>
- <xs:attribute name="mode" type="tns:BindingModeEnum" default="TwoWay"/>
- </xs:complexType>
- <xs:complexType name="ViewModelBindingType">
- <xs:attribute name="class" type="xs:string" use="required"/>
- <xs:attribute name="assembly" type="xs:string"/>
- <xs:attribute name="namespace" type="xs:string"/>
- </xs:complexType>
- <xs:complexType name="BindingPropertiesType">
- <xs:sequence>
- <xs:element name="property" type="tns:BindingPropertyType" maxOccurs="unbounded"/>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="BindingPropertyType">
- <xs:attribute name="control" type="xs:string" use="required"/>
- <xs:attribute name="property" type="xs:string" use="required"/>
- <xs:attribute name="binding-path" type="xs:string" use="required"/>
- <xs:attribute name="mode" type="tns:BindingModeEnum" default="TwoWay"/>
- <xs:attribute name="converter" type="xs:string"/>
- <xs:attribute name="validation-rule" type="xs:string"/>
- </xs:complexType>
- <xs:simpleType name="BindingModeEnum">
- <xs:restriction base="xs:string">
- <xs:enumeration value="OneWay"/>
- <xs:enumeration value="TwoWay"/>
- <xs:enumeration value="OneTime"/>
- <xs:enumeration value="OneWayToSource"/>
- </xs:restriction>
- </xs:simpleType>
- <!-- ENHANCEMENT: Accessibility Support -->
- <xs:complexType name="AccessibilityType">
- <xs:sequence>
- <xs:element name="screen-reader" type="tns:ScreenReaderType" minOccurs="0"/>
- <xs:element name="keyboard-navigation" type="tns:KeyboardNavigationType" minOccurs="0"/>
- <xs:element name="color-contrast" type="tns:ColorContrastType" minOccurs="0"/>
- </xs:sequence>
- <xs:attribute name="compliance-level" type="tns:AccessibilityLevelEnum" default="basic"/>
- </xs:complexType>
- <xs:complexType name="ScreenReaderType">
- <xs:attribute name="window-title" type="xs:string"/>
- <xs:attribute name="description" type="xs:string"/>
- <xs:attribute name="landmark-role" type="xs:string"/>
- </xs:complexType>
- <xs:complexType name="KeyboardNavigationType">
- <xs:attribute name="tab-order-start" type="xs:int" default="0"/>
- <xs:attribute name="focus-trap" type="xs:boolean" default="false"/>
- <xs:attribute name="escape-closes" type="xs:boolean" default="true"/>
- </xs:complexType>
- <xs:complexType name="ColorContrastType">
- <xs:attribute name="high-contrast-support" type="xs:boolean" default="true"/>
- <xs:attribute name="minimum-ratio" type="xs:decimal" default="4.5"/>
- </xs:complexType>
- <!-- Window Attributes -->
- <xs:complexType name="WindowAttributesType">
- <xs:sequence>
- <xs:element name="attribute" maxOccurs="unbounded">
- <xs:complexType>
- <xs:attribute name="name" type="xs:string" use="required"/>
- <xs:attribute name="value" type="xs:string" use="required"/>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- <!-- View Properties -->
- <xs:complexType name="ViewPropertiesType">
- <xs:sequence>
- <xs:element name="role" type="views:WindowRoleEnum"/>
- <xs:element name="default" type="xs:boolean" minOccurs="0"/>
- <xs:element name="modal" type="xs:boolean" minOccurs="0"/>
- <xs:element name="data-context-binding" type="xs:string" minOccurs="0"/>
- <xs:element name="parent-window" type="xs:string" minOccurs="0"/>
- </xs:sequence>
- </xs:complexType>
- <!-- ENHANCED: Slot Overrides with conditional visibility -->
- <xs:complexType name="SlotOverridesType">
- <xs:sequence>
- <xs:element name="slot" type="tns:SlotOverrideType" maxOccurs="unbounded"/>
- </xs:sequence>
- </xs:complexType>
- <!-- ENHANCED: Slot Override Type with conditional visibility attributes -->
- <xs:complexType name="SlotOverrideType">
- <xs:complexContent>
- <xs:extension base="tns:PlatformControlContentType">
- <xs:attribute name="name" type="xs:string" use="required"/>
-
- <!-- NEW: Conditional visibility attributes for slot overrides -->
- <xs:attribute name="visibility-binding" type="xs:string"/>
- <xs:attribute name="visibility-value" type="xs:string"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- <!-- Wireframe Instance -->
- <xs:complexType name="WireframeInstanceType">
- <xs:sequence>
- <xs:element name="slot" type="tns:SlotOverrideType" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:attribute name="name" type="xs:string" use="required"/>
- <xs:attribute name="wireframe" type="xs:string" use="required"/>
- </xs:complexType>
- <!-- Platform-Aware Control Content -->
- <xs:complexType name="PlatformControlContentType" mixed="true">
- <xs:group ref="tns:PlatformControlContentGroup" minOccurs="0" maxOccurs="unbounded"/>
- <xs:anyAttribute processContents="lax"/>
- </xs:complexType>
- <!-- Platform Control Content Group - Supports all platforms -->
- <xs:group name="PlatformControlContentGroup">
- <xs:choice>
- <!-- Basic Controls (always available) -->
- <xs:group ref="basic:BasicControlContentGroup"/>
-
- <!-- WinForms Controls (conditional) -->
- <xs:group ref="winforms:WinFormsControlContentGroup"/>
-
- <!-- Avalonia Controls (conditional) -->
- <xs:group ref="avalonia:AvaloniaControlContentGroup"/>
-
- <!-- Special Elements -->
- <xs:element name="wireframe-instance" type="tns:WireframeInstanceType"/>
-
- <!-- Allow any other elements for extensibility -->
- <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </xs:choice>
- </xs:group>
- <!-- Control Instance (unified across platforms) -->
- <xs:complexType name="ControlInstanceType">
- <xs:complexContent>
- <xs:extension base="tns:PlatformControlContentType">
- <xs:attribute name="name" type="xs:string" use="required"/>
- <xs:attribute name="slot" type="xs:string"/>
- <xs:attribute name="platform-hint" type="tns:PlatformEnum"/>
- <!-- ENHANCEMENT: Schema version tracking -->
- <xs:attribute name="schema-version" type="xs:string" default="1.2"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- </xs:schema>
|