Переглянути джерело

initial commit in 1.1 version

Dalibor Votruba 11 місяців тому
батько
коміт
2a0b67837b

+ 331 - 0
UILayoutDefinitionFormat/Samples/business-views.xml

@@ -0,0 +1,331 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Example: business-views.xml -->
+<views xmlns="ui-layout-definition">
+  
+  <!-- Base Entity View Pattern -->
+  <view name="BaseEntityView" type="base" category="framework">
+    <description>Base view pattern for CRUD operations on business entities</description>
+    
+    <metadata>
+      <permissions>entity.read</permissions>
+    </metadata>
+    
+    <data-context>
+      <property name="currentEntity" type="object" scope="view" />
+      <property name="entityList" type="IEnumerable" scope="view" />
+      <property name="isLoading" type="bool" scope="view" />
+      <property name="hasChanges" type="bool" scope="view" />
+    </data-context>
+    
+    <windows>
+      <window-ref name="BaseListWindow" role="main" default="true" />
+      <window-ref name="BaseEditDialog" role="editor" modal="true" />
+      <window-ref name="BaseViewDialog" role="viewer" modal="true" />
+    </windows>
+    
+    <navigation>
+      <action name="show-list" target="BaseListWindow" />
+      <action name="edit-entity" target="BaseEditDialog" context="currentEntity" />
+      <action name="view-entity" target="BaseViewDialog" context="currentEntity" />
+      <action name="create-new" target="BaseEditDialog" />
+    </navigation>
+    
+    <behaviors>
+      <behavior name="refresh-data" scope="view" />
+      <behavior name="save-changes" scope="view" />
+      <behavior name="delete-entity" scope="view" />
+      <behavior name="validate-entity" scope="view" />
+      <behavior name="export-data" scope="view" />
+    </behaviors>
+  </view>
+  
+  <!-- Product Management View -->
+  <view name="ProductView" type="business-entity" category="core" inherits="BaseEntityView">
+    <description>Product management including inventory, pricing, and categorization</description>
+    
+    <metadata>
+      <model-class>Product</model-class>
+      <view-model-class>ProductViewModel</view-model-class>
+      <controller-class>ProductController</controller-class>
+      <permissions>product.read,product.write,product.delete</permissions>
+    </metadata>
+    
+    <dependencies>
+      <view-ref name="CategoryView" relationship="lookup" required="false">
+        <interaction type="select-category" returns="category-id" />
+      </view-ref>
+      <view-ref name="SupplierView" relationship="reference" required="false">
+        <interaction type="view-supplier" context="supplier-id" />
+      </view-ref>
+      <shared-component name="ImageUploadComponent" required="true" />
+      <shared-component name="PriceHistoryComponent" required="false" />
+    </dependencies>
+    
+    <data-context>
+      <property name="currentProduct" type="Product" scope="view" />
+      <property name="productList" type="ProductList" scope="view" />
+      <property name="selectedCategory" type="Category" scope="shared" />
+      <property name="priceHistory" type="PriceHistoryList" scope="view" />
+    </data-context>
+    
+    <windows>
+      <window-ref name="ProductListWindow" role="main" default="true" />
+      <window-ref name="ProductEditDialog" role="editor" modal="true" />
+      <window-ref name="ProductDetailsWindow" role="viewer" />
+      <window-ref name="ProductCatalogWindow" role="catalog" />
+      <window-ref name="ProductImportDialog" role="utility" modal="true" />
+    </windows>
+    
+    <navigation>
+      <!-- Override base actions with product-specific implementations -->
+      <action name="edit-entity" target="ProductEditDialog" context="currentProduct" />
+      <action name="view-entity" target="ProductDetailsWindow" context="currentProduct" />
+      <!-- Add product-specific actions -->
+      <action name="view-catalog" target="ProductCatalogWindow" />
+      <action name="import-products" target="ProductImportDialog" />
+      <action name="manage-inventory" target="ProductEditDialog" context="currentProduct" />
+    </navigation>
+    
+    <behaviors>
+      <!-- Inherit base behaviors and add product-specific ones -->
+      <behavior name="update-inventory" scope="view" />
+      <behavior name="calculate-pricing" scope="view" />
+      <behavior name="generate-barcode" scope="view" />
+      <behavior name="check-stock-levels" scope="view" />
+    </behaviors>
+    
+    <communication>
+      <publishes>
+        <event name="product-saved" data="product-id" />
+        <event name="product-deleted" data="product-id" />
+        <event name="inventory-updated" data="product-id,new-quantity" />
+      </publishes>
+      <subscribes>
+        <event name="category-changed" source="CategoryView" handler="refresh-product-list" />
+        <event name="supplier-updated" source="SupplierView" handler="update-supplier-info" />
+      </subscribes>
+    </communication>
+  </view>
+  
+  <!-- Category Management View -->
+  <view name="CategoryView" type="business-entity" category="core" inherits="BaseEntityView">
+    <description>Product category management with hierarchical structure</description>
+    
+    <metadata>
+      <model-class>Category</model-class>
+      <view-model-class>CategoryViewModel</view-model-class>
+      <controller-class>CategoryController</controller-class>
+      <permissions>category.read,category.write</permissions>
+    </metadata>
+    
+    <data-context>
+      <property name="currentCategory" type="Category" scope="view" />
+      <property name="categoryTree" type="CategoryTree" scope="view" />
+      <property name="selectedParentCategory" type="Category" scope="view" />
+    </data-context>
+    
+    <windows>
+      <window-ref name="CategoryTreeWindow" role="main" default="true" />
+      <window-ref name="CategoryEditDialog" role="editor" modal="true" />
+      <window-ref name="CategoryListDialog" role="utility" modal="true" />
+    </windows>
+    
+    <navigation>
+      <action name="show-tree" target="CategoryTreeWindow" />
+      <action name="edit-category" target="CategoryEditDialog" context="currentCategory" />
+      <action name="select-category" target="CategoryListDialog" />
+      <action name="create-subcategory" target="CategoryEditDialog" context="selectedParentCategory" />
+    </navigation>
+    
+    <behaviors>
+      <behavior name="move-category" scope="view" />
+      <behavior name="merge-categories" scope="view" />
+      <behavior name="update-hierarchy" scope="view" />
+    </behaviors>
+    
+    <communication>
+      <publishes>
+        <event name="category-selected" data="category-id" />
+        <event name="category-moved" data="category-id,new-parent-id" />
+      </publishes>
+    </communication>
+  </view>
+  
+  <!-- Customer Management View -->
+  <view name="CustomerView" type="business-entity" category="core" inherits="BaseEntityView">
+    <description>Customer relationship management including contacts and order history</description>
+    
+    <metadata>
+      <model-class>Customer</model-class>
+      <view-model-class>CustomerViewModel</view-model-class>
+      <controller-class>CustomerController</controller-class>
+      <permissions>customer.read,customer.write,customer.delete</permissions>
+    </metadata>
+    
+    <dependencies>
+      <view-ref name="OrderView" relationship="reference" required="false">
+        <interaction type="view-orders" context="customer-id" />
+      </view-ref>
+      <shared-component name="AddressComponent" required="true" />
+      <shared-component name="ContactHistoryComponent" required="false" />
+    </dependencies>
+    
+    <data-context>
+      <property name="currentCustomer" type="Customer" scope="view" />
+      <property name="customerList" type="CustomerList" scope="view" />
+      <property name="customerOrders" type="OrderList" scope="view" />
+      <property name="contactHistory" type="ContactHistoryList" scope="view" />
+    </data-context>
+    
+    <windows>
+      <window-ref name="CustomerListWindow" role="main" default="true" />
+      <window-ref name="CustomerEditDialog" role="editor" modal="true" />
+      <window-ref name="CustomerDetailsWindow" role="viewer" />
+      <window-ref name="CustomerSearchDialog" role="utility" modal="true" />
+    </windows>
+    
+    <navigation>
+      <action name="search-customers" target="CustomerSearchDialog" />
+      <action name="view-orders" target="OrderView" context="currentCustomer" />
+      <action name="send-marketing" target="CustomerDetailsWindow" context="currentCustomer" />
+    </navigation>
+    
+    <behaviors>
+      <behavior name="merge-customers" scope="view" />
+      <behavior name="calculate-customer-value" scope="view" />
+      <behavior name="generate-reports" scope="view" />
+    </behaviors>
+    
+    <communication>
+      <publishes>
+        <event name="customer-selected" data="customer-id" />
+        <event name="customer-updated" data="customer-id" />
+      </publishes>
+      <subscribes>
+        <event name="order-created" source="OrderView" handler="refresh-customer-orders" />
+      </subscribes>
+    </communication>
+  </view>
+  
+  <!-- Order Management View -->
+  <view name="OrderView" type="business-entity" category="core" inherits="BaseEntityView">
+    <description>Order processing including items, shipping, and payment tracking</description>
+    
+    <metadata>
+      <model-class>Order</model-class>
+      <view-model-class>OrderViewModel</view-model-class>
+      <controller-class>OrderController</controller-class>
+      <permissions>order.read,order.write,order.process</permissions>
+    </metadata>
+    
+    <dependencies>
+      <view-ref name="OrderItemView" relationship="detail" required="true">
+        <interaction type="manage-items" context="current-order" />
+      </view-ref>
+      <view-ref name="CustomerView" relationship="reference" required="false">
+        <interaction type="view-customer" context="customer-id" />
+      </view-ref>
+      <view-ref name="ProductView" relationship="lookup" required="false">
+        <interaction type="select-product" returns="product-id" />
+      </view-ref>
+      <shared-component name="PaymentProcessingComponent" required="true" />
+      <shared-component name="ShippingComponent" required="true" />
+    </dependencies>
+    
+    <data-context>
+      <property name="currentOrder" type="Order" scope="view" />
+      <property name="orderList" type="OrderList" scope="view" />
+      <property name="orderItems" type="OrderItemList" scope="shared" />
+      <property name="paymentStatus" type="PaymentStatus" scope="view" />
+      <property name="shippingInfo" type="ShippingInfo" scope="view" />
+    </data-context>
+    
+    <windows>
+      <window-ref name="OrderListWindow" role="main" default="true" />
+      <window-ref name="OrderEditDialog" role="editor" modal="true" />
+      <window-ref name="OrderDetailsWindow" role="viewer" />
+      <window-ref name="OrderStatusDialog" role="utility" modal="true" />
+    </windows>
+    
+    <navigation>
+      <action name="process-payment" target="OrderEditDialog" context="currentOrder" />
+      <action name="update-shipping" target="OrderEditDialog" context="currentOrder" />
+      <action name="view-status" target="OrderStatusDialog" context="currentOrder" />
+      <action name="print-invoice" target="OrderDetailsWindow" context="currentOrder" />
+    </navigation>
+    
+    <behaviors>
+      <behavior name="calculate-totals" scope="view" />
+      <behavior name="process-order" scope="view" />
+      <behavior name="generate-invoice" scope="view" />
+      <behavior name="track-shipment" scope="view" />
+    </behaviors>
+    
+    <communication>
+      <publishes>
+        <event name="order-created" data="order-id" />
+        <event name="order-processed" data="order-id" />
+        <event name="order-shipped" data="order-id,tracking-number" />
+      </publishes>
+      <subscribes>
+        <event name="customer-changed" source="CustomerView" handler="update-customer-info" />
+        <event name="inventory-updated" source="ProductView" handler="check-availability" />
+      </subscribes>
+    </communication>
+  </view>
+  
+  <!-- Order Item Management View (Detail view) -->
+  <view name="OrderItemView" type="business-entity" category="core">
+    <description>Individual order item management within an order context</description>
+    
+    <metadata>
+      <model-class>OrderItem</model-class>
+      <view-model-class>OrderItemViewModel</view-model-class>
+      <controller-class>OrderItemController</controller-class>
+      <permissions>order.write</permissions>
+    </metadata>
+    
+    <dependencies>
+      <view-ref name="ProductView" relationship="lookup" required="true">
+        <interaction type="select-product" returns="product-id,product-details" />
+      </view-ref>
+    </dependencies>
+    
+    <data-context>
+      <property name="currentOrderItem" type="OrderItem" scope="view" />
+      <property name="orderItemList" type="OrderItemList" scope="shared" />
+      <property name="parentOrder" type="Order" scope="shared" />
+      <property name="availableProducts" type="ProductList" scope="view" />
+    </data-context>
+    
+    <windows>
+      <window-ref name="OrderItemsGrid" role="main" default="true" />
+      <window-ref name="OrderItemEditDialog" role="editor" modal="true" />
+    </windows>
+    
+    <navigation>
+      <action name="add-item" target="OrderItemEditDialog" />
+      <action name="edit-item" target="OrderItemEditDialog" context="currentOrderItem" />
+      <action name="select-product" target="ProductView" />
+    </navigation>
+    
+    <behaviors>
+      <behavior name="calculate-line-total" scope="view" />
+      <behavior name="validate-quantity" scope="view" />
+      <behavior name="check-availability" scope="view" />
+    </behaviors>
+    
+    <communication>
+      <publishes>
+        <event name="item-added" data="order-item-id" />
+        <event name="item-updated" data="order-item-id" />
+        <event name="item-removed" data="order-item-id" />
+      </publishes>
+      <subscribes>
+        <event name="product-selected" source="ProductView" handler="add-product-to-order" />
+        <event name="order-changed" source="OrderView" handler="load-order-items" />
+      </subscribes>
+    </communication>
+  </view>
+  
+</views>

+ 56 - 0
UILayoutDefinitionFormat/Samples/kde-controls.xml

@@ -0,0 +1,56 @@
+<!-- Example: KDE-controls.xml -->
+<?xml version="1.0" encoding="UTF-8"?>
+<patterns xmlns="ui-layout-patterns">
+  
+  <!-- KDE/Qt-specific controls -->
+  <control name="KComboBox" type="input" category="kde-specific" inherits="ComboBox">
+    <constraints>
+      <allowed-parents>Panel,FormField,KMainWindow</allowed-parents>
+      <allowed-children>items</allowed-children>
+      <container>false</container>
+    </constraints>
+    <attributes>
+      <attribute name="completion-mode" type="enum" values="none,auto,manual,popup,shell" default="popup" />
+      <attribute name="case-sensitive-completion" type="bool" default="false" />
+      <attribute name="url-completion" type="bool" default="false" />
+    </attributes>
+  </control>
+  
+  <control name="KMainWindow" type="container" category="kde-specific">
+    <constraints>
+      <allowed-parents>window</allowed-parents>
+      <allowed-children>any-control</allowed-children>
+      <container>true</container>
+    </constraints>
+    <attributes>
+      <attribute name="show-menubar" type="bool" default="true" />
+      <attribute name="show-toolbar" type="bool" default="true" />
+      <attribute name="show-statusbar" type="bool" default="true" />
+      <attribute name="auto-save-settings" type="bool" default="true" />
+    </attributes>
+    <structure>
+      <central-widget required="true" />
+      <toolbars max-count="10" />
+      <dock-widgets max-count="20" />
+    </structure>
+  </control>
+  
+  <control name="KFileDialog" type="dialog" category="kde-specific">
+    <constraints>
+      <allowed-parents>window</allowed-parents>
+      <allowed-children>none</allowed-children>
+      <container>false</container>
+    </constraints>
+    <attributes>
+      <attribute name="start-dir" type="string" default="~/" />
+      <attribute name="filter" type="string" default="*" />
+      <attribute name="mode" type="enum" values="file,files,directory,save" default="file" />
+      <attribute name="enable-preview" type="bool" default="true" />
+    </attributes>
+    <behavior>
+      <event name="file-selected" />
+      <event name="files-selected" />
+    </behavior>
+  </control>
+
+</patterns>

