|
|
<?xml version="1.0"?>
|
|
|
<xs:schema xmlns="http://www.davinti.com.br/vitruvio/form" xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
|
|
targetNamespace="http://www.davinti.com.br/vitruvio/form"
|
|
|
elementFormDefault="qualified">
|
|
|
|
|
|
<!-- Parametros comuns nos Campos -->
|
|
|
<xs:include schemaLocation="vitruvio-form-common-attrs.xsd" />
|
|
|
|
|
|
<!-- Componentes padrao -->
|
|
|
<xs:include schemaLocation="vitruvio-form-basic-components.xsd" />
|
|
|
|
|
|
<!-- Componentes para uso com bancos de dados -->
|
|
|
<xs:include schemaLocation="vitruvio-form-db-components.xsd" />
|
|
|
|
|
|
<!-- Componentes especificos ao contexto da aplicacao -->
|
|
|
<xs:include schemaLocation="vitruvio-form-specific-components.xsd" />
|
|
|
|
|
|
<!-- Form containers -->
|
|
|
<xs:include schemaLocation="vitruvio-form-containers.xsd" />
|
|
|
|
|
|
<!-- Scripting defs -->
|
|
|
<xs:include schemaLocation="vitruvio-form-scripting.xsd" />
|
|
|
|
|
|
<!-- Suporte a widgets -->
|
|
|
<xs:include schemaLocation="vitruvio-form-widgets.xsd" />
|
|
|
|
|
|
|
|
|
<!-- Base Form para implementacoes especificas -->
|
|
|
<xs:complexType name="vitruvio-base-form">
|
|
|
<xs:sequence>
|
|
|
<xs:element name="name" type="xs:string" minOccurs="0" maxOccurs="1" />
|
|
|
<xs:element name="description" type="xs:string" minOccurs="0" maxOccurs="1" />
|
|
|
</xs:sequence>
|
|
|
<xs:attribute name="formKey" type="xs:string" use="required" />
|
|
|
<xs:attribute name="width" type="xs:string" />
|
|
|
<xs:attribute name="height" type="xs:string" />
|
|
|
<xs:attribute name="windowWidth" type="xs:string" />
|
|
|
<xs:attribute name="windowHeight" type="xs:string" />
|
|
|
<xs:attribute name="backgroundColor" type="xs:string" />
|
|
|
<xs:attribute name="customCss" type="xs:string" />
|
|
|
<xs:attribute name="debugMode">
|
|
|
<xs:simpleType>
|
|
|
<xs:restriction base="xs:string">
|
|
|
<xs:enumeration value="OFF" />
|
|
|
<xs:enumeration value="ALL" />
|
|
|
<xs:enumeration value="RENDER" />
|
|
|
<xs:enumeration value="INIT_SCRIPTS" />
|
|
|
<xs:enumeration value="FORM_LOAD" />
|
|
|
</xs:restriction>
|
|
|
</xs:simpleType>
|
|
|
</xs:attribute>
|
|
|
<xs:attribute name="debugOutput">
|
|
|
<xs:simpleType>
|
|
|
<xs:restriction base="xs:string">
|
|
|
<xs:enumeration value="UI_MESSAGEBOX" />
|
|
|
<xs:enumeration value="UI_DEBUG" />
|
|
|
<xs:enumeration value="DATABASE" />
|
|
|
</xs:restriction>
|
|
|
</xs:simpleType>
|
|
|
</xs:attribute>
|
|
|
<xs:attribute name="debugFormat">
|
|
|
<xs:simpleType>
|
|
|
<xs:restriction base="xs:string">
|
|
|
<xs:enumeration value="HTML" />
|
|
|
<xs:enumeration value="FORMATED_TEXT" />
|
|
|
</xs:restriction>
|
|
|
</xs:simpleType>
|
|
|
</xs:attribute>
|
|
|
</xs:complexType>
|
|
|
|
|
|
<!-- Subformularios que podem ser anexados dentro de Forms RAIZ (ROOT) -->
|
|
|
<xs:complexType name="vitruvio-subform">
|
|
|
<xs:complexContent>
|
|
|
<xs:extension base="vitruvio-base-form">
|
|
|
<xs:sequence>
|
|
|
<xs:element name="afterFormRenderScript" type="script" minOccurs="0" maxOccurs="1" />
|
|
|
<xs:element name="preInitScript" type="script" minOccurs="0" maxOccurs="1" />
|
|
|
<xs:element name="initScript" type="script" minOccurs="0" maxOccurs="1" />
|
|
|
<xs:element name="validators" minOccurs="0" maxOccurs="1">
|
|
|
<xs:complexType>
|
|
|
<xs:sequence minOccurs="1" maxOccurs="unbounded">
|
|
|
<xs:choice>
|
|
|
<xs:element name="ScriptValidator" type="form-validation-script" />
|
|
|
</xs:choice>
|
|
|
</xs:sequence>
|
|
|
</xs:complexType>
|
|
|
</xs:element>
|
|
|
<xs:element name="ItemList">
|
|
|
<xs:complexType>
|
|
|
<xs:sequence minOccurs="1" maxOccurs="unbounded">
|
|
|
<xs:element name="property">
|
|
|
<xs:complexType>
|
|
|
<xs:attribute name="id" use="required" type="xs:string" />
|
|
|
<xs:attribute name="caption" type="xs:string" />
|
|
|
<xs:attribute name="expand-ratio" type="xs:float" />
|
|
|
<xs:attribute name="useCaptionValue" type="xs:boolean" />
|
|
|
<xs:attribute name="format" type="xs:string" />
|
|
|
<xs:attribute name="decimalSeparator" type="xs:string" />
|
|
|
<xs:attribute name="groupingSeparator" type="xs:string" />
|
|
|
</xs:complexType>
|
|
|
</xs:element>
|
|
|
</xs:sequence>
|
|
|
<xs:attribute name="caption" type="xs:string" />
|
|
|
<xs:attribute name="description" type="xs:string" />
|
|
|
<xs:attribute name="width" type="xs:string" />
|
|
|
<xs:attribute name="height" type="xs:string" />
|
|
|
<xs:attribute name="addItemButtonCaption" type="xs:string" />
|
|
|
<xs:attribute name="removeItemConfirmationMessage" type="xs:string" />
|
|
|
<xs:attribute name="deleteItemRule">
|
|
|
<xs:simpleType>
|
|
|
<xs:restriction base="xs:string">
|
|
|
<xs:enumeration value="ALL_WHILE_ACTIVE" />
|
|
|
<xs:enumeration value="OWNER" />
|
|
|
<xs:enumeration value="NONE" />
|
|
|
</xs:restriction>
|
|
|
</xs:simpleType>
|
|
|
</xs:attribute>
|
|
|
<xs:attribute name="rows" type="xs:positiveInteger" />
|
|
|
<xs:attribute name="minItens" type="xs:positiveInteger" />
|
|
|
<xs:attribute name="maxItens" type="xs:positiveInteger" />
|
|
|
</xs:complexType>
|
|
|
</xs:element>
|
|
|
<xs:element name="components" minOccurs="0" maxOccurs="1">
|
|
|
<xs:complexType>
|
|
|
<xs:sequence minOccurs="1" maxOccurs="unbounded">
|
|
|
<xs:choice minOccurs="1" maxOccurs="unbounded">
|
|
|
<xs:element name="VerticalLayout" type="VerticalLayout" />
|
|
|
<xs:element name="HorizontalLayout" type="HorizontalLayout" />
|
|
|
<xs:element name="Panel" type="Panel" />
|
|
|
<xs:element name="TabLayout" type="TabLayout" />
|
|
|
</xs:choice>
|
|
|
</xs:sequence>
|
|
|
</xs:complexType>
|
|
|
</xs:element>
|
|
|
<xs:element name="events" minOccurs="0" maxOccurs="1">
|
|
|
<xs:complexType>
|
|
|
<xs:sequence>
|
|
|
<xs:element name="crud">
|
|
|
<xs:complexType>
|
|
|
<xs:sequence minOccurs="1" maxOccurs="1">
|
|
|
<xs:element name="script" type="script" maxOccurs="1" minOccurs="1" />
|
|
|
</xs:sequence>
|
|
|
<xs:attribute name="allowedEvents" type="xs:string" />
|
|
|
</xs:complexType>
|
|
|
</xs:element>
|
|
|
</xs:sequence>
|
|
|
</xs:complexType>
|
|
|
</xs:element>
|
|
|
</xs:sequence>
|
|
|
</xs:extension>
|
|
|
</xs:complexContent>
|
|
|
</xs:complexType>
|
|
|
|
|
|
|
|
|
<!-- Extensao dos containers de layout padrao para inclusao de subforms especiais -->
|
|
|
<!-- Grupo de layouts -->
|
|
|
<xs:group name="FormLayoutGroup">
|
|
|
<xs:choice>
|
|
|
<!-- Elementos visuais e containers -->
|
|
|
<xs:element name="VerticalLayout" type="SubFormVerticalLayout" />
|
|
|
<xs:element name="HorizontalLayout" type="SubFormHorizontalLayout" />
|
|
|
<xs:element name="Panel" type="SubFormPanel" />
|
|
|
<xs:element name="TabLayout" type="SubFormTabLayout" />
|
|
|
<xs:element name="AbsoluteLayout" type="SubFormAbsoluteLayout" />
|
|
|
<xs:element name="ComplexPanel" type="ComplexPanel" />
|
|
|
<xs:element name="CrudPanel" type="CrudPanel" />
|
|
|
<xs:element name="LegendInfo" type="LegendInfo" />
|
|
|
<xs:element name="Section" type="CrudSession" />
|
|
|
<xs:element name="WindowLayout" type="SubFormWindowLayout" />
|
|
|
</xs:choice>
|
|
|
</xs:group>
|
|
|
|
|
|
<!-- Definicao de elementos possiveis por padrao num container de componentes -->
|
|
|
<xs:group name="FormComponentContainer">
|
|
|
<xs:choice>
|
|
|
<!-- Layouts -->
|
|
|
<xs:group ref="FormLayoutGroup" />
|
|
|
<xs:element name="PopupButtonLayout" type="SubFormPopupButtonLayout" />
|
|
|
|
|
|
<!-- Subforms -->
|
|
|
<xs:element name="SubForm" type="vitruvio-subform" minOccurs="0" maxOccurs="unbounded" />
|
|
|
|
|
|
<!-- Componentes reutilizaveis da biblioteca -->
|
|
|
<xs:element name="ComplexComponent" type="LibraryComplexComponent" />
|
|
|
<xs:element name="FieldComponent" type="LibraryFieldComponent" />
|
|
|
|
|
|
<!-- Suporte a definicao de widgets -->
|
|
|
<xs:group ref="CoreWidgets" />
|
|
|
<xs:element name="CustomWidget" type="CustomWidget" />
|
|
|
|
|
|
<!-- Campos -->
|
|
|
<xs:group ref="fieldGroup" />
|
|
|
</xs:choice>
|
|
|
</xs:group>
|
|
|
|
|
|
<xs:complexType name="SubFormVerticalLayout">
|
|
|
<xs:sequence>
|
|
|
<xs:group ref="FormComponentContainer" minOccurs="0" maxOccurs="unbounded"/>
|
|
|
</xs:sequence>
|
|
|
<xs:attributeGroup ref="layoutMandatoryAttr"/>
|
|
|
<xs:attributeGroup ref="orderedLayoutAttr"/>
|
|
|
</xs:complexType>
|
|
|
<xs:complexType name="SubFormHorizontalLayout">
|
|
|
<xs:sequence>
|
|
|
<xs:group ref="FormComponentContainer" minOccurs="0" maxOccurs="unbounded"/>
|
|
|
</xs:sequence>
|
|
|
<xs:attributeGroup ref="layoutMandatoryAttr"/>
|
|
|
<xs:attributeGroup ref="orderedLayoutAttr"/>
|
|
|
</xs:complexType>
|
|
|
|
|
|
<xs:complexType name="SubFormAbsoluteLayout">
|
|
|
<xs:complexContent>
|
|
|
<xs:extension base="AbsoluteBaseLayout">
|
|
|
<xs:sequence>
|
|
|
<xs:group ref="FormComponentContainer" minOccurs="0" maxOccurs="unbounded"/>
|
|
|
</xs:sequence>
|
|
|
</xs:extension>
|
|
|
</xs:complexContent>
|
|
|
</xs:complexType>
|
|
|
|
|
|
<xs:complexType name="SubFormWindowLayout">
|
|
|
<xs:sequence>
|
|
|
<xs:choice minOccurs="1" maxOccurs="1">
|
|
|
<xs:element name="VerticalLayout" type="SubFormVerticalLayout" />
|
|
|
<xs:element name="HorizontalLayout" type="SubFormHorizontalLayout" />
|
|
|
<xs:element name="AbsoluteLayout" type="SubFormAbsoluteLayout" />
|
|
|
<xs:element name="TabLayout" type="SubFormTabLayout" />
|
|
|
<xs:element name="CrudPanel" type="CrudPanel" />
|
|
|
<xs:element name="Section" type="CrudSession" />
|
|
|
</xs:choice>
|
|
|
<xs:element name="Config" minOccurs="0" maxOccurs="1">
|
|
|
<xs:complexType>
|
|
|
<xs:sequence>
|
|
|
<xs:element name="ControlButton" minOccurs="0" maxOccurs="1">
|
|
|
<xs:complexType>
|
|
|
<xs:sequence>
|
|
|
<xs:element name="onClickScript" type="script" minOccurs="1" maxOccurs="1" />
|
|
|
</xs:sequence>
|
|
|
<xs:attributeGroup ref="basicElement" />
|
|
|
<xs:attributeGroup ref="formButtonAttrs" />
|
|
|
</xs:complexType>
|
|
|
</xs:element>
|
|
|
<xs:element name="onChangeVisibilityScript" type="script" minOccurs="0" maxOccurs="1" />
|
|
|
</xs:sequence>
|
|
|
</xs:complexType>
|
|
|
</xs:element>
|
|
|
</xs:sequence>
|
|
|
|
|
|
<xs:attribute name="windowWidth" type="xs:string" />
|
|
|
<xs:attribute name="windowHeight" type="xs:string" />
|
|
|
<xs:attribute name="windowTitle" type="xs:string" />
|
|
|
<xs:attribute name="windowClosable" type="xs:boolean" />
|
|
|
<xs:attribute name="windowResizable" type="xs:boolean" />
|
|
|
<xs:attribute name="windowModal" type="xs:boolean" />
|
|
|
|
|
|
<xs:attributeGroup ref="layoutMandatoryAttr"/>
|
|
|
</xs:complexType>
|
|
|
|
|
|
<!-- SubformEnabled PopupButton -->
|
|
|
<xs:complexType name="SubFormPopupButtonLayout">
|
|
|
<xs:complexContent>
|
|
|
<xs:extension base="PopupButtonBaseLayout">
|
|
|
<xs:sequence>
|
|
|
<xs:choice minOccurs="1" maxOccurs="1">
|
|
|
<xs:element name="VerticalLayout" type="SubFormVerticalLayout" />
|
|
|
<xs:element name="HorizontalLayout" type="SubFormHorizontalLayout" />
|
|
|
<xs:element name="AbsoluteLayout" type="SubFormAbsoluteLayout" />
|
|
|
<xs:element name="TabLayout" type="SubFormTabLayout" />
|
|
|
</xs:choice>
|
|
|
<xs:element name="Template" minOccurs="0" maxOccurs="1">
|
|
|
<xs:complexType>
|
|
|
<xs:choice>
|
|
|
<xs:element name="Filter" type="PopupButtonLayoutFilterTemplate" />
|
|
|
</xs:choice>
|
|
|
</xs:complexType>
|
|
|
</xs:element>
|
|
|
</xs:sequence>
|
|
|
</xs:extension>
|
|
|
</xs:complexContent>
|
|
|
</xs:complexType>
|
|
|
|
|
|
<!-- Tabs -->
|
|
|
<xs:complexType name="SubFormTabComponent">
|
|
|
<xs:sequence>
|
|
|
<xs:group ref="FormComponentContainer" minOccurs="1" maxOccurs="1"/>
|
|
|
</xs:sequence>
|
|
|
<xs:attribute name="caption" type="xs:string" use="required" />
|
|
|
<xs:attribute name="visible" type="xs:boolean" />
|
|
|
</xs:complexType>
|
|
|
<xs:complexType name="SubFormTabLayout">
|
|
|
<xs:sequence>
|
|
|
<xs:element name="TabChangeScript" type="script" minOccurs="0" maxOccurs="1" />
|
|
|
<xs:element name="Tab" type="SubFormTabComponent" minOccurs="1" maxOccurs="unbounded" />
|
|
|
</xs:sequence>
|
|
|
<xs:attribute name="framed" type="xs:boolean" />
|
|
|
<xs:attribute name="compact" type="xs:boolean" />
|
|
|
<xs:attribute name="centerTabs" type="xs:boolean" />
|
|
|
<xs:attribute name="width" type="xs:string" />
|
|
|
<xs:attribute name="height" type="xs:string" />
|
|
|
<xs:attributeGroup ref="layoutMandatoryAttr"/>
|
|
|
</xs:complexType>
|
|
|
|
|
|
<xs:complexType name="SubFormPanel">
|
|
|
<xs:complexContent>
|
|
|
<xs:extension base="BasePanel">
|
|
|
<xs:choice minOccurs="1" maxOccurs="1">
|
|
|
<xs:element name="VerticalLayout" type="SubFormVerticalLayout" />
|
|
|
<xs:element name="HorizontalLayout" type="SubFormHorizontalLayout" />
|
|
|
<xs:element name="TabLayout" type="SubFormTabLayout" />
|
|
|
<xs:element name="AbsoluteLayout" type="SubFormAbsoluteLayout" />
|
|
|
<xs:element name="CrudPanel" type="CrudPanel" />
|
|
|
<xs:element name="Section" type="CrudSession" />
|
|
|
</xs:choice>
|
|
|
</xs:extension>
|
|
|
</xs:complexContent>
|
|
|
</xs:complexType>
|
|
|
|
|
|
<xs:complexType name="SubFormScrollPanel">
|
|
|
<xs:choice minOccurs="1" maxOccurs="1">
|
|
|
<xs:element name="VerticalLayout" type="SubFormVerticalLayout" />
|
|
|
<xs:element name="HorizontalLayout" type="SubFormHorizontalLayout" />
|
|
|
<xs:element name="TabLayout" type="SubFormTabLayout" />
|
|
|
<xs:element name="AbsoluteLayout" type="SubFormAbsoluteLayout" />
|
|
|
</xs:choice>
|
|
|
<xs:attribute name="id" type="xs:string" />
|
|
|
<xs:attribute name="width" type="xs:string" />
|
|
|
<xs:attribute name="height" type="xs:string" />
|
|
|
<xs:attribute name="expandRatio" type="xs:decimal" />
|
|
|
<xs:attribute name="visible" type="xs:boolean" />
|
|
|
<xs:attribute name="backgroundColor" type="xs:string" use="optional" />
|
|
|
</xs:complexType>
|
|
|
|
|
|
<xs:complexType name="user-list">
|
|
|
<xs:sequence minOccurs="1" maxOccurs="unbounded">
|
|
|
<xs:element name="user" type="xs:string" minOccurs="1" maxOccurs="unbounded" />
|
|
|
</xs:sequence>
|
|
|
</xs:complexType>
|
|
|
|
|
|
<xs:complexType name="role-list">
|
|
|
<xs:sequence minOccurs="1" maxOccurs="unbounded">
|
|
|
<xs:element name="role" type="xs:string" minOccurs="1" maxOccurs="unbounded" />
|
|
|
</xs:sequence>
|
|
|
</xs:complexType>
|
|
|
|
|
|
<!-- Componente de Form ROOT -->
|
|
|
<xs:complexType name="vitruvio-subform-enabled-form">
|
|
|
<xs:complexContent>
|
|
|
<xs:extension base="vitruvio-base-form">
|
|
|
<xs:sequence>
|
|
|
<xs:element name="accessControl" minOccurs="0" maxOccurs="1">
|
|
|
<xs:complexType>
|
|
|
<xs:choice>
|
|
|
<xs:element name="AuthorizationScript" type="script" />
|
|
|
</xs:choice>
|
|
|
</xs:complexType>
|
|
|
</xs:element>
|
|
|
<xs:element name="historicAcessControl" minOccurs="0" maxOccurs="1">
|
|
|
<xs:complexType>
|
|
|
<xs:sequence>
|
|
|
<xs:element name="Allow" minOccurs="0" maxOccurs="1">
|
|
|
<xs:complexType>
|
|
|
<xs:sequence>
|
|
|
<xs:element name="Users" type="user-list" minOccurs="0" maxOccurs="1" />
|
|
|
<xs:element name="Roles" type="role-list" minOccurs="0" maxOccurs="1" />
|
|
|
</xs:sequence>
|
|
|
</xs:complexType>
|
|
|
</xs:element>
|
|
|
<xs:element name="Deny" minOccurs="0" maxOccurs="1">
|
|
|
<xs:complexType>
|
|
|
<xs:sequence>
|
|
|
<xs:element name="Users" type="user-list" minOccurs="0" maxOccurs="1" />
|
|
|
<xs:element name="Roles" type="role-list" minOccurs="0" maxOccurs="1" />
|
|
|
</xs:sequence>
|
|
|
</xs:complexType>
|
|
|
</xs:element>
|
|
|
</xs:sequence>
|
|
|
</xs:complexType>
|
|
|
</xs:element>
|
|
|
<xs:element name="afterFormRenderScript" type="script" minOccurs="0" maxOccurs="1" />
|
|
|
<xs:element name="preInitScript" type="script" minOccurs="0" maxOccurs="1" />
|
|
|
<xs:element name="initScript" type="script" minOccurs="0" maxOccurs="1" />
|
|
|
<xs:element name="persistScript" type="script" minOccurs="0" maxOccurs="1" />
|
|
|
<xs:element name="validators" minOccurs="0" maxOccurs="1">
|
|
|
<xs:complexType>
|
|
|
<xs:sequence minOccurs="0" maxOccurs="unbounded">
|
|
|
<xs:choice>
|
|
|
<xs:element name="ScriptValidator" type="form-validation-script" />
|
|
|
</xs:choice>
|
|
|
</xs:sequence>
|
|
|
<xs:attribute name="ignoreEmptyFieldsOnSave" type="xs:boolean" />
|
|
|
</xs:complexType>
|
|
|
</xs:element>
|
|
|
<xs:element name="attachments" type="FormAttachments" minOccurs="0" maxOccurs="1" />
|
|
|
<xs:element name="components" minOccurs="0" maxOccurs="1">
|
|
|
<xs:complexType>
|
|
|
<xs:sequence minOccurs="1" maxOccurs="unbounded">
|
|
|
<xs:choice minOccurs="1" maxOccurs="unbounded">
|
|
|
<xs:element name="VerticalLayout" type="SubFormVerticalLayout" />
|
|
|
<xs:element name="HorizontalLayout" type="SubFormHorizontalLayout" />
|
|
|
<xs:element name="Panel" type="SubFormPanel" />
|
|
|
<xs:element name="TabLayout" type="SubFormTabLayout" />
|
|
|
<xs:element name="ScrollPanel" type="SubFormScrollPanel" />
|
|
|
</xs:choice>
|
|
|
</xs:sequence>
|
|
|
</xs:complexType>
|
|
|
</xs:element>
|
|
|
</xs:sequence>
|
|
|
</xs:extension>
|
|
|
</xs:complexContent>
|
|
|
</xs:complexType>
|
|
|
|
|
|
</xs:schema>
|