A Schema for XForms

<!-- edited with XML Spy v4.0.1 U (http://www.xmlspy.com) by Micah Dubinko (XForms WG)  -->
<!--$Id: sliceA.html,v 1.3 2002/08/21 14:00:57 henri Exp $-->
<xsd:schema xmlns:xforms="http://www.w3.org/2002/08/xforms/cr" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ev="http://www.w3.org/2001/xml-events" targetNamespace="http://www.w3.org/2002/08/xforms/cr" elementFormDefault="qualified">
  
<!--

15-Aug MJD minimal content model on <help><hint><alert><label>
14-Aug MJD added <rebuild> element
13-Aug MJD added <copy> element (instead of overloading <value>), added to content model of <itemset>
12-Aug MJD moved schema attribute (now list) to <mode>
30-Jul MJD removed @default from <switch>
30-Jul MJD <bind> has @nodeset, not @ref
30-Jul MJD <model> content model has actionGroup, not <action>
30-Jul MJD fixed content model for optionalUIChildren
30-Jul MJD put back <repeat> element (oops), fixed related content models
09-Jul MJD changed attribute on <setfocus> from 'idref' to 'control'
09-Jul MJD added separator attribute to <submission>
21-Jun MJD (typo fix) added common UI attributes to <submit>
19-Jun MJD replace #any content models with explicit allowed content for <group>, <case>, <help>, <hint>, <alert>
19-Jun MJD allow any number of <instance> and <xsd:schema> children under <model>
19-Jun MJD directly use <xsd:schema> element (removing xforms <schema>), schema attribute on <instance>
19-Jun MJD added 'put', 'form-data-post', and 'urlencoded-post' values to <submission method="...">
19-Jun MJD added bindFirst attributes to <trigger>
19-Jun MJD renamed <button> to <trigger>
19-Jun MJD removed <script>
19-Jun MJD made 'appearance' open ended with 'minimal', 'compact', and 'full', and on all form controls; in commonUI
14-May MJD added dayTimeDuration and yearMonthDuration datatypes
8-May MJD added <label> as child of <output>
19-Mar MJD Fixed ref of xml:lang
19-Mar MJD added minOccurs=0 to <schema> and <instance>
02-Apr MJD renamed horzAttrs -> commonAttrs
02-Apr MJD removed xlink schema dependency (now 'src' attribute)
02-Apr MJD attributes and elements renamed for consistentlowercase (See change log for specifics)
02-Apr MJD removed mediaTypeExtension
02-Apr MJD added <filename> and <mediatype> as optional children of <upload>
02-Apr MJD added 'incremental' attribute (w/ defaults) to appropriate form controls
02-Apr MJD removed references to attributes 'class' and 'xml:lang' - to be required of host language
01-Mar MJD added 'model' attribute to <refresh><revalidate><recalculate>
-->
  
<!--
Open Issues

Need a datatype for 'list of mediatypes' on mediatype of <upload>
-->
  
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd">
    
<xsd:annotation>
      
<xsd:documentation>Get access to xml:lang and friends</xsd:documentation>
    
</xsd:annotation>
  
</xsd:import>
  
<xsd:import namespace="http://www.w3.org/2001/xml-events" schemaLocation="XML-Events-Schema.xsd" />
  
<xsd:import namespace="http://www.w3.org/2001/XMLSchema" schemaLocation="http://www.w3.org/2001/XMLSchema.xsd" />
  
<!-- 
structural elements
-->
  
<xsd:attributeGroup name="commonAttrs">
    
<xsd:annotation>
      
<xsd:documentation>Attributes for _every_ element in XForms</xsd:documentation>
    
</xsd:annotation>
    
<xsd:anyAttribute namespace="##other" />
  
</xsd:attributeGroup>
  
<xsd:element name="model">
    
<xsd:complexType>
      
<xsd:sequence minOccurs="0" maxOccurs="unbounded">
        
<xsd:choice>
          
<xsd:element ref="xforms:instance" />
          
<xsd:element ref="xsd:schema" />
          
<xsd:element ref="xforms:submission" />
          
<xsd:element ref="xforms:bind" />
          
<xsd:group ref="xforms:actionGroup" />
          
<xsd:element ref="xforms:extension" />
        
</xsd:choice>
      
</xsd:sequence>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attribute name="id" type="xsd:ID" use="optional" />
      
<xsd:attribute name="functions" type="xforms:QNameList" use="optional" />
      
<xsd:attribute name="schema" type="xforms:anyURIList" use="optional" />
    
</xsd:complexType>
  
</xsd:element>
  
<xsd:element name="instance">
    
<xsd:annotation>
      
<xsd:documentation>instance container.</xsd:documentation>
    
</xsd:annotation>
    
<xsd:complexType>
      
<xsd:sequence>
        
<xsd:any namespace="##any" processContents="skip" minOccurs="0" maxOccurs="unbounded" />
      
</xsd:sequence>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attribute name="id" type="xsd:ID" use="optional" />
      
<xsd:attributeGroup ref="xforms:linkingAttributes" />
    
</xsd:complexType>
  
</xsd:element>
  
<xsd:element name="submission">
    
<xsd:annotation>
      
<xsd:documentation>submit info container.</xsd:documentation>
    
</xsd:annotation>
    
<xsd:complexType>
      
<xsd:sequence minOccurs="0" maxOccurs="unbounded">
        
<xsd:group ref="xforms:actionGroup" />
      
</xsd:sequence>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attributeGroup ref="xforms:bindFirstAttributes" />
      
<xsd:attribute name="id" type="xsd:ID" use="optional" />
      
<xsd:attribute name="action" type="xsd:anyURI" use="optional" />
      
<xsd:attribute name="method" use="required">
        
<xsd:simpleType>
          
<xsd:union memberTypes="xforms:QNameButNotNCNAME">
            
<xsd:simpleType>
              
<xsd:restriction base="xsd:string">
                
<xsd:enumeration value="post" />
                
<xsd:enumeration value="put" />
                
<xsd:enumeration value="get" />
                
<xsd:enumeration value="form-data-post" />
                
<xsd:enumeration value="urlencoded-post" />
              
</xsd:restriction>
            
</xsd:simpleType>
          
</xsd:union>
        
</xsd:simpleType>
      
</xsd:attribute>
      
<xsd:attribute name="version" type="xsd:NMTOKEN" use="optional" />
      
<xsd:attribute name="indent" type="xsd:boolean" use="optional" />
      
<xsd:attribute name="encoding" type="xsd:string" use="optional" />
      
<xsd:attribute name="mediatype" type="xsd:string" use="optional" />
      
<xsd:attribute name="omit-xml-declaration" type="xsd:boolean" use="optional" />
      
<xsd:attribute name="standalone" type="xsd:boolean" use="optional" />
      
<xsd:attribute name="cdata-section-elements" type="xforms:QNameList" use="optional" />
      
<xsd:attribute name="replace" use="optional" default="all">
        
<xsd:simpleType>
          
<xsd:union memberTypes="xforms:QNameButNotNCNAME">
            
<xsd:simpleType>
              
<xsd:restriction base="xsd:string">
                
<xsd:enumeration value="all" />
                
<xsd:enumeration value="instance" />
                
<xsd:enumeration value="none" />
              
</xsd:restriction>
            
</xsd:simpleType>
          
</xsd:union>
        
</xsd:simpleType>
      
</xsd:attribute>
      
<xsd:attribute name="separator" use="optional" default=";">
        
<xsd:simpleType>
          
<xsd:restriction base="xsd:string">
            
<xsd:enumeration value=";" />
            
<xsd:enumeration value="&amp;" />
          
</xsd:restriction>
        
</xsd:simpleType>
      
</xsd:attribute>
    
</xsd:complexType>
  
</xsd:element>
  
<xsd:attributeGroup name="linkingAttributes">
    
<xsd:attribute name="src" type="xsd:anyURI" />
  
</xsd:attributeGroup>
  
<xsd:element name="bind">
    
<xsd:annotation>
      
<xsd:documentation>Definition of bind container.</xsd:documentation>
    
</xsd:annotation>
    
<xsd:complexType>
      
<xsd:sequence minOccurs="0" maxOccurs="unbounded">
        
<xsd:element ref="xforms:bind" />
      
</xsd:sequence>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attribute name="id" type="xsd:ID" use="optional" />
      
<xsd:attribute name="nodeset" type="xsd:string" use="optional" />
      
<xsd:attribute name="type" type="xsd:QName" use="optional" />
      
<xsd:attribute name="readonly" type="xsd:string" use="optional" />
      
<xsd:attribute name="required" type="xsd:string" use="optional" />
      
<xsd:attribute name="relevant" type="xsd:string" use="optional" />
      
<xsd:attribute name="constraint" type="xsd:string" use="optional" />
      
<xsd:attribute name="calculate" type="xsd:string" use="optional" />
      
<xsd:attribute name="maxOccurs" use="optional">
        
<xsd:simpleType>
          
<xsd:union memberTypes="xsd:nonNegativeInteger">
            
<xsd:simpleType>
              
<xsd:restriction base="xsd:string">
                
<xsd:enumeration value="unbounded" />
              
</xsd:restriction>
            
</xsd:simpleType>
          
</xsd:union>
        
</xsd:simpleType>
      
</xsd:attribute>
      
<xsd:attribute name="minOccurs" type="xsd:nonNegativeInteger" use="optional" />
      
<xsd:attribute name="p3ptype" type="xsd:string" use="optional" />
    
</xsd:complexType>
  
</xsd:element>
  
<!--
User Interface form controls
-->
  
<xsd:group name="formControls">
    
<xsd:choice>
      
<xsd:element ref="xforms:input" />
      
<xsd:element ref="xforms:textarea" />
      
<xsd:element ref="xforms:secret" />
      
<xsd:element ref="xforms:output" />
      
<xsd:element ref="xforms:upload" />
      
<xsd:element ref="xforms:select1" />
      
<xsd:element ref="xforms:select" />
      
<xsd:element ref="xforms:range" />
      
<xsd:element ref="xforms:submit" />
      
<xsd:element ref="xforms:trigger" />
    
</xsd:choice>
  
</xsd:group>
  
<xsd:attributeGroup name="bindFirstAttributes">
    
<xsd:attribute name="model" type="xsd:IDREF" use="optional" />
    
<xsd:attribute name="ref" type="xsd:string" use="optional" />
    
<xsd:attribute name="bind" type="xsd:IDREF" use="optional" />
  
</xsd:attributeGroup>
  
<xsd:attributeGroup name="bindAllAttributes">
    
<xsd:attribute name="model" type="xsd:IDREF" use="optional" />
    
<xsd:attribute name="nodeset" type="xsd:string" use="optional" />
    
<xsd:attribute name="bind" type="xsd:IDREF" use="optional" />
  
</xsd:attributeGroup>
  
<xsd:attributeGroup name="commonUIAttributes">
    
<xsd:attribute name="accesskey" type="xsd:string" use="optional" />
    
<xsd:attribute name="navindex" type="xsd:nonNegativeInteger" use="optional" />
    
<xsd:attribute name="appearance" type="xforms:appearanceType" use="optional" />
  
</xsd:attributeGroup>
  
<xsd:element name="label">
    
<xsd:complexType mixed="true">
      
<xsd:sequence minOccurs="0" maxOccurs="unbounded">
        
<xsd:choice>
          
<xsd:element ref="xforms:output" />
          
<!-- containing document language to add additional allowed content here  -->
        
</xsd:choice>
      
</xsd:sequence>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attribute name="id" type="xsd:ID" use="optional" />
      
<xsd:attributeGroup ref="xforms:bindFirstAttributes" />
      
<xsd:attributeGroup ref="xforms:commonUIAttributes" />
      
<xsd:attributeGroup ref="xforms:linkingAttributes" />
    
</xsd:complexType>
  
</xsd:element>
  
<xsd:element name="hint">
    
<xsd:complexType mixed="true">
      
<xsd:sequence minOccurs="0" maxOccurs="unbounded">
        
<xsd:choice>
          
<xsd:element ref="xforms:output" />
          
<!-- containing document language to add additional allowed content here  -->
        
</xsd:choice>
      
</xsd:sequence>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attribute name="id" type="xsd:ID" use="optional" />
      
<xsd:attributeGroup ref="xforms:bindFirstAttributes" />
      
<xsd:attributeGroup ref="xforms:commonUIAttributes" />
      
<xsd:attributeGroup ref="xforms:linkingAttributes" />
    
</xsd:complexType>
  
</xsd:element>
  
<xsd:element name="help">
    
<xsd:complexType mixed="true">
      
<xsd:sequence minOccurs="0" maxOccurs="unbounded">
        
<xsd:choice>
          
<xsd:element ref="xforms:output" />
          
<!-- containing document language to add additional allowed content here  -->
        
</xsd:choice>
      
</xsd:sequence>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attribute name="id" type="xsd:ID" use="optional" />
      
<xsd:attributeGroup ref="xforms:bindFirstAttributes" />
      
<xsd:attributeGroup ref="xforms:commonUIAttributes" />
      
<xsd:attributeGroup ref="xforms:linkingAttributes" />
    
</xsd:complexType>
  
</xsd:element>
  
<xsd:element name="alert">
    
<xsd:complexType mixed="true">
      
<xsd:sequence minOccurs="0" maxOccurs="unbounded">
        
<xsd:choice>
          
<xsd:element ref="xforms:output" />
          
<!-- containing document language to add additional allowed content here  -->
        
</xsd:choice>
      
</xsd:sequence>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attribute name="id" type="xsd:ID" use="optional" />
      
<xsd:attributeGroup ref="xforms:bindFirstAttributes" />
      
<xsd:attributeGroup ref="xforms:commonUIAttributes" />
      
<xsd:attributeGroup ref="xforms:linkingAttributes" />
    
</xsd:complexType>
  
</xsd:element>
  
<xsd:element name="extension">
    
<xsd:complexType>
      
<xsd:sequence>
        
<xsd:any namespace="##other" />
      
</xsd:sequence>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
    
</xsd:complexType>
  
</xsd:element>
  
<xsd:element name="choices">
    
<xsd:complexType>
      
<xsd:sequence>
        
<xsd:element ref="xforms:label" minOccurs="0" />
        
<xsd:sequence maxOccurs="unbounded">
          
<xsd:choice>
            
<xsd:element ref="xforms:choices" />
            
<xsd:element ref="xforms:item" />
            
<xsd:element ref="xforms:itemset" />
          
</xsd:choice>
        
</xsd:sequence>
      
</xsd:sequence>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attribute name="id" type="xsd:ID" />
    
</xsd:complexType>
  
</xsd:element>
  
<xsd:element name="value">
    
<xsd:complexType mixed="true">
      
<xsd:sequence>
        
<xsd:any namespace="##any" processContents="skip" />
      
</xsd:sequence>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attributeGroup ref="xforms:bindFirstAttributes" />
    
</xsd:complexType>
  
</xsd:element>
  
<xsd:element name="item">
    
<xsd:complexType>
      
<xsd:sequence>
        
<xsd:element ref="xforms:label" />
        
<xsd:element ref="xforms:value" />
        
<xsd:group ref="xforms:optionalUIChildren" minOccurs="0" maxOccurs="unbounded" />
      
</xsd:sequence>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attribute name="id" type="xsd:ID" />
    
</xsd:complexType>
  
</xsd:element>
  
<xsd:element name="itemset">
    
<xsd:complexType>
      
<xsd:sequence>
        
<xsd:element ref="xforms:label" />
        
<xsd:choice>
          
<xsd:element ref="xforms:value" />
          
<xsd:element ref="xforms:copy" />
        
</xsd:choice>
        
<xsd:group ref="xforms:optionalUIChildren" minOccurs="0" maxOccurs="unbounded" />
      
</xsd:sequence>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attribute name="id" type="xsd:ID" use="optional" />
      
<xsd:attributeGroup ref="xforms:bindAllAttributes" />
    
</xsd:complexType>
  
</xsd:element>
  
<xsd:element name="copy">
    
<xsd:complexType>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attribute name="id" type="xsd:ID" use="optional" />
      
<xsd:attributeGroup ref="xforms:bindFirstAttributes" />
    
</xsd:complexType>
  
</xsd:element>
  
<xsd:element name="filename">
    
<xsd:complexType>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attributeGroup ref="xforms:bindFirstAttributes" />
    
</xsd:complexType>
  
</xsd:element>
  
<xsd:element name="mediatype">
    
<xsd:complexType>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attributeGroup ref="xforms:bindFirstAttributes" />
    
</xsd:complexType>
  
</xsd:element>
  
<xsd:group name="optionalUIChildren">
    
<xsd:sequence>
      
<xsd:choice minOccurs="0" maxOccurs="unbounded">
        
<xsd:element ref="xforms:help" />
        
<xsd:element ref="xforms:hint" />
        
<xsd:element ref="xforms:alert" />
        
<xsd:group ref="xforms:actionGroup" />
        
<xsd:element ref="xforms:extension" />
      
</xsd:choice>
    
</xsd:sequence>
  
</xsd:group>
  
<xsd:element name="input">
    
<xsd:complexType>
      
<xsd:sequence>
        
<xsd:element ref="xforms:label" />
        
<xsd:group ref="xforms:optionalUIChildren" minOccurs="0" maxOccurs="unbounded" />
      
</xsd:sequence>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attribute name="id" type="xsd:ID" use="optional" />
      
<xsd:attributeGroup ref="xforms:bindFirstAttributes" />
      
<xsd:attribute name="inputmode" type="xsd:string" use="optional" />
      
<xsd:attributeGroup ref="xforms:commonUIAttributes" />
      
<xsd:attribute name="incremental" type="xsd:boolean" use="optional" default="false" />
    
</xsd:complexType>
  
</xsd:element>
  
<xsd:element name="textarea">
    
<xsd:complexType>
      
<xsd:sequence>
        
<xsd:element ref="xforms:label" />
        
<xsd:group ref="xforms:optionalUIChildren" minOccurs="0" maxOccurs="unbounded" />
      
</xsd:sequence>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attribute name="id" type="xsd:ID" use="optional" />
      
<xsd:attributeGroup ref="xforms:bindFirstAttributes" />
      
<xsd:attribute name="inputmode" type="xsd:string" use="optional" />
      
<xsd:attributeGroup ref="xforms:commonUIAttributes" />
      
<xsd:attribute name="incremental" type="xsd:boolean" use="optional" default="false" />
    
</xsd:complexType>
  
</xsd:element>
  
<xsd:element name="secret">
    
<xsd:complexType>
      
<xsd:sequence>
        
<xsd:element ref="xforms:label" />
        
<xsd:group ref="xforms:optionalUIChildren" minOccurs="0" maxOccurs="unbounded" />
      
</xsd:sequence>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attribute name="id" type="xsd:ID" />
      
<xsd:attributeGroup ref="xforms:bindFirstAttributes" />
      
<xsd:attribute name="inputmode" type="xsd:string" use="optional" />
      
<xsd:attributeGroup ref="xforms:commonUIAttributes" />
      
<xsd:attribute name="incremental" type="xsd:boolean" use="optional" default="false" />
    
</xsd:complexType>
  
</xsd:element>
  
<xsd:element name="upload">
    
<xsd:complexType>
      
<xsd:sequence>
        
<xsd:element ref="xforms:label" />
        
<xsd:element ref="xforms:filename" minOccurs="0" />
        
<xsd:element ref="xforms:mediatype" minOccurs="0" />
        
<xsd:group ref="xforms:optionalUIChildren" minOccurs="0" maxOccurs="unbounded" />
      
</xsd:sequence>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attribute name="id" type="xsd:ID" use="optional" />
      
<xsd:attributeGroup ref="xforms:bindFirstAttributes" />
      
<xsd:attributeGroup ref="xforms:commonUIAttributes" />
      
<xsd:attribute name="mediatype" type="xsd:string" use="optional" />
      
<xsd:attribute name="incremental" type="xsd:boolean" use="optional" default="false" />
    
</xsd:complexType>
  
</xsd:element>
  
<xsd:group name="listChoices">
    
<xsd:sequence>
      
<xsd:choice>
        
<xsd:element ref="xforms:item" />
        
<xsd:element ref="xforms:itemset" />
        
<xsd:element ref="xforms:choices" />
      
</xsd:choice>
    
</xsd:sequence>
  
</xsd:group>
  
<xsd:element name="select1">
    
<xsd:complexType>
      
<xsd:sequence>
        
<xsd:element ref="xforms:label" />
        
<xsd:group ref="xforms:listChoices" maxOccurs="unbounded" />
        
<xsd:group ref="xforms:optionalUIChildren" minOccurs="0" maxOccurs="unbounded" />
      
</xsd:sequence>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attribute name="id" type="xsd:ID" use="optional" />
      
<xsd:attributeGroup ref="xforms:bindFirstAttributes" />
      
<xsd:attributeGroup ref="xforms:commonUIAttributes" />
      
<xsd:attribute name="selection" use="optional" default="closed">
        
<xsd:simpleType>
          
<xsd:restriction base="xsd:string">
            
<xsd:enumeration value="open" />
            
<xsd:enumeration value="closed" />
          
</xsd:restriction>
        
</xsd:simpleType>
      
</xsd:attribute>
      
<xsd:attribute name="incremental" type="xsd:boolean" use="optional" default="true" />
    
</xsd:complexType>
  
</xsd:element>
  
<xsd:element name="select">
    
<xsd:complexType>
      
<xsd:sequence>
        
<xsd:element ref="xforms:label" />
        
<xsd:group ref="xforms:listChoices" maxOccurs="unbounded" />
        
<xsd:group ref="xforms:optionalUIChildren" minOccurs="0" maxOccurs="unbounded" />
      
</xsd:sequence>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attribute name="id" type="xsd:ID" use="optional" />
      
<xsd:attributeGroup ref="xforms:bindFirstAttributes" />
      
<xsd:attributeGroup ref="xforms:commonUIAttributes" />
      
<xsd:attribute name="selection" use="optional" default="closed">
        
<xsd:simpleType>
          
<xsd:restriction base="xsd:string">
            
<xsd:enumeration value="open" />
            
<xsd:enumeration value="closed" />
          
</xsd:restriction>
        
</xsd:simpleType>
      
</xsd:attribute>
      
<xsd:attribute name="incremental" type="xsd:boolean" use="optional" default="true" />
    
</xsd:complexType>
  
</xsd:element>
  
<xsd:element name="range">
    
<xsd:complexType>
      
<xsd:sequence>
        
<xsd:element ref="xforms:label" />
        
<xsd:group ref="xforms:optionalUIChildren" minOccurs="0" maxOccurs="unbounded" />
      
</xsd:sequence>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attribute name="id" type="xsd:ID" use="optional" />
      
<xsd:attributeGroup ref="xforms:bindFirstAttributes" />
      
<xsd:attributeGroup ref="xforms:commonUIAttributes" />
      
<xsd:attribute name="start" type="xsd:string" use="optional" />
      
<xsd:attribute name="end" type="xsd:string" use="optional" />
      
<xsd:attribute name="step" type="xsd:string" use="optional" />
      
<xsd:attribute name="incremental" type="xsd:boolean" use="optional" default="false" />
    
</xsd:complexType>
  
</xsd:element>
  
<xsd:element name="trigger">
    
<xsd:complexType>
      
<xsd:sequence>
        
<xsd:element ref="xforms:label" />
        
<xsd:group ref="xforms:optionalUIChildren" minOccurs="0" maxOccurs="unbounded" />
      
</xsd:sequence>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attribute name="id" type="xsd:ID" use="optional" />
      
<xsd:attributeGroup ref="xforms:bindFirstAttributes" />
      
<xsd:attributeGroup ref="xforms:commonUIAttributes" />
    
</xsd:complexType>
  
</xsd:element>
  
<xsd:element name="output">
    
<xsd:complexType>
      
<xsd:sequence minOccurs="0">
        
<xsd:element ref="xforms:label" />
      
</xsd:sequence>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attribute name="id" type="xsd:ID" use="optional" />
      
<xsd:attribute name="ref" type="xsd:string" use="optional" />
      
<xsd:attribute name="model" type="xsd:string" use="optional" />
      
<xsd:attribute name="format" type="xsd:string" use="optional" />
      
<xsd:attribute name="appearance" type="xforms:appearanceType" use="optional" />
    
</xsd:complexType>
  
</xsd:element>
  
<xsd:element name="submit">
    
<xsd:complexType>
      
<xsd:sequence>
        
<xsd:element ref="xforms:label" />
        
<xsd:group ref="xforms:optionalUIChildren" minOccurs="0" maxOccurs="unbounded" />
      
</xsd:sequence>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attribute name="id" type="xsd:ID" use="optional" />
      
<xsd:attribute name="submission" type="xsd:IDREF" use="required" />
      
<xsd:attributeGroup ref="xforms:commonUIAttributes" />
    
</xsd:complexType>
  
</xsd:element>
  
<!--
XForms Actions
-->
  
<xsd:attributeGroup name="XMLEvents">
    
<xsd:attribute ref="ev:event" />
    
<xsd:attribute ref="ev:observer" />
    
<xsd:attribute ref="ev:target" />
    
<xsd:attribute ref="ev:handler" />
    
<xsd:attribute ref="ev:phase" />
    
<xsd:attribute ref="ev:propagate" />
    
<xsd:attribute ref="ev:defaultAction" />
  
</xsd:attributeGroup>
  
<xsd:group name="actionGroup">
    
<xsd:choice>
      
<xsd:element ref="xforms:action" />
      
<xsd:group ref="xforms:actions" />
    
</xsd:choice>
  
</xsd:group>
  
<xsd:element name="action">
    
<xsd:complexType>
      
<xsd:sequence maxOccurs="unbounded">
        
<xsd:group ref="xforms:actions" />
      
</xsd:sequence>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attribute name="id" type="xsd:ID" use="optional" />
      
<xsd:attributeGroup ref="xforms:XMLEvents" />
    
</xsd:complexType>
  
</xsd:element>
  
<xsd:group name="actions">
    
<xsd:choice>
      
<xsd:element ref="xforms:dispatch" />
      
<xsd:element ref="xforms:rebuild" />
      
<xsd:element ref="xforms:recalculate" />
      
<xsd:element ref="xforms:revalidate" />
      
<xsd:element ref="xforms:refresh" />
      
<xsd:element ref="xforms:setfocus" />
      
<xsd:element ref="xforms:load" />
      
<xsd:element ref="xforms:setvalue" />
      
<xsd:element ref="xforms:send" />
      
<xsd:element ref="xforms:reset" />
      
<xsd:element ref="xforms:insert" />
      
<xsd:element ref="xforms:delete" />
      
<xsd:element ref="xforms:setindex" />
      
<xsd:element ref="xforms:toggle" />
      
<xsd:element ref="xforms:message" />
    
</xsd:choice>
  
</xsd:group>
  
<xsd:element name="dispatch">
    
<xsd:complexType>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attribute name="id" type="xsd:ID" use="optional" />
      
<xsd:attribute name="name" type="xsd:NMTOKEN" use="required" />
      
<xsd:attribute name="target" type="xsd:IDREF" use="required" />
      
<xsd:attribute name="bubbles" type="xsd:boolean" use="optional" default="true" />
      
<xsd:attribute name="cancelable" type="xsd:boolean" use="optional" default="true" />
      
<xsd:attributeGroup ref="xforms:XMLEvents" />
    
</xsd:complexType>
  
</xsd:element>
  
<xsd:element name="rebuild">
    
<xsd:complexType>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attribute name="model" type="xsd:IDREF" />
      
<xsd:attribute name="id" type="xsd:ID" use="optional" />
      
<xsd:attributeGroup ref="xforms:XMLEvents" />
    
</xsd:complexType>
  
</xsd:element>
  
<xsd:element name="revalidate">
    
<xsd:complexType>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attribute name="model" type="xsd:IDREF" />
      
<xsd:attribute name="id" type="xsd:ID" use="optional" />
      
<xsd:attributeGroup ref="xforms:XMLEvents" />
    
</xsd:complexType>
  
</xsd:element>
  
<xsd:element name="recalculate">
    
<xsd:complexType>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attribute name="model" type="xsd:IDREF" />
      
<xsd:attribute name="id" type="xsd:ID" use="optional" />
      
<xsd:attributeGroup ref="xforms:XMLEvents" />
    
</xsd:complexType>
  
</xsd:element>
  
<xsd:element name="refresh">
    
<xsd:complexType>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attribute name="model" type="xsd:IDREF" />
      
<xsd:attribute name="id" type="xsd:ID" use="optional" />
      
<xsd:attributeGroup ref="xforms:XMLEvents" />
    
</xsd:complexType>
  
</xsd:element>
  
<xsd:element name="setfocus">
    
<xsd:complexType>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attribute name="id" type="xsd:ID" use="optional" />
      
<xsd:attribute name="control" type="xsd:IDREF" use="required" />
      
<xsd:attributeGroup ref="xforms:XMLEvents" />
    
</xsd:complexType>
  
</xsd:element>
  
<xsd:element name="load">
    
<xsd:complexType>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attribute name="id" type="xsd:ID" use="optional" />
      
<xsd:attributeGroup ref="xforms:bindFirstAttributes" />
      
<xsd:attribute name="src" type="xsd:anyURI" use="required" />
      
<xsd:attribute name="show" use="optional" />
      
<xsd:attributeGroup ref="xforms:XMLEvents" />
    
</xsd:complexType>
  
</xsd:element>
  
<xsd:element name="setvalue">
    
<xsd:complexType>
      
<xsd:simpleContent>
        
<xsd:extension base="xsd:string">
          
<xsd:attributeGroup ref="xforms:commonAttrs" />
          
<xsd:attribute name="id" type="xsd:ID" use="optional" />
          
<xsd:attributeGroup ref="xforms:bindFirstAttributes" />
          
<xsd:attribute name="value" type="xsd:string" />
          
<xsd:attributeGroup ref="xforms:XMLEvents" />
        
</xsd:extension>
      
</xsd:simpleContent>
    
</xsd:complexType>
  
</xsd:element>
  
<xsd:element name="send">
    
<xsd:complexType>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attribute name="id" type="xsd:ID" use="optional" />
      
<xsd:attribute name="submission" type="xsd:IDREF" use="optional" />
      
<xsd:attributeGroup ref="xforms:XMLEvents" />
    
</xsd:complexType>
  
</xsd:element>
  
<xsd:element name="reset">
    
<xsd:complexType>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attribute name="id" type="xsd:ID" use="optional" />
      
<xsd:attributeGroup ref="xforms:XMLEvents" />
      
<xsd:attribute name="model" type="xsd:IDREF" />
    
</xsd:complexType>
  
</xsd:element>
  
<xsd:element name="insert">
    
<xsd:complexType>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attribute name="id" type="xsd:ID" use="optional" />
      
<xsd:attributeGroup ref="xforms:bindAllAttributes" />
      
<xsd:attribute name="at" type="xsd:string" use="required" />
      
<xsd:attribute name="position" use="required">
        
<xsd:simpleType>
          
<xsd:restriction base="xsd:string">
            
<xsd:enumeration value="before" />
            
<xsd:enumeration value="after" />
          
</xsd:restriction>
        
</xsd:simpleType>
      
</xsd:attribute>
      
<xsd:attributeGroup ref="xforms:XMLEvents" />
    
</xsd:complexType>
  
</xsd:element>
  
<xsd:element name="delete">
    
<xsd:complexType>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attribute name="id" type="xsd:ID" use="optional" />
      
<xsd:attributeGroup ref="xforms:bindAllAttributes" />
      
<xsd:attribute name="at" type="xsd:string" use="required" />
      
<xsd:attributeGroup ref="xforms:XMLEvents" />
    
</xsd:complexType>
  
</xsd:element>
  
<xsd:element name="setindex">
    
<xsd:complexType>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attribute name="id" type="xsd:ID" use="optional" />
      
<xsd:attribute name="repeat" type="xsd:IDREF" use="required" />
      
<xsd:attribute name="index" type="xsd:string" use="required" />
      
<xsd:attributeGroup ref="xforms:XMLEvents" />
    
</xsd:complexType>
  
</xsd:element>
  
<xsd:element name="toggle">
    
<xsd:complexType>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attribute name="id" type="xsd:ID" use="optional" />
      
<xsd:attribute name="case" type="xsd:IDREF" use="required" />
      
<xsd:attributeGroup ref="xforms:XMLEvents" />
    
</xsd:complexType>
  
</xsd:element>
  
<xsd:element name="message">
    
<xsd:complexType>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attribute name="id" type="xsd:ID" use="optional" />
      
<xsd:attributeGroup ref="xforms:bindFirstAttributes" />
      
<xsd:attribute name="level" type="xsd:string" use="required" />
      
<xsd:attributeGroup ref="xforms:XMLEvents" />
    
</xsd:complexType>
  
</xsd:element>
  
<!--
Advanced User Interface
-->
  
<xsd:attribute name="repeat-nodeset" type="xsd:string" />
  
<xsd:attribute name="repeat-model" type="xsd:IDREF" />
  
<xsd:attribute name="repeat-bind" type="xsd:IDREF" />
  
<xsd:attribute name="repeat-startindex" type="xsd:positiveInteger" />
  
<xsd:attribute name="repeat-number" type="xsd:nonNegativeInteger" />
  
<xsd:element name="repeat">
    
<xsd:complexType>
      
<xsd:sequence>
        
<xsd:sequence minOccurs="0" maxOccurs="unbounded">
          
<xsd:choice>
            
<xsd:group ref="xforms:formControls" />
            
<xsd:element ref="xforms:group" />
            
<xsd:element ref="xforms:repeat" />
            
<!-- containing document language to add additional allowed content here  -->
          
</xsd:choice>
        
</xsd:sequence>
      
</xsd:sequence>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attribute name="id" type="xsd:ID" use="optional" />
      
<xsd:attributeGroup ref="xforms:bindAllAttributes" />
      
<xsd:attributeGroup ref="xforms:commonUIAttributes" />
      
<xsd:attribute name="startindex" type="xsd:positiveInteger" />
      
<xsd:attribute name="number" type="xsd:nonNegativeInteger" />
    
</xsd:complexType>
  
</xsd:element>
  
<xsd:element name="group">
    
<xsd:complexType>
      
<xsd:sequence>
        
<xsd:element ref="xforms:label" minOccurs="0" />
        
<xsd:sequence minOccurs="0" maxOccurs="unbounded">
          
<xsd:choice>
            
<xsd:group ref="xforms:formControls" />
            
<xsd:element ref="xforms:group" />
            
<xsd:element ref="xforms:switch" />
            
<xsd:element ref="xforms:repeat" />
            
<!-- containing document language to add additional allowed content here  -->
          
</xsd:choice>
        
</xsd:sequence>
      
</xsd:sequence>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attribute name="id" type="xsd:ID" use="optional" />
      
<xsd:attributeGroup ref="xforms:bindFirstAttributes" />
      
<xsd:attributeGroup ref="xforms:commonUIAttributes" />
    
</xsd:complexType>
  
</xsd:element>
  
<xsd:element name="switch">
    
<xsd:complexType>
      
<xsd:sequence maxOccurs="unbounded">
        
<xsd:element ref="xforms:case" />
      
</xsd:sequence>
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attribute name="id" type="xsd:ID" />
      
<xsd:attributeGroup ref="xforms:bindFirstAttributes" />
      
<xsd:attributeGroup ref="xforms:commonUIAttributes" />
    
</xsd:complexType>
  
</xsd:element>
  
<xsd:element name="case">
    
<xsd:complexType>
      
<xsd:sequence>
        
<xsd:element ref="xforms:label" minOccurs="0" />
        
<xsd:sequence maxOccurs="unbounded">
          
<xsd:choice>
            
<xsd:group ref="xforms:formControls" />
            
<xsd:element ref="xforms:group" />
            
<xsd:element ref="xforms:switch" />
            
<xsd:element ref="xforms:repeat" />
            
<!-- containing document language to add additional allowed content here  -->
          
</xsd:choice>
        
</xsd:sequence>
      
</xsd:sequence>
      
<xsd:attribute name="selected" type="xsd:boolean" use="optional" />
      
<xsd:attributeGroup ref="xforms:commonAttrs" />
      
<xsd:attribute name="id" type="xsd:ID" use="required" />
    
</xsd:complexType>
  
</xsd:element>
  
<!--
New simpleTypes
-->
  
<xsd:simpleType name="QNameList">
    
<xsd:list itemType="xsd:QName" />
  
</xsd:simpleType>
  
<xsd:simpleType name="anyURIList">
    
<xsd:list itemType="xsd:anyURI" />
  
</xsd:simpleType>
  
<xsd:simpleType name="QNameButNotNCNAME">
    
<xsd:restriction base="xsd:QName">
      
<xsd:pattern value="[^:]+:[^:]+" />
    
</xsd:restriction>
  
</xsd:simpleType>
  
<xsd:simpleType name="appearanceType">
    
<xsd:union memberTypes="xforms:QNameButNotNCNAME">
      
<xsd:simpleType>
        
<xsd:restriction base="xsd:string">
          
<xsd:enumeration value="full" />
          
<xsd:enumeration value="compact" />
          
<xsd:enumeration value="minimal" />
        
</xsd:restriction>
      
</xsd:simpleType>
    
</xsd:union>
  
</xsd:simpleType>
  
<xsd:simpleType name="listItem">
    
<xsd:restriction base="xsd:string">
      
<xsd:pattern value="\S+" />
    
</xsd:restriction>
  
</xsd:simpleType>
  
<xsd:simpleType name="listItems">
    
<xsd:list itemType="xforms:listItem" />
  
</xsd:simpleType>
  
<xsd:simpleType name="dayTimeDuration">
    
<xsd:restriction base="xsd:duration">
      
<xsd:pattern value="[-]?P((\p{Nd}D(T\p{Nd}+(H(\p{Nd}+M(\p{Nd}+([.]\p{Nd}+)?S)?)?|M(\p{Nd}+([.]\p{Nd}+)?S)?|(([.]\p{Nd}+)?S)))?)|T\p{Nd}+(H(\p{Nd}+M(\p{Nd}+([.]\p{Nd}+)?S)?)?|M(\p{Nd}+([.]\p{Nd}+)?S)?|(([.]\p{Nd}+)?S)))" />
    
</xsd:restriction>
  
</xsd:simpleType>
  
<xsd:simpleType name="yearMonthDuration">
    
<xsd:restriction base="xsd:duration">
      
<xsd:pattern value="[-]?P\p{Nd}+(Y(\p{Nd}+M)?|M)" />
    
</xsd:restriction>
  
</xsd:simpleType>
</xsd:schema>

A.1 Schema for XML Events

This schema is not normative with respect to XML Events, although it is considered a normative part of the XForms definition.

<xs:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ev="http://www.w3.org/2001/xml-events" targetNamespace="http://www.w3.org/2001/xml-events" elementFormDefault="unqualified" attributeFormDefault="unqualified" blockDefault="#all" finalDefault="#all" version="1.1" xsi:schemaLocation="http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema.xsd">
  
<!--

-->
  
<xs:annotation>
    
<xs:documentation>
This is the XML Schema for XML Events global attributes
      $Id: sliceA.html,v 1.3 2002/08/21 14:00:57 henri Exp $
    
</xs:documentation>
    
<xs:documentation source="xml-events-copyright-1.xsd" />
  
</xs:annotation>
  
<!--

-->
  
<xs:annotation>
    
<xs:documentation>
XML Event Attributes
        
            These "global" event attributes are defined in "Attaching
            Attributes Directly to the Observer Element" of the XML
            Events specification.
        
</xs:documentation>
  
</xs:annotation>
  
<!--

-->
  
<xs:attribute name="event" type="xs:NMTOKEN" />
  
<xs:attribute name="observer" type="xs:IDREF" />
  
<xs:attribute name="target" type="xs:IDREF" />
  
<xs:attribute name="handler" type="xs:anyURI" />
  
<xs:attribute name="phase" default="default">
    
<xs:simpleType>
      
<xs:restriction base="xs:NMTOKEN">
        
<xs:enumeration value="capture" />
        
<xs:enumeration value="default" />
      
</xs:restriction>
    
</xs:simpleType>
  
</xs:attribute>
  
<xs:attribute name="propagate" default="continue">
    
<xs:simpleType>
      
<xs:restriction base="xs:NMTOKEN">
        
<xs:enumeration value="stop" />
        
<xs:enumeration value="continue" />
      
</xs:restriction>
    
</xs:simpleType>
  
</xs:attribute>
  
<xs:attribute name="defaultAction" default="perform">
    
<xs:simpleType>
      
<xs:restriction base="xs:NMTOKEN">
        
<xs:enumeration value="cancel" />
        
<xs:enumeration value="perform" />
      
</xs:restriction>
    
</xs:simpleType>
  
</xs:attribute>
  
<!--

-->
  
<xs:attributeGroup name="XmlEvents.attlist">
    
<xs:attribute ref="ev:event" />
    
<xs:attribute ref="ev:observer" />
    
<xs:attribute ref="ev:target" />
    
<xs:attribute ref="ev:handler" />
    
<xs:attribute ref="ev:phase" />
    
<xs:attribute ref="ev:propagate" />
    
<xs:attribute ref="ev:defaultAction" />
  
</xs:attributeGroup>
</xs:schema>