+ 117 - 0
UILayoutDefinitionFormat/Samples/sample-minimal.xml

@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Minimal UI Layout Definition Format Sample -->
+<ui-layout-def xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+               xsi:schemaLocation="ui-layout-definition ui-layout-def.xsd"
+               version="1.1">
+  
+  <!-- Basic pattern definitions (required) -->
+  <patterns>
+    
+    <!-- Basic container control -->
+    <control name="Panel" type="container" category="basic">
+      <constraints>
+        <allowed-parents>Panel,window</allowed-parents>
+        <allowed-children>any-control</allowed-children>
+        <container>true</container>
+      </constraints>
+      <attributes>
+        <attribute name="width" type="int" default="200" />
+        <attribute name="height" type="int" default="100" />
+        <attribute name="orientation" type="enum" values="horizontal,vertical" default="vertical" />
+      </attributes>
+    </control>
+    
+    <!-- Basic text display -->
+    <control name="Label" type="display" category="basic">
+      <constraints>
+        <allowed-parents>Panel</allowed-parents>
+        <allowed-children>none</allowed-children>
+        <container>false</container>
+      </constraints>
+      <attributes>
+        <attribute name="text" type="string" default="" required="true" />
+        <attribute name="font-size" type="int" default="12" />
+      </attributes>
+    </control>
+    
+    <!-- Basic text input -->
+    <control name="TextBox" type="input" category="basic">
+      <constraints>
+        <allowed-parents>Panel</allowed-parents>
+        <allowed-children>none</allowed-children>
+        <container>false</container>
+      </constraints>
+      <attributes>
+        <attribute name="value" type="string" default="" />
+        <attribute name="placeholder" type="string" default="" />
+      </attributes>
+    </control>
+    
+    <!-- Basic button -->
+    <control name="Button" type="action" category="basic">
+      <constraints>
+        <allowed-parents>Panel</allowed-parents>
+        <allowed-children>none</allowed-children>
+        <container>false</container>
+      </constraints>
+      <attributes>
+        <attribute name="text" type="string" default="Button" required="true" />
+        <attribute name="enabled" type="bool" default="true" />
+      </attributes>
+      <behavior>
+        <event name="click" required="true" />
+      </behavior>
+    </control>
+    
+  </patterns>
+  
+  <!-- Simple view definition -->
+  <views>
+    <view name="SimpleView" type="utility" category="core">
+      <description>A simple view for demonstration</description>
+      
+      <data-context>
+        <property name="userName" type="string" scope="view" />
+        <property name="isLoggedIn" type="bool" scope="view" />
+      </data-context>
+      
+      <windows>
+        <window-ref name="MainWindow" role="main" default="true" />
+      </windows>
+      
+      <navigation>
+        <action name="show-main" target="MainWindow" />
+      </navigation>
+    </view>
+  </views>
+  
+  <!-- Single window definition -->
+  <window name="MainWindow" title="Simple Application" view="SimpleView">
+    <attributes>
+      <attribute name="width" value="400" />
+      <attribute name="height" value="300" />
+    </attributes>
+    
+    <view-properties>
+      <role>main</role>
+      <default>true</default>
+      <data-context-binding>userName</data-context-binding>
+    </view-properties>
+    
+    <!-- Simple window content -->
+    <Panel name="mainPanel" width="400" height="300">
+      <Label name="titleLabel" text="Welcome to Simple App" font-size="16" />
+      
+      <Panel name="inputPanel" orientation="horizontal">
+        <Label name="nameLabel" text="Your Name:" />
+        <TextBox name="nameInput" placeholder="Enter your name..." />
+      </Panel>
+      
+      <Panel name="buttonPanel" orientation="horizontal">
+        <Button name="submitButton" text="Submit" />
+        <Button name="clearButton" text="Clear" />
+      </Panel>
+    </Panel>
+  </window>
+  
+</ui-layout-def>

+ 1071 - 0
UILayoutDefinitionFormat/Samples/sample.xml

@@ -0,0 +1,1071 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- UI Layout Definition Format with Control Constraints and Views (v1.1) -->
+<ui-layout-def xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+               xsi:schemaLocation="ui-layout-definition ui-layout-def.xsd"
+               version="1.1">
+  
+  <!-- Validation rules for control usage including includes -->
+  <validation-rules>
+    
+    <!-- External validation rule includes - loaded before local rules -->
+    <validation-include src="base-validation-rules.xml" important="true" />
+    <validation-include src="windows-validation-rules.xml" important="false" />
+    <validation-include src="accessibility-rules.xml" important="false" />
+    <validation-include src="performance-rules.xml" important="false" />
+    <validation-include src="view-validation.xml" important="true" />
+    
+    <!-- Include processing rules for validation:
+         - important="true": Must be found and loaded, build fails if missing
+         - important="false": Optional, warnings only if missing
+         - Includes are processed in order before local rules
+         - Local rules can override included rules
+         - Rule conflicts resolved by last-loaded-wins principle
+         - Rules with same name are merged (constraints combined)
+    -->
+    
+    <!-- Local validation rules -->
+    <rule name="control-definition-required">
+      <description>All controls used in windows must be defined in patterns node or included files</description>
+      <constraint>Every control element must reference a defined control or structure pattern from local or included definitions</constraint>
+    </rule>
+    
+    <rule name="pattern-include-validation">
+      <description>Pattern includes must be valid and accessible</description>
+      <constraint>Files marked important="true" must exist and be loadable</constraint>
+    </rule>
+    
+    <rule name="validation-include-validation">
+      <description>Validation includes must be valid and accessible</description>
+      <constraint>Validation files marked important="true" must exist and be loadable</constraint>
+    </rule>
+    
+    <rule name="view-window-consistency">
+      <description>View-window relationships must be valid</description>
+      <constraint>Windows referenced in views must exist and be properly associated</constraint>
+    </rule>
+    
+    <rule name="attribute-validation">
+      <description>Control attributes must match pattern definitions</description>
+      <constraint>Only attributes defined in control patterns (local or included) are allowed</constraint>
+    </rule>
+    
+    <rule name="container-children-validation">
+      <description>Container controls must only contain allowed child types</description>
+      <constraint>Child controls must be compatible with parent container per included definitions</constraint>
+    </rule>
+    
+    <rule name="required-attributes">
+      <description>Required attributes must be specified</description>
+      <constraint>Controls with required="true" attributes must have values</constraint>
+    </rule>
+    
+    <rule name="include-precedence">
+      <description>Pattern and validation override resolution order</description>
+      <constraint>Local definitions override included definitions, later includes override earlier ones</constraint>
+    </rule>
+  </validation-rules>
+  
+  <!-- Pattern definitions - must be first and only one patterns node -->
+  <patterns>
+    
+    <!-- External pattern includes - loaded before local definitions -->
+    <pattern-include src="windows-controls.xml" important="true" />
+    <pattern-include src="KDE-controls.xml" important="false" />
+    <pattern-include src="web-controls.xml" important="false" />
+    <pattern-include src="mobile-controls.xml" important="false" />
+    
+    <!-- Include processing rules:
+         - important="true": Must be found and loaded, build fails if missing
+         - important="false": Optional, warnings only if missing
+         - Includes are processed in order before local definitions
+         - Local definitions can override included patterns
+         - Naming conflicts resolved by last-loaded-wins principle
+    -->
+    
+    <!-- Base wireframe layouts -->
+    <wireframe name="StandardAppLayout" type="base-layout">
+      <description>Standard application layout with header, sidebar, content, and footer</description>
+      <template>
+        <Panel name="rootContainer">
+          <Panel name="headerPanel" height="60">
+            <slot name="header-content" default="true">
+              <Label name="appTitle" text="Application Title" />
+              <slot name="header-actions" />
+            </slot>
+          </Panel>
+          
+          <Panel name="mainContainer" orientation="horizontal">
+            <Panel name="sidebarPanel" width="250" visible="true">
+              <slot name="sidebar-content" default="true">
+                <Menu name="navigationMenu" orientation="vertical">
+                  <slot name="navigation-items" />
+                </Menu>
+              </slot>
+            </Panel>
+            
+            <Panel name="contentPanel" fill="true">
+              <slot name="main-content" required="true" />
+            </Panel>
+          </Panel>
+          
+          <Panel name="footerPanel" height="30">
+            <slot name="footer-content" default="true">
+              <Label name="statusLabel" text="Ready" />
+            </slot>
+          </Panel>
+        </Panel>
+      </template>
+    </wireframe>
+    
+    <wireframe name="DialogLayout" type="base-layout">
+      <description>Standard modal dialog layout</description>
+      <template>
+        <Panel name="dialogContainer">
+          <Panel name="titleBar" height="40">
+            <slot name="dialog-title" default="true">
+              <Label name="titleLabel" text="Dialog" />
+            </slot>
+            <Button name="closeButton" text="×" style="borderless" />
+          </Panel>
+          
+          <Panel name="dialogContent" padding="20">
+            <slot name="dialog-body" required="true" />
+          </Panel>
+          
+          <Panel name="buttonBar" height="50" alignment="right">
+            <slot name="dialog-buttons" default="true">
+              <Button name="okButton" text="OK" style="primary" />
+              <Button name="cancelButton" text="Cancel" />
+            </slot>
+          </Panel>
+        </Panel>
+      </template>
+    </wireframe>
+    
+    <wireframe name="FormLayout" type="base-layout">
+      <description>Standard form layout with sections</description>
+      <template>
+        <Panel name="formContainer">
+          <slot name="form-header" />
+          
+          <Panel name="formSections">
+            <slot name="form-content" required="true" />
+          </Panel>
+          
+          <Panel name="formActions" alignment="right">
+            <slot name="form-buttons" default="true">
+              <Button name="saveButton" text="Save" style="primary" />
+              <Button name="cancelButton" text="Cancel" />
+            </slot>
+          </Panel>
+        </Panel>
+      </template>
+    </wireframe>
+    
+    <!-- Base control definitions with constraints -->
+    <control name="Label" type="display" category="basic">
+      <constraints>
+        <allowed-parents>Panel,FormField,Menu</allowed-parents>
+        <allowed-children>none</allowed-children>
+        <container>false</container>
+      </constraints>
+      <attributes>
+        <attribute name="text" type="string" default="" required="false" />
+        <attribute name="font-size" type="int" default="12" min="8" max="72" />
+        <attribute name="color" type="color" default="#000000" />
+        <attribute name="alignment" type="enum" values="left,center,right" default="left" />
+      </attributes>
+      <behavior>
+        <event name="click" />
+      </behavior>
+    </control>
+    
+    <control name="TextBox" type="input" category="input">
+      <constraints>
+        <allowed-parents>Panel,FormField</allowed-parents>
+        <allowed-children>none</allowed-children>
+        <container>false</container>
+      </constraints>
+      <attributes>
+        <attribute name="value" type="string" default="" />
+        <attribute name="placeholder" type="string" default="" />
+        <attribute name="max-length" type="int" default="255" min="1" max="10000" />
+        <attribute name="readonly" type="bool" default="false" />
+        <attribute name="multiline" type="bool" default="false" />
+      </attributes>
+      <behavior>
+        <event name="text-changed" />
+        <event name="focus" />
+        <event name="blur" />
+      </behavior>
+    </control>
+    
+    <control name="ComboBox" type="input" category="input">
+      <constraints>
+        <allowed-parents>Panel,FormField</allowed-parents>
+        <allowed-children>items</allowed-children>
+        <container>false</container>
+        <requires-structure>items</requires-structure>
+      </constraints>
+      <attributes>
+        <attribute name="selected-value" type="string" default="" />
+        <attribute name="editable" type="bool" default="false" />
+      </attributes>
+      <behavior>
+        <event name="selection-changed" />
+      </behavior>
+      <structure>
+        <items min-count="0" max-count="unlimited">
+          <item value="" text="" />
+        </items>
+      </structure>
+    </control>
+    
+    <control name="Button" type="action" category="action">
+      <constraints>
+        <allowed-parents>Panel,FormField,ButtonBar</allowed-parents>
+        <allowed-children>none</allowed-children>
+        <container>false</container>
+      </constraints>
+      <attributes>
+        <attribute name="text" type="string" default="Button" required="true" />
+        <attribute name="enabled" type="bool" default="true" />
+        <attribute name="style" type="enum" values="normal,primary,secondary,danger,borderless" default="normal" />
+      </attributes>
+      <behavior>
+        <event name="click" required="true" />
+      </behavior>
+    </control>
+    
+    <control name="Panel" type="container" category="layout">
+      <constraints>
+        <allowed-parents>Panel,window,wireframe-instance</allowed-parents>
+        <allowed-children>any-control</allowed-children>
+        <container>true</container>
+        <max-children>unlimited</max-children>
+      </constraints>
+      <attributes>
+        <attribute name="border" type="bool" default="false" />
+        <attribute name="background-color" type="color" default="transparent" />
+        <attribute name="padding" type="int" default="0" min="0" max="50" />
+        <attribute name="orientation" type="enum" values="horizontal,vertical" default="vertical" />
+        <attribute name="alignment" type="enum" values="left,center,right,stretch" default="left" />
+        <attribute name="fill" type="bool" default="false" />
+        <attribute name="width" type="int" min="10" max="2000" />
+        <attribute name="height" type="int" min="10" max="2000" />
+        <attribute name="visible" type="bool" default="true" />
+      </attributes>
+      <structure>
+        <children allow-multiple="true" />
+      </structure>
+    </control>
+    
+    <control name="PopupPanel" type="container" category="layout" inherits="Panel">
+      <constraints>
+        <allowed-parents>window</allowed-parents>
+        <allowed-children>any-control</allowed-children>
+        <container>true</container>
+      </constraints>
+      <attributes>
+        <attribute name="modal" type="bool" default="true" />
+        <attribute name="visible" type="bool" default="false" />
+        <attribute name="position" type="enum" values="center,cursor,custom" default="center" />
+      </attributes>
+      <behavior>
+        <event name="opened" />
+        <event name="closed" />
+      </behavior>
+    </control>
+    
+    <control name="Menu" type="navigation" category="navigation">
+      <constraints>
+        <allowed-parents>Panel</allowed-parents>
+        <allowed-children>menu-items</allowed-children>
+        <container>true</container>
+        <requires-structure>menu-items</requires-structure>
+      </constraints>
+      <attributes>
+        <attribute name="orientation" type="enum" values="horizontal,vertical" default="horizontal" />
+      </attributes>
+      <structure>
+        <menu-items min-count="1" max-count="unlimited">
+          <menu-item text="" action="" shortcut="" separator="false" />
+        </menu-items>
+      </structure>
+    </control>
+    
+    <control name="ListView" type="data" category="data">
+      <constraints>
+        <allowed-parents>Panel</allowed-parents>
+        <allowed-children>columns,items</allowed-children>
+        <container>true</container>
+        <requires-structure>columns</requires-structure>
+      </constraints>
+      <attributes>
+        <attribute name="view-mode" type="enum" values="list,details,icons" default="list" />
+        <attribute name="multi-select" type="bool" default="false" />
+        <attribute name="sort-column" type="string" default="" />
+        <attribute name="sort-direction" type="enum" values="asc,desc" default="asc" />
+      </attributes>
+      <behavior>
+        <event name="selection-changed" />
+        <event name="item-double-click" />
+      </behavior>
+      <structure>
+        <columns min-count="1" max-count="20">
+          <column name="" text="" width="" sortable="true" />
+        </columns>
+        <items min-count="0" max-count="unlimited">
+          <item>
+            <values>
+              <value column="" text="" />
+            </values>
+          </item>
+        </items>
+      </structure>
+    </control>
+    
+    <control name="TreeView" type="data" category="data">
+      <constraints>
+        <allowed-parents>Panel</allowed-parents>
+        <allowed-children>nodes</allowed-children>
+        <container>true</container>
+        <requires-structure>nodes</requires-structure>
+      </constraints>
+      <attributes>
+        <attribute name="show-lines" type="bool" default="true" />
+        <attribute name="show-root-lines" type="bool" default="true" />
+        <attribute name="checkboxes" type="bool" default="false" />
+      </attributes>
+      <behavior>
+        <event name="node-selected" />
+        <event name="node-expanded" />
+        <event name="node-collapsed" />
+      </behavior>
+      <structure>
+        <nodes min-count="0" max-count="unlimited">
+          <node text="" value="" expanded="false" checked="false">
+            <nodes max-depth="10">
+              <!-- Recursive node structure with depth limit -->
+            </nodes>
+          </node>
+        </nodes>
+      </structure>
+    </control>
+    
+    <!-- Additional specialized controls -->
+    <control name="TabControl" type="container" category="layout">
+      <constraints>
+        <allowed-parents>Panel</allowed-parents>
+        <allowed-children>tab</allowed-children>
+        <container>true</container>
+        <requires-structure>tabs</requires-structure>
+      </constraints>
+      <attributes>
+        <attribute name="selected-tab" type="string" default="" />
+        <attribute name="tab-position" type="enum" values="top,bottom,left,right" default="top" />
+      </attributes>
+      <structure>
+        <tabs min-count="1" max-count="20">
+          <tab name="" text="" visible="true" enabled="true">
+            <!-- Tab content can contain any controls -->
+          </tab>
+        </tabs>
+      </structure>
+    </control>
+    
+    <control name="ButtonBar" type="container" category="layout">
+      <constraints>
+        <allowed-parents>Panel,FormField</allowed-parents>
+        <allowed-children>Button</allowed-children>
+        <container>true</container>
+        <max-children>10</max-children>
+      </constraints>
+      <attributes>
+        <attribute name="alignment" type="enum" values="left,center,right" default="right" />
+        <attribute name="spacing" type="int" default="5" min="0" max="20" />
+      </attributes>
+    </control>
+    
+    <!-- Custom pattern with constraints -->
+    <structure name="FormField" type="pattern" category="composite">
+      <constraints>
+        <allowed-parents>Panel,FormLayout</allowed-parents>
+        <allowed-children>Label,TextBox,ComboBox,Button</allowed-children>
+        <container>true</container>
+        <required-slots>input</required-slots>
+      </constraints>
+      <attributes>
+        <attribute name="label-text" type="string" required="true" />
+        <attribute name="required" type="bool" default="false" />
+        <attribute name="validation-message" type="string" default="" />
+      </attributes>
+      <template>
+        <Panel name="fieldContainer">
+          <Label name="fieldLabel" text="{label-text}" />
+          <slot name="input" allowed-controls="TextBox,ComboBox,Button" required="true" />
+          <Label name="validationLabel" text="{validation-message}" visible="false" color="#ff0000" />
+        </Panel>
+      </template>
+    </structure>
+    
+  </patterns>
+  
+  <!-- NEW: View definitions with external includes -->
+  <views>
+    
+    <!-- External view includes - loaded before local view definitions -->
+    <view-include src="business-views.xml" important="true" />
+    <view-include src="admin-views.xml" important="false" />
+    
+    <!-- Base Application View -->
+    <view name="BaseApplicationView" type="base" category="framework">
+      <description>Base view for all application windows with common functionality</description>
+      
+      <metadata>
+        <permissions>app.access</permissions>
+      </metadata>
+      
+      <data-context>
+        <property name="currentUser" type="User" scope="global" />
+        <property name="applicationSettings" type="AppSettings" scope="global" />
+        <property name="isLoading" type="bool" scope="view" />
+      </data-context>
+      
+      <behaviors>
+        <behavior name="show-loading" scope="view" />
+        <behavior name="hide-loading" scope="view" />
+        <behavior name="show-error" scope="view" />
+        <behavior name="log-action" scope="global" />
+      </behaviors>
+    </view>
+    
+    <!-- Main Application View -->
+    <view name="MainApplicationView" type="dashboard" category="core" inherits="BaseApplicationView">
+      <description>Main application dashboard with navigation and overview</description>
+      
+      <metadata>
+        <view-model-class>MainApplicationViewModel</view-model-class>
+        <controller-class>MainApplicationController</controller-class>
+        <permissions>app.main,dashboard.view</permissions>
+      </metadata>
+      
+      <dependencies>
+        <view-ref name="UserManagementView" relationship="reference" required="false">
+          <interaction type="manage-users" />
+        </view-ref>
+        <view-ref name="SettingsView" relationship="reference" required="false">
+          <interaction type="configure-app" />
+        </view-ref>
+        <shared-component name="NotificationService" required="true" />
+        <shared-component name="SecurityService" required="true" />
+      </dependencies>
+      
+      <data-context>
+        <property name="dashboardData" type="DashboardData" scope="view" />
+        <property name="recentItems" type="RecentItemsList" scope="view" />
+        <property name="notifications" type="NotificationList" scope="view" />
+      </data-context>
+      
+      <windows>
+        <window-ref name="MainWindow" role="main" default="true" />
+      </windows>
+      
+      <navigation>
+        <action name="show-dashboard" target="MainWindow" />
+        <action name="show-users" target="UserManagementView" />
+        <action name="show-settings" target="SettingsView" />
+        <action name="show-reports" target="MainWindow" context="reportsPanel" />
+      </navigation>
+      
+      <behaviors>
+        <behavior name="refresh-dashboard" scope="view" />
+        <behavior name="load-recent-items" scope="view" />
+        <behavior name="check-notifications" scope="view" />
+      </behaviors>
+      
+      <communication>
+        <publishes>
+          <event name="dashboard-loaded" data="dashboard-id" />
+          <event name="user-activity" data="activity-type,timestamp" />
+        </publishes>
+        <subscribes>
+          <event name="user-logged-in" source="SecurityService" handler="refresh-dashboard" />
+          <event name="settings-changed" source="SettingsView" handler="apply-settings" />
+        </subscribes>
+      </communication>
+    </view>
+    
+    <!-- User Management View -->
+    <view name="UserManagementView" type="business-entity" category="admin" inherits="BaseApplicationView">
+      <description>User account management including creation, editing, and permissions</description>
+      
+      <metadata>
+        <model-class>User</model-class>
+        <view-model-class>UserManagementViewModel</view-model-class>
+        <controller-class>UserController</controller-class>
+        <permissions>user.read,user.write,user.admin</permissions>
+      </metadata>
+      
+      <data-context>
+        <property name="currentUser" type="User" scope="view" />
+        <property name="userList" type="UserList" scope="view" />
+        <property name="selectedUsers" type="UserList" scope="view" />
+        <property name="userRoles" type="RoleList" scope="view" />
+      </data-context>
+      
+      <windows>
+        <window-ref name="UserListWindow" role="main" default="true" />
+        <window-ref name="UserEditDialog" role="editor" modal="true" />
+        <window-ref name="UserPermissionsDialog" role="utility" modal="true" />
+      </windows>
+      
+      <navigation>
+        <action name="show-user-list" target="UserListWindow" />
+        <action name="edit-user" target="UserEditDialog" context="currentUser" />
+        <action name="create-user" target="UserEditDialog" />
+        <action name="manage-permissions" target="UserPermissionsDialog" context="currentUser" />
+      </navigation>
+      
+      <behaviors>
+        <behavior name="refresh-users" scope="view" />
+        <behavior name="validate-user" scope="view" />
+        <behavior name="save-user" scope="view" />
+        <behavior name="delete-user" scope="view" />
+        <behavior name="reset-password" scope="view" />
+      </behaviors>
+      
+      <communication>
+        <publishes>
+          <event name="user-created" data="user-id" />
+          <event name="user-updated" data="user-id" />
+          <event name="user-deleted" data="user-id" />
+        </publishes>
+      </communication>
+    </view>
+    
+    <!-- Settings View -->
+    <view name="SettingsView" type="utility" category="system" inherits="BaseApplicationView">
+      <description>Application configuration and user preferences</description>
+      
+      <metadata>
+        <model-class>ApplicationSettings</model-class>
+        <view-model-class>SettingsViewModel</view-model-class>
+        <controller-class>SettingsController</controller-class>
+        <permissions>settings.read,settings.write</permissions>
+      </metadata>
+      
+      <data-context>
+        <property name="currentSettings" type="ApplicationSettings" scope="view" />
+        <property name="userPreferences" type="UserPreferences" scope="view" />
+        <property name="systemInfo" type="SystemInfo" scope="view" />
+      </data-context>
+      
+      <windows>
+        <window-ref name="SettingsWindow" role="main" default="true" />
+      </windows>
+      
+      <navigation>
+        <action name="show-settings" target="SettingsWindow" />
+        <action name="reset-to-defaults" target="SettingsWindow" />
+      </navigation>
+      
+      <behaviors>
+        <behavior name="load-settings" scope="view" />
+        <behavior name="save-settings" scope="view" />
+        <behavior name="validate-settings" scope="view" />
+        <behavior name="export-settings" scope="view" />
+        <behavior name="import-settings" scope="view" />
+      </behaviors>
+      
+      <communication>
+        <publishes>
+          <event name="settings-changed" data="setting-category" />
+          <event name="settings-saved" data="timestamp" />
+        </publishes>
+      </communication>
+    </view>
+    
+  </views>
+  
+  <!-- Window definitions with view associations and wireframe inheritance -->
+  <window name="MainWindow" title="Main Application" wireframe="StandardAppLayout" view="MainApplicationView">
+    <attributes>
+      <attribute name="width" value="1200" />
+      <attribute name="height" value="800" />
+      <attribute name="resizable" value="true" />
+      <attribute name="start-position" value="center" />
+      <attribute name="minimize-to-tray" value="true" />
+    </attributes>
+    
+    <!-- NEW: View properties for view integration -->
+    <view-properties>
+      <role>main</role>
+      <default>true</default>
+      <data-context-binding>dashboardData</data-context-binding>
+    </view-properties>
+    
+    <!-- Override specific slots from the wireframe -->
+    <slot-overrides>
+      <slot name="header-actions">
+        <Button name="userProfileButton" text="Profile" />
+        <Button name="settingsButton" text="Settings" />
+        <Button name="helpButton" text="Help" />
+      </slot>
+      
+      <slot name="navigation-items">
+        <menu-items>
+          <menu-item text="Dashboard" action="show-dashboard" />
+          <menu-item text="Users" action="show-users" />
+          <menu-item text="Reports" action="show-reports" />
+          <menu-item text="Settings" action="show-settings" />
+          <menu-item text="" separator="true" />
+          <menu-item text="About" action="show-about" />
+        </menu-items>
+      </slot>
+      
+      <slot name="main-content">
+        <!-- Main application content -->
+        <Panel name="dashboardPanel">
+          <Label name="welcomeLabel" text="Welcome to Dashboard" font-size="18" />
+          
+          <Panel name="statisticsPanel" orientation="horizontal">
+            <Panel name="statsLeft" width="400">
+              <Label name="totalUsersLabel" text="Total Users: 0" />
+              <Label name="activeSessionsLabel" text="Active Sessions: 0" />
+              <Label name="systemStatusLabel" text="System Status: Running" />
+            </Panel>
+            
+            <Panel name="statsRight" fill="true">
+              <ListView name="recentItems" view-mode="details">
+                <columns>
+                  <column name="name" text="Name" width="200" sortable="true" />
+                  <column name="date" text="Date" width="150" sortable="true" />
+                  <column name="user" text="User" width="120" sortable="true" />
+                  <column name="status" text="Status" width="100" sortable="true" />
+                </columns>
+              </ListView>
+            </Panel>
+          </Panel>
+          
+          <Panel name="quickActionsPanel">
+            <ButtonBar name="quickActions" alignment="left">
+              <Button name="addUserButton" text="Add User" style="primary" />
+              <Button name="generateReportButton" text="Generate Report" />
+              <Button name="backupDataButton" text="Backup Data" />
+            </ButtonBar>
+          </Panel>
+        </Panel>
+      </slot>
+      
+      <slot name="footer-content">
+        <Label name="statusLabel" text="Connected - System Ready" />
+        <Label name="versionLabel" text="v1.1.0" alignment="right" />
+        <Label name="timeLabel" text="00:00:00" alignment="right" />
+      </slot>
+    </slot-overrides>
+  </window>
+  
+  <!-- User management window inheriting dialog wireframe -->
+  <window name="UserListWindow" title="User Management" wireframe="StandardAppLayout" view="UserManagementView">
+    <attributes>
+      <attribute name="width" value="900" />
+      <attribute name="height" value="600" />
+      <attribute name="modal" value="false" />
+    </attributes>
+    
+    <view-properties>
+      <role>main</role>
+      <default>true</default>
+      <data-context-binding>userList</data-context-binding>
+    </view-properties>
+    
+    <slot-overrides>
+      <slot name="header-content">
+        <Label name="titleLabel" text="User Management" font-size="16" />
+        <Panel name="searchPanel" orientation="horizontal">
+          <TextBox name="searchInput" placeholder="Search users..." />
+          <Button name="searchButton" text="Search" />
+        </Panel>
+      </slot>
+      
+      <slot name="main-content">
+        <Panel name="userManagementPanel">
+          <Panel name="toolbarPanel" height="40" orientation="horizontal">
+            <ButtonBar name="userActions" alignment="left">
+              <Button name="addUserButton" text="Add User" style="primary" />
+              <Button name="editUserButton" text="Edit" enabled="false" />
+              <Button name="deleteUserButton" text="Delete" enabled="false" style="danger" />
+              <Button name="resetPasswordButton" text="Reset Password" enabled="false" />
+            </ButtonBar>
+            
+            <ButtonBar name="viewActions" alignment="right">
+              <Button name="refreshButton" text="Refresh" />
+              <Button name="exportButton" text="Export" />
+            </ButtonBar>
+          </Panel>
+          
+          <ListView name="userGrid" view-mode="details" multi-select="true">
+            <columns>
+              <column name="id" text="ID" width="80" sortable="true" />
+              <column name="username" text="Username" width="150" sortable="true" />
+              <column name="fullname" text="Full Name" width="200" sortable="true" />
+              <column name="email" text="Email" width="250" sortable="true" />
+              <column name="role" text="Role" width="120" sortable="true" />
+              <column name="status" text="Status" width="100" sortable="true" />
+              <column name="lastlogin" text="Last Login" width="150" sortable="true" />
+            </columns>
+          </ListView>
+        </Panel>
+      </slot>
+    </slot-overrides>
+  </window>
+  
+  <!-- User edit dialog inheriting dialog wireframe -->
+  <window name="UserEditDialog" title="Edit User" wireframe="DialogLayout" view="UserManagementView">
+    <attributes>
+      <attribute name="width" value="500" />
+      <attribute name="height" value="400" />
+      <attribute name="modal" value="true" />
+      <attribute name="resizable" value="false" />
+    </attributes>
+    
+    <view-properties>
+      <role>editor</role>
+      <modal>true</modal>
+      <data-context-binding>currentUser</data-context-binding>
+      <parent-window>UserListWindow</parent-window>
+    </view-properties>
+    
+    <slot-overrides>
+      <slot name="dialog-title">
+        <Label name="titleLabel" text="User Details" />
+      </slot>
+      
+      <slot name="dialog-body">
+        <!-- Use FormLayout as nested wireframe -->
+        <wireframe-instance name="userForm" wireframe="FormLayout">
+          <slot name="form-content">
+            <FormField name="usernameField" label-text="Username:" required="true">
+              <TextBox name="usernameInput" slot="input" max-length="50" />
+            </FormField>
+            
+            <FormField name="fullnameField" label-text="Full Name:" required="true">
+              <TextBox name="fullnameInput" slot="input" max-length="100" />
+            </FormField>
+            
+            <FormField name="emailField" label-text="Email:" required="true">
+              <TextBox name="emailInput" slot="input" max-length="255" />
+            </FormField>
+            
+            <FormField name="roleField" label-text="Role:">
+              <ComboBox name="roleCombo" slot="input">
+                <items>
+                  <item value="admin" text="Administrator" />
+                  <item value="user" text="Standard User" />
+                  <item value="viewer" text="Viewer Only" />
+                  <item value="moderator" text="Moderator" />
+                </items>
+              </ComboBox>
+            </FormField>
+            
+            <FormField name="statusField" label-text="Status:">
+              <ComboBox name="statusCombo" slot="input">
+                <items>
+                  <item value="active" text="Active" />
+                  <item value="inactive" text="Inactive" />
+                  <item value="suspended" text="Suspended" />
+                  <item value="pending" text="Pending Approval" />
+                </items>
+              </ComboBox>
+            </FormField>
+            
+            <FormField name="passwordField" label-text="Password:" required="false">
+              <TextBox name="passwordInput" slot="input" />
+            </FormField>
+          </slot>
+          
+          <slot name="form-buttons">
+            <Button name="saveButton" text="Save User" style="primary" />
+            <Button name="cancelButton" text="Cancel" />
+            <Button name="resetPasswordButton" text="Reset Password" style="secondary" />
+          </slot>
+        </wireframe-instance>
+      </slot>
+      
+      <slot name="dialog-buttons">
+        <Button name="saveButton" text="Save Changes" style="primary" />
+        <Button name="cancelButton" text="Cancel" />
+        <Button name="deleteButton" text="Delete User" style="danger" />
+      </slot>
+    </slot-overrides>
+  </window>
+  
+  <!-- User permissions dialog -->
+  <window name="UserPermissionsDialog" title="User Permissions" wireframe="DialogLayout" view="UserManagementView">
+    <attributes>
+      <attribute name="width" value="600" />
+      <attribute name="height" value="500" />
+      <attribute name="modal" value="true" />
+    </attributes>
+    
+    <view-properties>
+      <role>utility</role>
+      <modal>true</modal>
+      <data-context-binding>currentUser</data-context-binding>
+      <parent-window>UserListWindow</parent-window>
+    </view-properties>
+    
+    <slot-overrides>
+      <slot name="dialog-title">
+        <Label name="titleLabel" text="Manage User Permissions" />
+      </slot>
+      
+      <slot name="dialog-body">
+        <Panel name="permissionsPanel">
+          <Label name="userInfoLabel" text="User: {currentUser.username}" font-size="14" />
+          
+          <TabControl name="permissionTabs">
+            <tab name="basic" text="Basic Permissions">
+              <Panel name="basicPermissions">
+                <TreeView name="basicPermissionsTree" checkboxes="true">
+                  <nodes>
+                    <node text="Application Access" value="app.access" checked="true">
+                      <nodes>
+                        <node text="Dashboard View" value="dashboard.view" checked="true" />
+                        <node text="Reports View" value="reports.view" checked="false" />
+                        <node text="Settings Access" value="settings.read" checked="false" />
+                      </nodes>
+                    </node>
+                    <node text="User Management" value="user.manage" checked="false">
+                      <nodes>
+                        <node text="View Users" value="user.read" checked="false" />
+                        <node text="Create Users" value="user.create" checked="false" />
+                        <node text="Edit Users" value="user.write" checked="false" />
+                        <node text="Delete Users" value="user.delete" checked="false" />
+                      </nodes>
+                    </node>
+                  </nodes>
+                </TreeView>
+              </Panel>
+            </tab>
+            
+            <tab name="advanced" text="Advanced Permissions">
+              <Panel name="advancedPermissions">
+                <ListView name="advancedPermissionsList" view-mode="details" multi-select="true">
+                  <columns>
+                    <column name="permission" text="Permission" width="200" />
+                    <column name="description" text="Description" width="300" />
+                    <column name="granted" text="Granted" width="80" />
+                  </columns>
+                </ListView>
+              </Panel>
+            </tab>
+            
+            <tab name="roles" text="Role Assignment">
+              <Panel name="roleAssignment">
+                <FormField name="primaryRoleField" label-text="Primary Role:">
+                  <ComboBox name="primaryRoleCombo" slot="input">
+                    <items>
+                      <item value="admin" text="Administrator" />
+                      <item value="user" text="Standard User" />
+                      <item value="viewer" text="Viewer" />
+                    </items>
+                  </ComboBox>
+                </FormField>
+                
+                <FormField name="additionalRolesField" label-text="Additional Roles:">
+                  <ListView name="additionalRolesList" slot="input" view-mode="list" multi-select="true">
+                    <columns>
+                      <column name="role" text="Role" width="150" />
+                    </columns>
+                  </ListView>
+                </FormField>
+              </Panel>
+            </tab>
+          </TabControl>
+        </Panel>
+      </slot>
+      
+      <slot name="dialog-buttons">
+        <Button name="savePermissionsButton" text="Save Permissions" style="primary" />
+        <Button name="cancelButton" text="Cancel" />
+        <Button name="resetToDefaultButton" text="Reset to Default" />
+      </slot>
+    </slot-overrides>
+  </window>
+  
+  <!-- Settings window with partial wireframe override -->
+  <window name="SettingsWindow" title="Application Settings" wireframe="StandardAppLayout" view="SettingsView">
+    <attributes>
+      <attribute name="width" value="800" />
+      <attribute name="height" value="600" />
+      <attribute name="modal" value="false" />
+    </attributes>
+    
+    <view-properties>
+      <role>main</role>
+      <default>true</default>
+      <data-context-binding>currentSettings</data-context-binding>
+    </view-properties>
+    
+    <slot-overrides>
+      <!-- Keep default header but override navigation -->
+      <slot name="navigation-items">
+        <menu-items>
+          <menu-item text="General" action="settings-general" />
+          <menu-item text="Appearance" action="settings-appearance" />
+          <menu-item text="Security" action="settings-security" />
+          <menu-item text="Database" action="settings-database" />
+          <menu-item text="Logging" action="settings-logging" />
+          <menu-item text="Advanced" action="settings-advanced" />
+        </menu-items>
+      </slot>
+      
+      <slot name="main-content">
+        <Panel name="settingsContent">
+          <!-- Settings tabs or sections would go here -->
+          <TabControl name="settingsTabs">
+            <tab name="general" text="General Settings">
+              <Panel name="generalSettings">
+                <FormField name="appNameField" label-text="Application Name:">
+                  <TextBox name="appNameInput" slot="input" value="Sample Application" />
+                </FormField>
+                
+                <FormField name="languageField" label-text="Language:">
+                  <ComboBox name="languageCombo" slot="input">
+                    <items>
+                      <item value="en" text="English" />
+                      <item value="de" text="Deutsch" />
+                      <item value="fr" text="Français" />
+                      <item value="es" text="Español" />
+                    </items>
+                  </ComboBox>
+                </FormField>
+                
+                <FormField name="timezoneField" label-text="Timezone:">
+                  <ComboBox name="timezoneCombo" slot="input">
+                    <items>
+                      <item value="UTC" text="UTC" />
+                      <item value="EST" text="Eastern Time" />
+                      <item value="PST" text="Pacific Time" />
+                      <item value="CET" text="Central European Time" />
+                    </items>
+                  </ComboBox>
+                </FormField>
+                
+                <FormField name="autoSaveField" label-text="Auto-save interval (minutes):">
+                  <TextBox name="autoSaveInput" slot="input" value="5" />
+                </FormField>
+              </Panel>
+            </tab>
+            
+            <tab name="appearance" text="Appearance">
+              <Panel name="appearanceSettings">
+                <FormField name="themeField" label-text="Theme:">
+                  <ComboBox name="themeCombo" slot="input">
+                    <items>
+                      <item value="light" text="Light Theme" />
+                      <item value="dark" text="Dark Theme" />
+                      <item value="auto" text="Auto (System)" />
+                      <item value="high-contrast" text="High Contrast" />
+                    </items>
+                  </ComboBox>
+                </FormField>
+                
+                <FormField name="fontSizeField" label-text="Font Size:">
+                  <ComboBox name="fontSizeCombo" slot="input">
+                    <items>
+                      <item value="small" text="Small" />
+                      <item value="medium" text="Medium" />
+                      <item value="large" text="Large" />
+                      <item value="extra-large" text="Extra Large" />
+                    </items>
+                  </ComboBox>
+                </FormField>
+                
+                <FormField name="colorSchemeField" label-text="Color Scheme:">
+                  <ComboBox name="colorSchemeCombo" slot="input">
+                    <items>
+                      <item value="blue" text="Blue" />
+                      <item value="green" text="Green" />
+                      <item value="purple" text="Purple" />
+                      <item value="orange" text="Orange" />
+                    </items>
+                  </ComboBox>
+                </FormField>
+              </Panel>
+            </tab>
+            
+            <tab name="security" text="Security">
+              <Panel name="securitySettings">
+                <FormField name="sessionTimeoutField" label-text="Session Timeout (minutes):">
+                  <TextBox name="sessionTimeoutInput" slot="input" value="30" />
+                </FormField>
+                
+                <FormField name="passwordPolicyField" label-text="Password Policy:">
+                  <ComboBox name="passwordPolicyCombo" slot="input">
+                    <items>
+                      <item value="basic" text="Basic (6+ characters)" />
+                      <item value="standard" text="Standard (8+ chars, mixed case)" />
+                      <item value="strong" text="Strong (12+ chars, symbols)" />
+                      <item value="custom" text="Custom Policy" />
+                    </items>
+                  </ComboBox>
+                </FormField>
+                
+                <FormField name="twoFactorField" label-text="Two-Factor Authentication:">
+                  <ComboBox name="twoFactorCombo" slot="input">
+                    <items>
+                      <item value="disabled" text="Disabled" />
+                      <item value="optional" text="Optional" />
+                      <item value="required" text="Required" />
+                    </items>
+                  </ComboBox>
+                </FormField>
+              </Panel>
+            </tab>
+            
+            <tab name="database" text="Database">
+              <Panel name="databaseSettings">
+                <FormField name="connectionStringField" label-text="Connection String:">
+                  <TextBox name="connectionStringInput" slot="input" multiline="true" />
+                </FormField>
+                
+                <FormField name="backupIntervalField" label-text="Backup Interval (hours):">
+                  <TextBox name="backupIntervalInput" slot="input" value="24" />
+                </FormField>
+                
+                <FormField name="queryTimeoutField" label-text="Query Timeout (seconds):">
+                  <TextBox name="queryTimeoutInput" slot="input" value="30" />
+                </FormField>
+                
+                <Panel name="databaseActions">
+                  <ButtonBar name="dbActionButtons" alignment="left">
+                    <Button name="testConnectionButton" text="Test Connection" />
+                    <Button name="backupNowButton" text="Backup Now" />
+                    <Button name="optimizeButton" text="Optimize Database" />
+                  </ButtonBar>
+                </Panel>
+              </Panel>
+            </tab>
+          </TabControl>
+          
+          <Panel name="settingsActions" height="60">
+            <ButtonBar name="settingsButtons" alignment="right">
+              <Button name="saveSettingsButton" text="Save Settings" style="primary" />
+              <Button name="cancelButton" text="Cancel" />
+              <Button name="resetToDefaultsButton" text="Reset to Defaults" style="secondary" />
+              <Button name="exportSettingsButton" text="Export" />
+              <Button name="importSettingsButton" text="Import" />
+            </ButtonBar>
+          </Panel>
+        </Panel>
+      </slot>
+      
+      <!-- Use default footer -->
+    </slot-overrides>
+  </window>
+  
+</ui-layout-def>
+        

+ 169 - 0
UILayoutDefinitionFormat/Samples/view-validation.xml

@@ -0,0 +1,169 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Example: view-validation.xml -->
+<validation-rules xmlns="ui-layout-definition">
+  
+  <!-- View Structure Validation -->
+  <rule name="view-definition-required">
+    <description>Views must be properly defined before being referenced</description>
+    <constraint>All view references in windows and dependencies must correspond to defined views</constraint>
+    <constraint>View names must be unique within the document and included files</constraint>
+  </rule>
+  
+  <rule name="view-window-association">
+    <description>Windows must be properly associated with views</description>
+    <constraint>Every window should be referenced by at least one view</constraint>
+    <constraint>Windows referenced in view window-ref elements must exist</constraint>
+    <constraint>Window roles within a view must be unique</constraint>
+  </rule>
+  
+  <rule name="view-inheritance-validation">
+    <description>View inheritance must be valid and acyclic</description>
+    <constraint>Views can only inherit from other defined views</constraint>
+    <constraint>Inheritance chains must not contain cycles</constraint>
+    <constraint>Inherited view types must be compatible (base views can be inherited by any type)</constraint>
+    <constraint>View categories must be compatible in inheritance hierarchies</constraint>
+  </rule>
+  
+  <!-- View Dependencies Validation -->
+  <rule name="view-dependency-validation">
+    <description>View dependencies must be valid and resolvable</description>
+    <constraint>Referenced views in dependencies must be defined</constraint>
+    <constraint>Dependency relationships must be appropriate for the view types</constraint>
+    <constraint>Required dependencies must be satisfiable</constraint>
+    <constraint>Circular dependencies between views are not allowed</constraint>
+  </rule>
+  
+  <rule name="view-relationship-validation">
+    <description>View relationships must be semantically correct</description>
+    <constraint>Lookup relationships should reference utility or business-entity views</constraint>
+    <constraint>Detail relationships should reference views that can operate in detail mode</constraint>
+    <constraint>Reference relationships should not create tight coupling</constraint>
+    <constraint>Primary relationships in composite views must be unique</constraint>
+  </rule>
+  
+  <!-- Data Context Validation -->
+  <rule name="data-context-consistency">
+    <description>Data context properties must be consistently defined</description>
+    <constraint>Shared-scope properties must have compatible types across views</constraint>
+    <constraint>Property names within a view must be unique</constraint>
+    <constraint>Global-scope properties should be defined in base views or modules</constraint>
+    <constraint>Data context types must be valid and resolvable</constraint>
+  </rule>
+  
+  <rule name="data-binding-validation">
+    <description>View data context bindings must be valid</description>
+    <constraint>Window data-context-binding must reference existing data context properties</constraint>
+    <constraint>Binding scopes must be appropriate for the window role</constraint>
+    <constraint>Navigation contexts must reference valid data context properties</constraint>
+  </rule>
+  
+  <!-- Navigation Validation -->
+  <rule name="navigation-action-validation">
+    <description>Navigation actions must be valid and reachable</description>
+    <constraint>Navigation targets must reference defined windows within the view</constraint>
+    <constraint>Navigation contexts must reference valid data context properties</constraint>
+    <constraint>Action names within a view must be unique</constraint>
+    <constraint>Required navigation actions must be implemented</constraint>
+  </rule>
+  
+  <!-- Behavior Validation -->
+  <rule name="behavior-scope-validation">
+    <description>Behavior scopes must be appropriate and consistent</description>
+    <constraint>Global-scope behaviors should be defined in base views or modules</constraint>
+    <constraint>View-scope behaviors must be unique within the view</constraint>
+    <constraint>Inherited behaviors can be overridden with compatible scopes</constraint>
+  </rule>
+  
+  <!-- Communication Validation -->
+  <rule name="event-communication-validation">
+    <description>Inter-view communication must be properly defined</description>
+    <constraint>Subscribed events must reference valid source views</constraint>
+    <constraint>Event handlers must be implemented in the subscribing view</constraint>
+    <constraint>Published events should be consumed by at least one subscriber</constraint>
+    <constraint>Event data types must be compatible between publishers and subscribers</constraint>
+  </rule>
+  
+  <!-- Composite View Validation -->
+  <rule name="composite-view-validation">
+    <description>Composite views must be properly structured</description>
+    <constraint>Composed views must be defined and accessible</constraint>
+    <constraint>Layout slots must correspond to wireframe slot definitions</constraint>
+    <constraint>Primary role must be assigned to exactly one composed view</constraint>
+    <constraint>Coordination rules must reference valid views and events</constraint>
+  </rule>
+  
+  <!-- Module View Validation -->
+  <rule name="module-view-validation">
+    <description>Module views must properly organize related functionality</description>
+    <constraint>Module views must contain at least one view reference</constraint>
+    <constraint>Referenced views in modules must be defined</constraint>
+    <constraint>Module dependencies must be valid and resolvable</constraint>
+    <constraint>Main navigation items must reference contained views</constraint>
+  </rule>
+  
+  <!-- Workflow Validation -->
+  <rule name="workflow-validation">
+    <description>Process flow workflows must be valid and navigable</description>
+    <constraint>Workflow steps must reference valid windows within the view</constraint>
+    <constraint>Step transitions must form a connected graph</constraint>
+    <constraint>Workflow must have at least one starting step (no previous)</constraint>
+    <constraint>Circular workflows must have explicit exit conditions</constraint>
+  </rule>
+  
+  <!-- Metadata Validation -->
+  <rule name="metadata-validation">
+    <description>View metadata must be valid for code generation</description>
+    <constraint>Model class names must follow naming conventions</constraint>
+    <constraint>View model class names should end with 'ViewModel'</constraint>
+    <constraint>Controller class names should end with 'Controller'</constraint>
+    <constraint>Permission strings must follow defined permission patterns</constraint>
+  </rule>
+  
+  <!-- View Type Validation -->
+  <rule name="view-type-validation">
+    <description>View types must be used appropriately</description>
+    <constraint>Business-entity views should have CRUD operations</constraint>
+    <constraint>Process-flow views should define workflow steps</constraint>
+    <constraint>Dashboard views should aggregate data from other views</constraint>
+    <constraint>Utility views should be designed for reuse</constraint>
+    <constraint>Wizard views should have sequential navigation</constraint>
+    <constraint>Base views should be designed for inheritance</constraint>
+  </rule>
+  
+  <!-- Performance and Scalability -->
+  <rule name="view-performance-validation">
+    <description>Views should be designed for optimal performance</description>
+    <constraint>Dependency depth should not exceed 5 levels</constraint>
+    <constraint>Composite views should not contain more than 10 composed views</constraint>
+    <constraint>Data context properties should have appropriate scopes</constraint>
+    <constraint>Event subscriptions should not create performance bottlenecks</constraint>
+  </rule>
+  
+  <!-- Security Validation -->
+  <rule name="view-security-validation">
+    <description>Views must implement proper security constraints</description>
+    <constraint>Views with write operations must specify appropriate permissions</constraint>
+    <constraint>Sensitive operations must require explicit permissions</constraint>
+    <constraint>Cross-view data access must respect security boundaries</constraint>
+    <constraint>Administrative views must have admin category or permissions</constraint>
+  </rule>
+  
+  <!-- Accessibility Validation -->
+  <rule name="view-accessibility-validation">
+    <description>Views should support accessibility requirements</description>
+    <constraint>Modal dialogs should have proper escape mechanisms</constraint>
+    <constraint>Navigation actions should be keyboard accessible</constraint>
+    <constraint>Critical functions should not depend solely on color or visual cues</constraint>
+    <constraint>Views should support screen reader navigation</constraint>
+  </rule>
+  
+  <!-- Consistency Validation -->
+  <rule name="view-naming-consistency">
+    <description>View naming should follow consistent patterns</description>
+    <constraint>View names should end with 'View' suffix</constraint>
+    <constraint>Related views should use consistent naming prefixes</constraint>
+    <constraint>Window references should use descriptive role names</constraint>
+    <constraint>Navigation action names should be verb-based and descriptive</constraint>
+  </rule>
+  
+</validation-rules>

+ 43 - 0
UILayoutDefinitionFormat/Samples/web-controls.xml

@@ -0,0 +1,43 @@
+<!-- Example: web-controls.xml -->
+<?xml version="1.0" encoding="UTF-8"?>
+<patterns xmlns="ui-layout-patterns">
+  
+  <!-- Web/HTML-specific controls -->
+  <control name="WebBrowser" type="container" category="web-specific">
+    <constraints>
+      <allowed-parents>Panel</allowed-parents>
+      <allowed-children>none</allowed-children>
+      <container>false</container>
+    </constraints>
+    <attributes>
+      <attribute name="url" type="string" default="about:blank" />
+      <attribute name="allow-navigation" type="bool" default="true" />
+      <attribute name="script-errors-suppressed" type="bool" default="false" />
+      <attribute name="web-browser-shortcuts-enabled" type="bool" default="true" />
+    </attributes>
+    <behavior>
+      <event name="navigating" />
+      <event name="document-completed" />
+      <event name="new-window" />
+    </behavior>
+  </control>
+  
+  <control name="DatePicker" type="input" category="web-specific">
+    <constraints>
+      <allowed-parents>Panel,FormField</allowed-parents>
+      <allowed-children>none</allowed-children>
+      <container>false</container>
+    </constraints>
+    <attributes>
+      <attribute name="selected-date" type="date" default="today" />
+      <attribute name="min-date" type="date" default="1900-01-01" />
+      <attribute name="max-date" type="date" default="2100-12-31" />
+      <attribute name="format" type="string" default="yyyy-mm-dd" />
+      <attribute name="show-week-numbers" type="bool" default="false" />
+    </attributes>
+    <behavior>
+      <event name="date-changed" />
+    </behavior>
+  </control>
+
+</patterns>

+ 61 - 0
UILayoutDefinitionFormat/Samples/windows-controls.xml

@@ -0,0 +1,61 @@
+<!-- Example: windows-controls.xml -->
+<?xml version="1.0" encoding="UTF-8" ?>
+<patterns xmlns="ui-layout-patterns">
+  
+  <!-- Windows-specific controls -->
+  <control name="RichTextBox" type="input" category="windows-specific">
+    <constraints>
+      <allowed-parents>Panel,FormField</allowed-parents>
+      <allowed-children>none</allowed-children>
+      <container>false</container>
+    </constraints>
+    <attributes>
+      <attribute name="rtf-content" type="string" default="" />
+      <attribute name="enable-auto-url-detect" type="bool" default="true" />
+      <attribute name="word-wrap" type="bool" default="true" />
+      <attribute name="show-selection-margin" type="bool" default="false" />
+    </attributes>
+    <behavior>
+      <event name="text-changed" />
+      <event name="selection-changed" />
+    </behavior>
+  </control>
+  
+  <control name="PropertyGrid" type="data" category="windows-specific">
+    <constraints>
+      <allowed-parents>Panel</allowed-parents>
+      <allowed-children>property-categories</allowed-children>
+      <container>true</container>
+    </constraints>
+    <attributes>
+      <attribute name="selected-object" type="object" default="null" />
+      <attribute name="property-sort" type="enum" values="alphabetical,categorized,none" default="categorized" />
+      <attribute name="help-visible" type="bool" default="true" />
+    </attributes>
+    <structure>
+      <property-categories>
+        <category name="" display-name="" expanded="true" />
+      </property-categories>
+    </structure>
+  </control>
+  
+  <control name="NotifyIcon" type="system" category="windows-specific">
+    <constraints>
+      <allowed-parents>window</allowed-parents>
+      <allowed-children>context-menu</allowed-children>
+      <container>false</container>
+    </constraints>
+    <attributes>
+      <attribute name="icon" type="icon" required="true" />
+      <attribute name="tooltip-text" type="string" default="" />
+      <attribute name="visible" type="bool" default="false" />
+      <attribute name="balloon-tip-title" type="string" default="" />
+    </attributes>
+    <behavior>
+      <event name="click" />
+      <event name="double-click" />
+      <event name="balloon-tip-clicked" />
+    </behavior>
+  </control>
+
+</patterns>

+ 706 - 0
UILayoutDefinitionFormat/readme.md

@@ -0,0 +1,706 @@
+# UI Layout Definition Format
+
+**Version:** 1.1  
+**Documentation Version:** 1.1  
+**Author:** Dalibor Votruba  
+**URL:** [quadarax.com/ui-layout-def](https://quadarax.com/ui-layout-def)
+
+A comprehensive XML-based format for describing user interface layouts with inheritance, pattern definitions, view organization, and platform-specific extensions. This format enables cross-platform UI generation with strict validation and modular component libraries.
+
+## Table of Contents
+
+- [Overview](#overview)
+- [Core Concepts](#core-concepts)
+- [Document Structure](#document-structure)
+- [View Definitions (NEW)](#view-definitions)
+- [Pattern Definitions](#pattern-definitions)
+- [Control Definitions](#control-definitions)
+- [Wireframe Inheritance](#wireframe-inheritance)
+- [Window Definitions](#window-definitions)
+- [Validation System](#validation-system)
+- [External Includes](#external-includes)
+- [Examples](#examples)
+- [Best Practices](#best-practices)
+- [Platform Support](#platform-support)
+
+## Overview
+
+The UI Layout Definition Format provides a standardized way to define user interfaces that can be translated to various platforms (Windows Forms, WPF, Qt, Web, Mobile). It emphasizes:
+
+- **View-Based Organization**: Logical grouping of related UI components by business function
+- **Separation of Concerns**: Pattern definitions separate from usage
+- **Inheritance**: Base wireframes and views with specific overrides
+- **Validation**: Strict constraints ensure consistent, valid UIs
+- **Modularity**: External pattern, view, and validation includes
+- **Cross-Platform**: Platform-specific control libraries
+- **MVVM Support**: Direct mapping to view models and business logic
+
+## Core Concepts
+
+### 1. View-First Design (NEW in v1.1)
+Views represent logical business functions (ProductView, OrderView) that group related windows and define shared data context and behaviors.
+
+### 2. Patterns-First Design
+All controls and structures must be defined in the `<patterns>` section before use in windows.
+
+### 3. Inheritance Hierarchy
+- Views can inherit from other views
+- Controls can inherit from other controls
+- Windows can inherit from wireframe layouts
+- Attributes can be overridden at any level
+
+### 4. Slot-Based Composition
+Wireframes use slots as placeholders that windows can fill with specific content.
+
+### 5. Constraint Validation
+Comprehensive validation rules ensure UI consistency and platform compliance.
+
+## Document Structure
+
+```xml
+<?xml version="1.0" encoding="UTF-8"?>
+<ui-layout-def xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+               xsi:schemaLocation="ui-layout-definition ui-layout-def.xsd">
+  
+  <!-- Optional: Validation rules with external includes -->
+  <validation-rules>
+    <validation-include src="..." important="true/false" />
+    <rule name="...">...</rule>
+  </validation-rules>
+  
+  <!-- Required: Pattern definitions with external includes -->
+  <patterns>
+    <pattern-include src="..." important="true/false" />
+    <control name="...">...</control>
+    <structure name="...">...</structure>
+    <wireframe name="...">...</wireframe>
+  </patterns>
+  
+  <!-- NEW: View definitions with external includes -->
+  <views>
+    <view-include src="..." important="true/false" />
+    <view name="..." type="..." category="..." inherits="...">...</view>
+  </views>
+  
+  <!-- Required: One or more window definitions -->
+  <window name="..." title="..." wireframe="..." view="...">
+    <!-- Window content -->
+  </window>
+  
+</ui-layout-def>
+```
+
+## View Definitions
+
+### View Concept
+
+Views are logical containers that group related windows, dialogs, and UI components that work together for a specific business function. They provide:
+
+- **Logical Organization**: Group UI components by business purpose
+- **Data Context**: Shared state management within the view
+- **Navigation**: Centralized navigation logic
+- **Dependencies**: Clear relationships between views
+- **Code Generation**: Generate view classes with proper structure
+
+### Basic View Structure
+
+```xml
+<view name="ProductView" type="business-entity" category="core" inherits="BaseEntityView">
+  <description>Product management functionality including listing, editing, and details</description>
+  
+  <!-- View metadata for code generation -->
+  <metadata>
+    <model-class>Product</model-class>
+    <view-model-class>ProductViewModel</view-model-class>
+    <controller-class>ProductController</controller-class>
+    <permissions>product.read,product.write</permissions>
+  </metadata>
+  
+  <!-- View dependencies -->
+  <dependencies>
+    <view-ref name="CategoryView" relationship="lookup" required="false" />
+    <view-ref name="SupplierView" relationship="reference" required="false" />
+    <shared-component name="FileUploadComponent" required="true" />
+  </dependencies>
+  
+  <!-- Shared data context -->
+  <data-context>
+    <property name="currentProduct" type="Product" scope="view" />
+    <property name="productList" type="ProductList" scope="view" />
+    <property name="selectedCategory" type="Category" scope="shared" />
+  </data-context>
+  
+  <!-- Window associations -->
+  <windows>
+    <window-ref name="ProductListWindow" role="main" default="true" />
+    <window-ref name="ProductEditDialog" role="editor" modal="true" />
+    <window-ref name="ProductDetailsWindow" role="viewer" />
+  </windows>
+  
+  <!-- View-level navigation -->
+  <navigation>
+    <action name="show-list" target="ProductListWindow" />
+    <action name="edit-product" target="ProductEditDialog" context="currentProduct" />
+    <action name="view-details" target="ProductDetailsWindow" context="currentProduct" />
+  </navigation>
+  
+  <!-- Shared behaviors -->
+  <behaviors>
+    <behavior name="refresh-data" scope="view" />
+    <behavior name="validate-product" scope="view" />
+    <behavior name="save-changes" scope="view" />
+  </behaviors>
+</view>
+```
+
+### View Types and Categories
+
+**View Types:**
+- `business-entity` - Product, Order, Customer management
+- `process-flow` - OrderProcessing, Checkout workflows
+- `dashboard` - MainDashboard, ReportsView
+- `utility` - Settings, UserPreferences
+- `wizard` - Setup wizards, guided processes
+- `composite` - Views composed of multiple sub-views
+- `module` - Application modules containing multiple views
+
+**Categories:**
+- `core` - Essential business functionality
+- `admin` - Administrative functions
+- `reporting` - Reports and analytics
+- `system` - System-level functionality
+- `framework` - Base views for inheritance
+
+### View Inheritance
+
+```xml
+<!-- Base entity view -->
+<view name="BaseEntityView" type="base" category="framework">
+  <windows>
+    <window-ref name="BaseListWindow" role="main" />
+    <window-ref name="BaseEditDialog" role="editor" />
+  </windows>
+  
+  <navigation>
+    <action name="show-list" target="BaseListWindow" />
+    <action name="edit-entity" target="BaseEditDialog" />
+  </navigation>
+  
+  <behaviors>
+    <behavior name="refresh-data" />
+    <behavior name="save-changes" />
+  </behaviors>
+</view>
+
+<!-- Inherited view -->
+<view name="ProductView" inherits="BaseEntityView">
+  <!-- Inherits all windows, navigation, and behaviors from BaseEntityView -->
+  <!-- Can override or extend with additional functionality -->
+  
+  <windows>
+    <!-- Additional product-specific windows -->
+    <window-ref name="ProductCatalogWindow" role="catalog" />
+  </windows>
+  
+  <navigation>
+    <!-- Override base action -->
+    <action name="edit-entity" target="ProductEditDialog" context="currentProduct" />
+    <!-- Add new action -->
+    <action name="view-catalog" target="ProductCatalogWindow" />
+  </navigation>
+</view>
+```
+
+### View Dependencies and Relationships
+
+```xml
+<dependencies>
+  <!-- Lookup relationship - uses other view for data selection -->
+  <view-ref name="CategoryView" relationship="lookup" required="false">
+    <interaction type="select-category" returns="category-id" />
+  </view-ref>
+  
+  <!-- Master-detail relationship -->
+  <view-ref name="OrderItemView" relationship="detail" required="true">
+    <interaction type="manage-items" context="current-order" />
+  </view-ref>
+  
+  <!-- Reference relationship - shows related data -->
+  <view-ref name="CustomerView" relationship="reference" required="false">
+    <interaction type="view-customer" context="customer-id" />
+  </view-ref>
+  
+  <!-- Shared component dependency -->
+  <shared-component name="AddressComponent" required="true" />
+  <shared-component name="NotificationService" required="true" />
+</dependencies>
+```
+
+### Composite Views
+
+```xml
+<view name="OrderManagementView" type="composite" category="core">
+  <description>Complete order management including orders, items, and customer details</description>
+  
+  <!-- Composed views -->
+  <composed-views>
+    <view-ref name="OrderView" role="primary" layout-slot="main-content" />
+    <view-ref name="OrderItemView" role="detail" layout-slot="items-panel" />
+    <view-ref name="CustomerView" role="reference" layout-slot="customer-panel" />
+  </composed-views>
+  
+  <!-- Composite layout -->
+  <layout wireframe="CompositeViewLayout">
+    <slot name="main-content" view="OrderView" />
+    <slot name="items-panel" view="OrderItemView" />
+    <slot name="customer-panel" view="CustomerView" />
+  </layout>
+  
+  <!-- Cross-view coordination -->
+  <coordination>
+    <rule when="OrderView.order-selected" then="OrderItemView.load-items" />
+    <rule when="OrderView.customer-changed" then="CustomerView.load-customer" />
+  </coordination>
+</view>
+```
+
+## Pattern Definitions
+
+### Control Definition
+
+```xml
+<control name="Button" type="action" category="basic">
+  <constraints>
+    <allowed-parents>Panel,FormField</allowed-parents>
+    <allowed-children>none</allowed-children>
+    <container>false</container>
+  </constraints>
+  
+  <attributes>
+    <attribute name="text" type="string" default="Button" required="true" />
+    <attribute name="enabled" type="bool" default="true" />
+    <attribute name="style" type="enum" values="normal,primary,danger" default="normal" />
+  </attributes>
+  
+  <behavior>
+    <event name="click" required="true" />
+  </behavior>
+</control>
+```
+
+#### Control Properties
+
+- **name**: Unique identifier for the control type
+- **type**: Control category (action, input, display, container, data, navigation)
+- **category**: Platform grouping (basic, windows-specific, web-specific, etc.)
+- **inherits**: Optional parent control to inherit from
+
+#### Constraints
+
+- **allowed-parents**: List of controls that can contain this control
+- **allowed-children**: List of controls this control can contain
+- **container**: Boolean indicating if control can contain children
+- **max-children**: Maximum number of child controls allowed
+- **requires-structure**: Required structural elements
+
+#### Attributes
+
+- **name**: Attribute identifier
+- **type**: Data type (string, int, bool, enum, color, date, etc.)
+- **default**: Default value
+- **required**: Whether attribute must be specified
+- **min/max**: Value constraints for numeric types
+- **values**: Allowed values for enum types
+
+### Structure Definition
+
+```xml
+<structure name="FormField" type="pattern" category="composite">
+  <constraints>
+    <allowed-parents>Panel</allowed-parents>
+    <required-slots>input</required-slots>
+  </constraints>
+  
+  <attributes>
+    <attribute name="label-text" type="string" required="true" />
+    <attribute name="required" type="bool" default="false" />
+  </attributes>
+  
+  <template>
+    <Panel name="fieldContainer">
+      <Label name="fieldLabel" text="{label-text}" />
+      <slot name="input" allowed-controls="TextBox,ComboBox" required="true" />
+      <Label name="validationLabel" visible="false" color="#ff0000" />
+    </Panel>
+  </template>
+</structure>
+```
+
+### Wireframe Definition
+
+```xml
+<wireframe name="StandardAppLayout" type="base-layout">
+  <description>Standard application layout with header, sidebar, content, footer</description>
+  <template>
+    <Panel name="rootContainer">
+      <Panel name="headerPanel" height="60">
+        <slot name="header-content" default="true">
+          <Label name="appTitle" text="Application Title" />
+        </slot>
+      </Panel>
+      
+      <Panel name="mainContainer" orientation="horizontal">
+        <Panel name="sidebarPanel" width="250">
+          <slot name="sidebar-content" />
+        </Panel>
+        <Panel name="contentPanel" fill="true">
+          <slot name="main-content" required="true" />
+        </Panel>
+      </Panel>
+      
+      <Panel name="footerPanel" height="30">
+        <slot name="footer-content" default="true">
+          <Label name="statusLabel" text="Ready" />
+        </slot>
+      </Panel>
+    </Panel>
+  </template>
+</wireframe>
+```
+
+## Wireframe Inheritance
+
+Windows can inherit from wireframe layouts and override specific slots:
+
+```xml
+<window name="MainWindow" title="Main Application" wireframe="StandardAppLayout" view="MainView">
+  <attributes>
+    <attribute name="width" value="800" />
+    <attribute name="height" value="600" />
+  </attributes>
+  
+  <view-properties>
+    <role>main</role>
+    <default>true</default>
+    <data-context-binding>mainData</data-context-binding>
+  </view-properties>
+  
+  <slot-overrides>
+    <slot name="header-content">
+      <Label name="appTitle" text="My Application" />
+      <Button name="settingsButton" text="Settings" />
+    </slot>
+    
+    <slot name="main-content">
+      <Panel name="dashboardPanel">
+        <!-- Main content here -->
+      </Panel>
+    </slot>
+  </slot-overrides>
+</window>
+```
+
+## Window Definitions
+
+```xml
+<window name="WindowName" title="Window Title" wireframe="OptionalWireframe" view="AssociatedView">
+  <attributes>
+    <attribute name="width" value="800" />
+    <attribute name="height" value="600" />
+    <attribute name="resizable" value="true" />
+    <attribute name="modal" value="false" />
+  </attributes>
+  
+  <!-- NEW: View properties -->
+  <view-properties>
+    <role>main</role>
+    <default>true</default>
+    <modal>false</modal>
+    <data-context-binding>entityData</data-context-binding>
+    <parent-window>ParentWindow</parent-window>
+  </view-properties>
+  
+  <!-- For wireframe-based windows -->
+  <slot-overrides>
+    <slot name="content">
+      <!-- Slot content -->
+    </slot>
+  </slot-overrides>
+  
+  <!-- For direct layout windows -->
+  <Panel name="mainPanel">
+    <!-- Direct content -->
+  </Panel>
+</window>
+```
+
+## Validation System
+
+### Enhanced Validation Rules for Views
+
+```xml
+<validation-rules>
+  <!-- View-specific validation rules -->
+  <rule name="view-window-association">
+    <description>All windows must be associated with a view</description>
+    <constraint>Every window must be referenced by at least one view</constraint>
+  </rule>
+  
+  <rule name="view-dependency-validation">
+    <description>View dependencies must be valid</description>
+    <constraint>Referenced views in dependencies must be defined</constraint>
+  </rule>
+  
+  <rule name="view-inheritance-validation">
+    <description>View inheritance must be valid</description>
+    <constraint>Inherited views must be defined and compatible</constraint>
+  </rule>
+  
+  <rule name="data-context-consistency">
+    <description>Data context properties must be consistently typed</description>
+    <constraint>Shared properties across views must have compatible types</constraint>
+  </rule>
+  
+  <!-- Existing validation rules -->
+  <rule name="control-definition-required">
+    <description>All controls used in windows must be defined in patterns</description>
+    <constraint>Every control element must reference a defined control or structure pattern</constraint>
+  </rule>
+</validation-rules>
+```
+
+## External Includes
+
+### View Includes
+
+```xml
+<views>
+  <view-include src="business-views.xml" important="true" />
+  <view-include src="admin-views.xml" important="false" />
+  <!-- Local view definitions -->
+</views>
+```
+
+### Pattern Includes
+
+```xml
+<patterns>
+  <pattern-include src="windows-controls.xml" important="true" />
+  <pattern-include src="custom-controls.xml" important="false" />
+  <!-- Local pattern definitions -->
+</patterns>
+```
+
+### Validation Includes
+
+```xml
+<validation-rules>
+  <validation-include src="base-validation.xml" important="true" />
+  <validation-include src="view-validation.xml" important="false" />
+  <!-- Local validation rules -->
+</validation-rules>
+```
+
+## Examples
+
+### Complete Application with Views
+
+```xml
+<ui-layout-def>
+  <validation-rules>
+    <validation-include src="base-validation.xml" important="true" />
+  </validation-rules>
+  
+  <patterns>
+    <pattern-include src="windows-controls.xml" important="true" />
+    <!-- Pattern definitions... -->
+  </patterns>
+  
+  <views>
+    <!-- Product management view -->
+    <view name="ProductView" type="business-entity" category="core">
+      <metadata>
+        <model-class>Product</model-class>
+        <view-model-class>ProductViewModel</view-model-class>
+      </metadata>
+      
+      <dependencies>
+        <view-ref name="CategoryView" relationship="lookup" />
+      </dependencies>
+      
+      <data-context>
+        <property name="currentProduct" type="Product" scope="view" />
+        <property name="productList" type="ProductList" scope="view" />
+      </data-context>
+      
+      <windows>
+        <window-ref name="ProductListWindow" role="main" default="true" />
+        <window-ref name="ProductEditDialog" role="editor" modal="true" />
+      </windows>
+      
+      <navigation>
+        <action name="show-list" target="ProductListWindow" />
+        <action name="edit-product" target="ProductEditDialog" context="currentProduct" />
+      </navigation>
+    </view>
+    
+    <!-- Category lookup view -->
+    <view name="CategoryView" type="utility" category="core">
+      <windows>
+        <window-ref name="CategoryListDialog" role="main" modal="true" />
+      </windows>
+    </view>
+  </views>
+  
+  <!-- Window definitions -->
+  <window name="ProductListWindow" title="Product List" 
+          wireframe="StandardAppLayout" view="ProductView">
+    <view-properties>
+      <role>main</role>
+      <default>true</default>
+      <data-context-binding>productList</data-context-binding>
+    </view-properties>
+    
+    <slot-overrides>
+      <slot name="main-content">
+        <ListView name="productGrid" view-mode="details">
+          <columns>
+            <column name="name" text="Product Name" width="200" />
+            <column name="category" text="Category" width="150" />
+            <column name="price" text="Price" width="100" />
+          </columns>
+        </ListView>
+      </slot>
+    </slot-overrides>
+  </window>
+  
+  <window name="ProductEditDialog" title="Edit Product" 
+          wireframe="DialogLayout" view="ProductView">
+    <view-properties>
+      <role>editor</role>
+      <modal>true</modal>
+      <data-context-binding>currentProduct</data-context-binding>
+    </view-properties>
+    
+    <slot-overrides>
+      <slot name="dialog-body">
+        <FormField name="nameField" label-text="Product Name:" required="true">
+          <TextBox name="nameInput" slot="input" />
+        </FormField>
+        
+        <FormField name="categoryField" label-text="Category:">
+          <ComboBox name="categoryCombo" slot="input" />
+        </FormField>
+      </slot>
+    </slot-overrides>
+  </window>
+</ui-layout-def>
+```
+
+## Best Practices
+
+### 1. View Organization
+
+- Group related windows by business function
+- Use inheritance for common view patterns
+- Define clear view dependencies
+- Document view responsibilities
+
+### 2. View Design Patterns
+
+- **Single Responsibility**: Each view should handle one business concept
+- **Dependency Injection**: Use view dependencies rather than tight coupling
+- **Data Context**: Define clear data scopes (view, shared, global)
+- **Navigation**: Centralize navigation logic within views
+
+### 3. Naming Conventions
+
+- Use PascalCase for view names with "View" suffix
+- Use descriptive names indicating business purpose
+- Group related views with common prefixes (OrderView, OrderItemView)
+
+### 4. Code Generation Strategy
+
+- Map views to view model classes
+- Generate navigation methods
+- Create dependency injection configuration
+- Generate view factory classes
+
+## Platform Support
+
+### Enhanced Platform Integration
+
+**Windows Forms / WPF**
+- Generate view classes with proper MVVM binding
+- Create dependency injection containers
+- Generate navigation services
+- Support for Windows-specific patterns
+
+**Qt / KDE**
+- Generate Qt view classes
+- Support for KDE desktop integration
+- Cross-platform Qt navigation
+
+**Web / HTML**
+- Generate MVC views or React components
+- Support for SPA routing
+- Progressive web app patterns
+
+**Mobile**
+- Generate platform-specific view controllers
+- Support for mobile navigation patterns
+- Responsive view layouts
+
+## Migration from Version 1.0
+
+### Backward Compatibility
+
+Version 1.1 maintains full backward compatibility with 1.0 documents. Existing documents will work without modification, but won't benefit from view organization features.
+
+### Migration Steps
+
+1. **Add Views Section**: Introduce `<views>` section
+2. **Group Windows**: Organize related windows into views
+3. **Add View Properties**: Enhance windows with view properties
+4. **Define Dependencies**: Specify view relationships
+5. **Update Validation**: Add view-specific validation rules
+
+### Gradual Migration
+
+You can migrate gradually by:
+- Adding views for new functionality
+- Keeping existing windows as-is
+- Gradually moving windows into views
+- Updating code generation templates
+
+## Code Generation
+
+### Generated View Classes (C# Example)
+
+```csharp
+// Generated from ProductView definition
+public class ProductView : BaseEntityView, IProductView
+{
+    public ProductListWindow ProductListWindow { get; private set; }
+    public ProductEditDialog ProductEditDialog { get; private set; }
+    
+    // Data context properties
+    public Product CurrentProduct { get; set; }
+    public ObservableCollection<Product> ProductList { get; set; }
+    
+    // Dependencies
+    public ICategoryView CategoryView { get; set; }
+    
+    // Navigation methods
+    public void ShowList() => ProductListWindow.Show();
+    public void EditProduct(Product product) => ProductEditDialog.ShowDialog(product);
+    
+    // View behaviors
+    public async Task RefreshData() { /* ... */ }
+    public async Task SaveChanges() { /* ... */ }
+}
+```
+
+---
+
+*This format specification enables consistent, validated, cross-platform UI definitions with powerful view organization, inheritance, and modular design capabilities.*

+ 765 - 0
UILayoutDefinitionFormat/ui-layout-def.xsd

@@ -0,0 +1,765 @@
+<?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"
+           elementFormDefault="qualified"
+           version="1.1">
+
+  <!-- Root element -->
+  <xs:element name="ui-layout-def" type="tns:UILayoutDefType"/>
+
+  <!-- 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" type="tns:WindowType" maxOccurs="unbounded"/>
+    </xs:sequence>
+    <xs:attribute name="version" type="xs:string" default="1.1"/>
+  </xs:complexType>
+
+  <!-- Validation Rules -->
+  <xs:complexType name="ValidationRulesType">
+    <xs:sequence>
+      <xs:element name="validation-include" type="tns:ValidationIncludeType" minOccurs="0" maxOccurs="unbounded"/>
+      <xs:element name="rule" type="tns: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"/>
+  </xs:complexType>
+
+  <xs:complexType name="ValidationRuleType">
+    <xs:sequence>
+      <xs:element name="description" type="xs:string"/>
+      <xs:element name="constraint" type="xs:string" maxOccurs="unbounded"/>
+    </xs:sequence>
+    <xs:attribute name="name" type="xs:string" use="required"/>
+  </xs:complexType>
+
+  <!-- Patterns -->
+  <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="tns:ControlType"/>
+        <xs:element name="structure" type="tns:StructureType"/>
+        <xs:element name="wireframe" type="tns: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:complexType>
+
+  <!-- Views (NEW in v1.1) -->
+  <xs:complexType name="ViewsType">
+    <xs:sequence>
+      <xs:element name="view-include" type="tns:ViewIncludeType" minOccurs="0" maxOccurs="unbounded"/>
+      <xs:element name="view" type="tns: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"/>
+  </xs:complexType>
+
+  <xs:complexType name="ViewType">
+    <xs:sequence>
+      <xs:element name="description" type="xs:string" minOccurs="0"/>
+      <xs:element name="metadata" type="tns:ViewMetadataType" minOccurs="0"/>
+      <xs:element name="dependencies" type="tns:ViewDependenciesType" minOccurs="0"/>
+      <xs:element name="data-context" type="tns:DataContextType" minOccurs="0"/>
+      <xs:element name="windows" type="tns:ViewWindowsType" minOccurs="0"/>
+      <xs:element name="navigation" type="tns:ViewNavigationType" minOccurs="0"/>
+      <xs:element name="behaviors" type="tns:ViewBehaviorsType" minOccurs="0"/>
+      <xs:element name="composed-views" type="tns:ComposedViewsType" minOccurs="0"/>
+      <xs:element name="layout" type="tns:ViewLayoutType" minOccurs="0"/>
+      <xs:element name="coordination" type="tns:CoordinationType" minOccurs="0"/>
+      <xs:element name="communication" type="tns:CommunicationType" minOccurs="0"/>
+      <xs:element name="workflow" type="tns:WorkflowType" minOccurs="0"/>
+      <xs:element name="module-views" type="tns:ModuleViewsType" minOccurs="0"/>
+      <xs:element name="module-dependencies" type="tns:ModuleDependenciesType" minOccurs="0"/>
+      <xs:element name="main-navigation" type="tns:MainNavigationType" minOccurs="0"/>
+    </xs:sequence>
+    <xs:attribute name="name" type="xs:string" use="required"/>
+    <xs:attribute name="type" type="tns:ViewTypeEnum" use="required"/>
+    <xs:attribute name="category" type="tns:ViewCategoryEnum" use="required"/>
+    <xs:attribute name="inherits" type="xs:string"/>
+  </xs:complexType>
+
+  <!-- View Type and Category Enums -->
+  <xs:simpleType name="ViewTypeEnum">
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="business-entity"/>
+      <xs:enumeration value="process-flow"/>
+      <xs:enumeration value="dashboard"/>
+      <xs:enumeration value="utility"/>
+      <xs:enumeration value="wizard"/>
+      <xs:enumeration value="composite"/>
+      <xs:enumeration value="module"/>
+      <xs:enumeration value="base"/>
+    </xs:restriction>
+  </xs:simpleType>
+
+  <xs:simpleType name="ViewCategoryEnum">
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="core"/>
+      <xs:enumeration value="admin"/>
+      <xs:enumeration value="reporting"/>
+      <xs:enumeration value="system"/>
+      <xs:enumeration value="framework"/>
+      <xs:enumeration value="business"/>
+    </xs:restriction>
+  </xs:simpleType>
+
+  <!-- View Metadata -->
+  <xs:complexType name="ViewMetadataType">
+    <xs:sequence>
+      <xs:element name="model-class" type="xs:string" minOccurs="0"/>
+      <xs:element name="view-model-class" type="xs:string" minOccurs="0"/>
+      <xs:element name="controller-class" type="xs:string" minOccurs="0"/>
+      <xs:element name="permissions" type="xs:string" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <!-- View Dependencies -->
+  <xs:complexType name="ViewDependenciesType">
+    <xs:choice maxOccurs="unbounded">
+      <xs:element name="view-ref" type="tns:ViewRefType"/>
+      <xs:element name="shared-component" type="tns:SharedComponentType"/>
+    </xs:choice>
+  </xs:complexType>
+
+  <xs:complexType name="ViewRefType">
+    <xs:sequence>
+      <xs:element name="interaction" type="tns:InteractionType" minOccurs="0"/>
+    </xs:sequence>
+    <xs:attribute name="name" type="xs:string" use="required"/>
+    <xs:attribute name="relationship" type="tns:RelationshipEnum" use="required"/>
+    <xs:attribute name="required" type="xs:boolean" default="false"/>
+    <xs:attribute name="role" type="xs:string"/>
+    <xs:attribute name="layout-slot" type="xs:string"/>
+  </xs:complexType>
+
+  <xs:simpleType name="RelationshipEnum">
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="lookup"/>
+      <xs:enumeration value="detail"/>
+      <xs:enumeration value="reference"/>
+      <xs:enumeration value="primary"/>
+    </xs:restriction>
+  </xs:simpleType>
+
+  <xs:complexType name="InteractionType">
+    <xs:attribute name="type" type="xs:string" use="required"/>
+    <xs:attribute name="returns" type="xs:string"/>
+    <xs:attribute name="context" type="xs:string"/>
+  </xs:complexType>
+
+  <xs:complexType name="SharedComponentType">
+    <xs:attribute name="name" type="xs:string" use="required"/>
+    <xs:attribute name="required" type="xs:boolean" default="false"/>
+  </xs:complexType>
+
+  <!-- Data Context -->
+  <xs:complexType name="DataContextType">
+    <xs:sequence>
+      <xs:element name="property" type="tns:DataPropertyType" maxOccurs="unbounded"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="DataPropertyType">
+    <xs:attribute name="name" type="xs:string" use="required"/>
+    <xs:attribute name="type" type="xs:string" use="required"/>
+    <xs:attribute name="scope" type="tns:DataScopeEnum" default="view"/>
+  </xs:complexType>
+
+  <xs:simpleType name="DataScopeEnum">
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="view"/>
+      <xs:enumeration value="shared"/>
+      <xs:enumeration value="global"/>
+    </xs:restriction>
+  </xs:simpleType>
+
+  <!-- View Windows -->
+  <xs:complexType name="ViewWindowsType">
+    <xs:sequence>
+      <xs:element name="window-ref" type="tns:WindowRefType" maxOccurs="unbounded"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="WindowRefType">
+    <xs:attribute name="name" type="xs:string" use="required"/>
+    <xs:attribute name="role" type="tns:WindowRoleEnum" use="required"/>
+    <xs:attribute name="default" type="xs:boolean" default="false"/>
+    <xs:attribute name="modal" type="xs:boolean" default="false"/>
+  </xs:complexType>
+
+  <xs:simpleType name="WindowRoleEnum">
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="main"/>
+      <xs:enumeration value="editor"/>
+      <xs:enumeration value="viewer"/>
+      <xs:enumeration value="utility"/>
+      <xs:enumeration value="catalog"/>
+      <xs:enumeration value="step1"/>
+      <xs:enumeration value="step2"/>
+      <xs:enumeration value="step3"/>
+    </xs:restriction>
+  </xs:simpleType>
+
+  <!-- View Navigation -->
+  <xs:complexType name="ViewNavigationType">
+    <xs:sequence>
+      <xs:element name="action" type="tns:NavigationActionType" maxOccurs="unbounded"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="NavigationActionType">
+    <xs:attribute name="name" type="xs:string" use="required"/>
+    <xs:attribute name="target" type="xs:string" use="required"/>
+    <xs:attribute name="context" type="xs:string"/>
+  </xs:complexType>
+
+  <!-- View Behaviors -->
+  <xs:complexType name="ViewBehaviorsType">
+    <xs:sequence>
+      <xs:element name="behavior" type="tns:ViewBehaviorType" maxOccurs="unbounded"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="ViewBehaviorType">
+    <xs:attribute name="name" type="xs:string" use="required"/>
+    <xs:attribute name="scope" type="tns:BehaviorScopeEnum" default="view"/>
+  </xs:complexType>
+
+  <xs:simpleType name="BehaviorScopeEnum">
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="view"/>
+      <xs:enumeration value="global"/>
+    </xs:restriction>
+  </xs:simpleType>
+
+  <!-- Composed Views -->
+  <xs:complexType name="ComposedViewsType">
+    <xs:sequence>
+      <xs:element name="view-ref" type="tns:ViewRefType" maxOccurs="unbounded"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <!-- View Layout -->
+  <xs:complexType name="ViewLayoutType">
+    <xs:sequence>
+      <xs:element name="slot" type="tns:ViewSlotType" maxOccurs="unbounded"/>
+    </xs:sequence>
+    <xs:attribute name="wireframe" type="xs:string" use="required"/>
+  </xs:complexType>
+
+  <xs:complexType name="ViewSlotType">
+    <xs:attribute name="name" type="xs:string" use="required"/>
+    <xs:attribute name="view" type="xs:string" use="required"/>
+  </xs:complexType>
+
+  <!-- Coordination -->
+  <xs:complexType name="CoordinationType">
+    <xs:sequence>
+      <xs:element name="rule" type="tns:CoordinationRuleType" maxOccurs="unbounded"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="CoordinationRuleType">
+    <xs:attribute name="when" type="xs:string" use="required"/>
+    <xs:attribute name="then" type="xs:string" use="required"/>
+  </xs:complexType>
+
+  <!-- Communication -->
+  <xs:complexType name="CommunicationType">
+    <xs:sequence>
+      <xs:element name="publishes" type="tns:PublishesType" minOccurs="0"/>
+      <xs:element name="subscribes" type="tns:SubscribesType" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="PublishesType">
+    <xs:sequence>
+      <xs:element name="event" type="tns:PublishedEventType" maxOccurs="unbounded"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="SubscribesType">
+    <xs:sequence>
+      <xs:element name="event" type="tns:SubscribedEventType" maxOccurs="unbounded"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="PublishedEventType">
+    <xs:attribute name="name" type="xs:string" use="required"/>
+    <xs:attribute name="data" type="xs:string"/>
+  </xs:complexType>
+
+  <xs:complexType name="SubscribedEventType">
+    <xs:attribute name="name" type="xs:string" use="required"/>
+    <xs:attribute name="source" type="xs:string" use="required"/>
+    <xs:attribute name="handler" type="xs:string" use="required"/>
+  </xs:complexType>
+
+  <!-- Workflow -->
+  <xs:complexType name="WorkflowType">
+    <xs:sequence>
+      <xs:element name="step" type="tns:WorkflowStepType" maxOccurs="unbounded"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="WorkflowStepType">
+    <xs:attribute name="name" type="xs:string" use="required"/>
+    <xs:attribute name="window" type="xs:string" use="required"/>
+    <xs:attribute name="next" type="xs:string"/>
+    <xs:attribute name="previous" type="xs:string"/>
+  </xs:complexType>
+
+  <!-- Module Views -->
+  <xs:complexType name="ModuleViewsType">
+    <xs:sequence>
+      <xs:element name="view-ref" type="tns:SimpleViewRefType" maxOccurs="unbounded"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="SimpleViewRefType">
+    <xs:attribute name="name" type="xs:string" use="required"/>
+  </xs:complexType>
+
+  <!-- Module Dependencies -->
+  <xs:complexType name="ModuleDependenciesType">
+    <xs:sequence>
+      <xs:element name="module-ref" type="tns:ModuleRefType" maxOccurs="unbounded"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="ModuleRefType">
+    <xs:attribute name="name" type="xs:string" use="required"/>
+  </xs:complexType>
+
+  <!-- Main Navigation -->
+  <xs:complexType name="MainNavigationType">
+    <xs:sequence>
+      <xs:element name="nav-item" type="tns:NavItemType" maxOccurs="unbounded"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="NavItemType">
+    <xs:attribute name="text" type="xs:string" use="required"/>
+    <xs:attribute name="view" type="xs:string" use="required"/>
+    <xs:attribute name="action" type="xs:string" use="required"/>
+  </xs:complexType>
+
+  <!-- Control Definition -->
+  <xs:complexType name="ControlType">
+    <xs:sequence>
+      <xs:element name="constraints" type="tns:ConstraintsType" minOccurs="0"/>
+      <xs:element name="attributes" type="tns:AttributesType" minOccurs="0"/>
+      <xs:element name="behavior" type="tns:BehaviorType" minOccurs="0"/>
+      <xs:element name="structure" type="tns:ControlStructureType" minOccurs="0"/>
+    </xs:sequence>
+    <xs:attribute name="name" type="xs:string" use="required"/>
+    <xs:attribute name="type" type="tns:ControlTypeEnum" use="required"/>
+    <xs:attribute name="category" type="tns:ControlCategoryEnum" use="required"/>
+    <xs:attribute name="inherits" type="xs:string"/>
+  </xs:complexType>
+
+  <xs:simpleType name="ControlTypeEnum">
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="action"/>
+      <xs:enumeration value="input"/>
+      <xs:enumeration value="display"/>
+      <xs:enumeration value="container"/>
+      <xs:enumeration value="data"/>
+      <xs:enumeration value="navigation"/>
+      <xs:enumeration value="system"/>
+      <xs:enumeration value="dialog"/>
+    </xs:restriction>
+  </xs:simpleType>
+
+  <xs:simpleType name="ControlCategoryEnum">
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="basic"/>
+      <xs:enumeration value="input"/>
+      <xs:enumeration value="action"/>
+      <xs:enumeration value="layout"/>
+      <xs:enumeration value="data"/>
+      <xs:enumeration value="navigation"/>
+      <xs:enumeration value="composite"/>
+      <xs:enumeration value="windows-specific"/>
+      <xs:enumeration value="kde-specific"/>
+      <xs:enumeration value="web-specific"/>
+    </xs:restriction>
+  </xs:simpleType>
+
+  <!-- Constraints -->
+  <xs:complexType name="ConstraintsType">
+    <xs:sequence>
+      <xs:element name="allowed-parents" type="xs:string" minOccurs="0"/>
+      <xs:element name="allowed-children" type="xs:string" minOccurs="0"/>
+      <xs:element name="container" type="xs:boolean" minOccurs="0"/>
+      <xs:element name="max-children" type="xs:string" minOccurs="0"/>
+      <xs:element name="requires-structure" type="xs:string" minOccurs="0"/>
+      <xs:element name="required-slots" type="xs:string" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <!-- Attributes -->
+  <xs:complexType name="AttributesType">
+    <xs:sequence>
+      <xs:element name="attribute" type="tns:AttributeType" maxOccurs="unbounded"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="AttributeType">
+    <xs:attribute name="name" type="xs:string" use="required"/>
+    <xs:attribute name="type" type="tns:AttributeTypeEnum" use="required"/>
+    <xs:attribute name="default" type="xs:string"/>
+    <xs:attribute name="required" type="xs:boolean" default="false"/>
+    <xs:attribute name="min" type="xs:int"/>
+    <xs:attribute name="max" type="xs:int"/>
+    <xs:attribute name="values" type="xs:string"/>
+  </xs:complexType>
+
+  <xs:simpleType name="AttributeTypeEnum">
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="string"/>
+      <xs:enumeration value="int"/>
+      <xs:enumeration value="bool"/>
+      <xs:enumeration value="enum"/>
+      <xs:enumeration value="color"/>
+      <xs:enumeration value="date"/>
+      <xs:enumeration value="icon"/>
+      <xs:enumeration value="object"/>
+    </xs:restriction>
+  </xs:simpleType>
+
+  <!-- Behavior -->
+  <xs:complexType name="BehaviorType">
+    <xs:sequence>
+      <xs:element name="event" type="tns:EventType" maxOccurs="unbounded"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="EventType">
+    <xs:attribute name="name" type="xs:string" use="required"/>
+    <xs:attribute name="required" type="xs:boolean" default="false"/>
+    <xs:attribute name="handler-required" type="xs:boolean" default="false"/>
+    <xs:attribute name="bubbles" type="xs:boolean" default="false"/>
+    <xs:attribute name="parameters" type="xs:string"/>
+  </xs:complexType>
+
+  <!-- Control Structure -->
+  <xs:complexType name="ControlStructureType">
+    <xs:choice maxOccurs="unbounded">
+      <xs:element name="items" type="tns:ItemsType"/>
+      <xs:element name="menu-items" type="tns:MenuItemsType"/>
+      <xs:element name="columns" type="tns:ColumnsType"/>
+      <xs:element name="nodes" type="tns:NodesType"/>
+      <xs:element name="tabs" type="tns:TabsType"/>
+      <xs:element name="children" type="tns:ChildrenType"/>
+      <xs:element name="property-categories" type="tns:PropertyCategoriesType"/>
+      <xs:element name="context-menu" type="tns:ContextMenuType"/>
+      <xs:element name="central-widget" type="tns:CentralWidgetType"/>
+      <xs:element name="toolbars" type="tns:ToolbarsType"/>
+      <xs:element name="dock-widgets" type="tns:DockWidgetsType"/>
+    </xs:choice>
+  </xs:complexType>
+
+  <!-- Structure Components -->
+  <xs:complexType name="ItemsType">
+    <xs:sequence>
+      <xs:element name="item" type="tns:ItemType" maxOccurs="unbounded"/>
+    </xs:sequence>
+    <xs:attribute name="min-count" type="xs:int" default="0"/>
+    <xs:attribute name="max-count" type="xs:string" default="unlimited"/>
+  </xs:complexType>
+
+  <xs:complexType name="ItemType">
+    <xs:sequence>
+      <xs:element name="values" type="tns:ValuesType" minOccurs="0"/>
+    </xs:sequence>
+    <xs:attribute name="value" type="xs:string"/>
+    <xs:attribute name="text" type="xs:string"/>
+  </xs:complexType>
+
+  <xs:complexType name="ValuesType">
+    <xs:sequence>
+      <xs:element name="value" type="tns:ValueType" maxOccurs="unbounded"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="ValueType">
+    <xs:attribute name="column" type="xs:string" use="required"/>
+    <xs:attribute name="text" type="xs:string" use="required"/>
+  </xs:complexType>
+
+  <xs:complexType name="MenuItemsType">
+    <xs:sequence>
+      <xs:element name="menu-item" type="tns:MenuItemType" maxOccurs="unbounded"/>
+    </xs:sequence>
+    <xs:attribute name="min-count" type="xs:int" default="1"/>
+    <xs:attribute name="max-count" type="xs:string" default="unlimited"/>
+  </xs:complexType>
+
+  <xs:complexType name="MenuItemType">
+    <xs:attribute name="text" type="xs:string" use="required"/>
+    <xs:attribute name="action" type="xs:string"/>
+    <xs:attribute name="shortcut" type="xs:string"/>
+    <xs:attribute name="separator" type="xs:boolean" default="false"/>
+  </xs:complexType>
+
+  <xs:complexType name="ColumnsType">
+    <xs:sequence>
+      <xs:element name="column" type="tns:ColumnType" maxOccurs="unbounded"/>
+    </xs:sequence>
+    <xs:attribute name="min-count" type="xs:int" default="1"/>
+    <xs:attribute name="max-count" type="xs:int" default="20"/>
+  </xs:complexType>
+
+  <xs:complexType name="ColumnType">
+    <xs:attribute name="name" type="xs:string" use="required"/>
+    <xs:attribute name="text" type="xs:string" use="required"/>
+    <xs:attribute name="width" type="xs:string"/>
+    <xs:attribute name="sortable" type="xs:boolean" default="false"/>
+  </xs:complexType>
+
+  <xs:complexType name="NodesType">
+    <xs:sequence>
+      <xs:element name="node" type="tns:NodeType" maxOccurs="unbounded"/>
+    </xs:sequence>
+    <xs:attribute name="min-count" type="xs:int" default="0"/>
+    <xs:attribute name="max-count" type="xs:string" default="unlimited"/>
+    <xs:attribute name="max-depth" type="xs:int" default="10"/>
+  </xs:complexType>
+
+  <xs:complexType name="NodeType">
+    <xs:sequence>
+      <xs:element name="nodes" type="tns:NodesType" minOccurs="0"/>
+    </xs:sequence>
+    <xs:attribute name="text" type="xs:string" use="required"/>
+    <xs:attribute name="value" type="xs:string"/>
+    <xs:attribute name="expanded" type="xs:boolean" default="false"/>
+    <xs:attribute name="checked" type="xs:boolean" default="false"/>
+  </xs:complexType>
+
+  <xs:complexType name="TabsType">
+    <xs:sequence>
+      <xs:element name="tab" type="tns:TabType" maxOccurs="unbounded"/>
+    </xs:sequence>
+    <xs:attribute name="min-count" type="xs:int" default="1"/>
+    <xs:attribute name="max-count" type="xs:int" default="20"/>
+  </xs:complexType>
+
+  <xs:complexType name="TabType">
+    <xs:complexContent>
+      <xs:extension base="tns:ControlContentType">
+        <xs:attribute name="name" type="xs:string" use="required"/>
+        <xs:attribute name="text" type="xs:string" use="required"/>
+        <xs:attribute name="visible" type="xs:boolean" default="true"/>
+        <xs:attribute name="enabled" type="xs:boolean" default="true"/>
+      </xs:extension>
+    </xs:complexContent>
+  </xs:complexType>
+
+  <xs:complexType name="ChildrenType">
+    <xs:attribute name="allow-multiple" type="xs:boolean" default="true"/>
+  </xs:complexType>
+
+  <xs:complexType name="PropertyCategoriesType">
+    <xs:sequence>
+      <xs:element name="category" type="tns:PropertyCategoryType" maxOccurs="unbounded"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="PropertyCategoryType">
+    <xs:attribute name="name" type="xs:string" use="required"/>
+    <xs:attribute name="display-name" type="xs:string" use="required"/>
+    <xs:attribute name="expanded" type="xs:boolean" default="true"/>
+  </xs:complexType>
+
+  <xs:complexType name="ContextMenuType">
+    <!-- Context menu structure can be defined here -->
+  </xs:complexType>
+
+  <xs:complexType name="CentralWidgetType">
+    <xs:attribute name="required" type="xs:boolean" default="true"/>
+  </xs:complexType>
+
+  <xs:complexType name="ToolbarsType">
+    <xs:attribute name="max-count" type="xs:int" default="10"/>
+  </xs:complexType>
+
+  <xs:complexType name="DockWidgetsType">
+    <xs:attribute name="max-count" type="xs:int" default="20"/>
+  </xs:complexType>
+
+  <!-- Structure Definition -->
+  <xs:complexType name="StructureType">
+    <xs:sequence>
+      <xs:element name="description" type="xs:string" minOccurs="0"/>
+      <xs:element name="constraints" type="tns:ConstraintsType" minOccurs="0"/>
+      <xs:element name="attributes" type="tns:AttributesType" minOccurs="0"/>
+      <xs:element name="template" type="tns:TemplateType"/>
+    </xs:sequence>
+    <xs:attribute name="name" type="xs:string" use="required"/>
+    <xs:attribute name="type" type="xs:string" use="required"/>
+    <xs:attribute name="category" type="tns:ControlCategoryEnum" use="required"/>
+  </xs:complexType>
+
+  <!-- Wireframe Definition -->
+  <xs:complexType name="WireframeType">
+    <xs:sequence>
+      <xs:element name="description" type="xs:string" minOccurs="0"/>
+      <xs:element name="template" type="tns:TemplateType"/>
+    </xs:sequence>
+    <xs:attribute name="name" type="xs:string" use="required"/>
+    <xs:attribute name="type" type="xs:string" use="required"/>
+  </xs:complexType>
+
+  <!-- Template -->
+  <xs:complexType name="TemplateType">
+    <xs:complexContent>
+      <xs:extension base="tns:ControlContentType"/>
+    </xs:complexContent>
+  </xs:complexType>
+
+  <!-- Window Definition -->
+  <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"/>
+      <xs:choice>
+        <xs:element name="slot-overrides" type="tns:SlotOverridesType"/>
+        <xs:element name="wireframe-instance" type="tns:WireframeInstanceType"/>
+        <xs:group ref="tns:ControlContentGroup"/>
+      </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: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 (NEW) -->
+  <xs:complexType name="ViewPropertiesType">
+    <xs:sequence>
+      <xs:element name="role" type="tns: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>
+
+  <!-- Slot Overrides -->
+  <xs:complexType name="SlotOverridesType">
+    <xs:sequence>
+      <xs:element name="slot" type="tns:SlotOverrideType" maxOccurs="unbounded"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="SlotOverrideType">
+    <xs:complexContent>
+      <xs:extension base="tns:ControlContentType">
+        <xs:attribute name="name" type="xs:string" use="required"/>
+      </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>
+
+  <!-- Slot Definition -->
+  <xs:complexType name="SlotType">
+    <xs:complexContent>
+      <xs:extension base="tns:ControlContentType">
+        <xs:attribute name="name" type="xs:string" use="required"/>
+        <xs:attribute name="allowed-controls" type="xs:string"/>
+        <xs:attribute name="required" type="xs:boolean" default="false"/>
+        <xs:attribute name="default" type="xs:boolean" default="false"/>
+      </xs:extension>
+    </xs:complexContent>
+  </xs:complexType>
+
+  <!-- Control Content -->
+  <xs:complexType name="ControlContentType" mixed="true">
+    <xs:group ref="tns:ControlContentGroup" minOccurs="0" maxOccurs="unbounded"/>
+    <xs:anyAttribute processContents="lax"/>
+  </xs:complexType>
+
+  <xs:group name="ControlContentGroup">
+    <xs:choice>
+      <!-- Basic Controls -->
+      <xs:element name="Label" type="tns:ControlInstanceType"/>
+      <xs:element name="TextBox" type="tns:ControlInstanceType"/>
+      <xs:element name="ComboBox" type="tns:ControlInstanceType"/>
+      <xs:element name="Button" type="tns:ControlInstanceType"/>
+      <xs:element name="Panel" type="tns:ControlInstanceType"/>
+      <xs:element name="PopupPanel" type="tns:ControlInstanceType"/>
+      <xs:element name="Menu" type="tns:ControlInstanceType"/>
+      <xs:element name="ListView" type="tns:ControlInstanceType"/>
+      <xs:element name="TreeView" type="tns:ControlInstanceType"/>
+      <xs:element name="TabControl" type="tns:ControlInstanceType"/>
+      <xs:element name="ButtonBar" type="tns:ControlInstanceType"/>
+      
+      <!-- Windows-Specific Controls -->
+      <xs:element name="RichTextBox" type="tns:ControlInstanceType"/>
+      <xs:element name="PropertyGrid" type="tns:ControlInstanceType"/>
+      <xs:element name="NotifyIcon" type="tns:ControlInstanceType"/>
+      
+      <!-- KDE-Specific Controls -->
+      <xs:element name="KComboBox" type="tns:ControlInstanceType"/>
+      <xs:element name="KMainWindow" type="tns:ControlInstanceType"/>
+      <xs:element name="KFileDialog" type="tns:ControlInstanceType"/>
+      
+      <!-- Web-Specific Controls -->
+      <xs:element name="WebBrowser" type="tns:ControlInstanceType"/>
+      <xs:element name="DatePicker" type="tns:ControlInstanceType"/>
+      
+      <!-- Structure Elements -->
+      <xs:element name="FormField" type="tns:ControlInstanceType"/>
+      <xs:element name="slot" type="tns:SlotType"/>
+      <xs:element name="wireframe-instance" type="tns:WireframeInstanceType"/>
+    </xs:choice>
+  </xs:group>
+
+  <!-- Control Instance -->
+  <xs:complexType name="ControlInstanceType">
+    <xs:complexContent>
+      <xs:extension base="tns:ControlContentType">
+        <xs:attribute name="name" type="xs:string" use="required"/>
+        <xs:attribute name="slot" type="xs:string"/>
+      </xs:extension>
+    </xs:complexContent>
+  </xs:complexType>
+
+</xs:schema>