<?xml version="1.0" encoding="ISO-8859-1"?>
<xs:schema targetNamespace="http://xml.fiforms.org/FiForms/" version="1.0" xml:lang="en" xmlns="http://xml.fiforms.org/FiForms/" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:annotation>
<xs:documentation source="http://xml.fiforms.org/FiForms/">
This is the XML Schema for XML FiForm definitions. Please use this namespace for fiform elements: http://xml.fiforms.org/FiForms/
</xs:documentation>
</xs:annotation>
<xs:annotation>
<xs:documentation>
This Schema is distributed with FiForms, a collection of PHP 
classes designed to facilitate rapid development of 
web-database software
</xs:documentation>
<xs:documentation>
Copyright (C) 2003-2005 Daniel McFeeters
</xs:documentation>
<xs:documentation>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
</xs:documentation>
<xs:documentation>
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
</xs:documentation>
<xs:documentation source="http://www.gnu.org/copyleft/lesser.html">
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
</xs:documentation>
<xs:documentation>
The original author of this library can be contacted at the following 
address:
</xs:documentation>
<xs:documentation>
Daniel McFeeters
</xs:documentation>
<xs:documentation>
182 Baker Rd.
</xs:documentation>
<xs:documentation>
Faubush, KY 42544-6526
</xs:documentation>
<xs:documentation>
email:databases at alltel dot net
</xs:documentation>
</xs:annotation>
<xs:annotation>
<xs:documentation source="http://www.fiforms.org">
You can find out more about FiForms Solutions and download the open-source (LGPL) collection of FiForms PHP Classes from www.fiforms.org
</xs:documentation>
</xs:annotation>
<!--xs:import namespace="http://www.w3.org/1999/xhtml" schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml-basic10.xsd">
<xs:annotation>
<xs:documentation>
This imports the XHTML namespace, so that XHTML elements
can be embedded in FiForms.
</xs:documentation>
</xs:annotation>
</xs:import--><xs:element name="reportdef">
<xs:annotation>
<xs:documentation>
This is the root element of a FiForm Report definition. Attributes of this element affect the behaviour of the report and define permissions.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="title">
</xs:element>
<xs:element ref="summary">
</xs:element>
<xs:element maxOccurs="1" minOccurs="0" ref="security">
</xs:element>
<xs:element maxOccurs="1" minOccurs="0" ref="confidentiality">
</xs:element>
<xs:element maxOccurs="1" minOccurs="1" ref="connect">
</xs:element>
<xs:element maxOccurs="1" minOccurs="0" ref="generator">
</xs:element>
<xs:element maxOccurs="unbounded" minOccurs="0" ref="param">
</xs:element>
<xs:element maxOccurs="unbounded" minOccurs="0" ref="stylesheet">
</xs:element>
<xs:element maxOccurs="unbounded" minOccurs="1" ref="query">
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>

<xs:element name="stylesheet">
<xs:complexType>
<xs:attribute name="href" type="xs:anyURI" use="required">
<xs:annotation>
<xs:documentation>
File name of an XSLT stylesheet that should be used to transform the resulting XML. 
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="caption" use="optional">
<xs:annotation>
<xs:documentation>
Description of stylesheet displayed in selection box.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute fixed="default" name="default" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>
Mark this as the default selected stylesheet.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>

<xs:element name="security">
<xs:annotation>
<xs:documentation>
Security descriptor. Only the mentioned user or group will be allowed to view the report.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name="user" type="xs:string" use="optional">
</xs:attribute>
<xs:attribute name="group" type="xs:string" use="optional">
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="confidentiality">
<xs:complexType>
<xs:attribute name="level" type="low_medium_high" use="required">
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:simpleType name="low_medium_high">
<xs:restriction base="xs:string">
<xs:enumeration value="low"/>
<xs:enumeration value="medium"/>
<xs:enumeration value="high"/>
</xs:restriction>
</xs:simpleType>

<xs:element name="generator">
<xs:complexType>
<xs:attribute name="href" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>
URI of server where FiForm generate.php script resides. Used only for user-defined reports where the report definition is submitted to the server from the parameter page. (This configuration is not recommended for production servers where security is a concern.)
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="fiform">
<xs:annotation>
<xs:documentation>
This is the root element of a FiForm definition. Attributes of this element affect the behaviour and appearance of the form and define permissions.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="title">
</xs:element>
<xs:element ref="summary">
</xs:element>
<xs:element maxOccurs="1" minOccurs="0" ref="security">
</xs:element>
<xs:element maxOccurs="1" minOccurs="1" ref="connect">
</xs:element>
<xs:element maxOccurs="unbounded" minOccurs="0" ref="param">
</xs:element>
<xs:element maxOccurs="1" minOccurs="0" ref="query">
</xs:element>
<xs:sequence maxOccurs="unbounded" minOccurs="0">
<xs:group ref="controls">
</xs:group>
</xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" ref="wrapper">
</xs:element>
</xs:sequence>
<xs:attributeGroup ref="windowattributes">
</xs:attributeGroup>
<xs:attribute name="ctlPosition" type="navlink_positions" use="required">
<xs:annotation>
<xs:documentation>
Specifies where the navigation links appear on the form in form view
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="svctlPosition" type="svlink_positions" use="required">
<xs:annotation>
<xs:documentation>
Specifies where the navigation links appear on the form in sheet view
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="viewsAllowed" type="allowed_view" use="required">
<xs:annotation>
<xs:documentation>
Specifies which view modes are allowed for this form. A value of &quot;none&quot; disables the form.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute default="sheet" name="defaultView" type="default_vew" use="optional">
<xs:annotation>
<xs:documentation>
Suggests the preferred view mode for the form when it is opened from a menu.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute default="yes" name="allowView" type="yes_no" use="optional">
<xs:annotation>
<xs:documentation>
If this is &quot;no&quot;, viewing existing data in any mode is not allowed.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute default="yes" name="allowUpdate" type="yes_no" use="optional">
<xs:annotation>
<xs:documentation>
If this is &quot;no&quot;, updating records is not allowed.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute default="new" name="insert" type="insert_type">
<xs:annotation>
<xs:documentation>
Action after a record is inserted. &quot;new&quot; moves to a new record. &quot;current&quot; saves the record and returns to editing the same record. &quot;sheet&quot; returns to sheet mode after insert. If this is &quot;none&quot;, inserting records is not allowed.
</xs:documentation>
</xs:annotation>
</xs:attribute>

<xs:attribute name="whichControls" type="availablecontrols">
<xs:annotation>
<xs:documentation>
Specifies which navigation links are shown.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:simpleType name="insert_type">
<xs:restriction base="xs:string">
<xs:enumeration value="new"/>
<xs:enumeration value="current"/>
<xs:enumeration value="sheet"/>
<xs:enumeration value="none"/>
</xs:restriction>
</xs:simpleType>
<xs:element name="title" type="xs:string">
<xs:annotation>
<xs:documentation>
The title above the form.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="summary" type="xs:string">
<xs:annotation>
<xs:documentation>
A description of the form, often displayed in verbose menu screens.
</xs:documentation>
</xs:annotation>
</xs:element>

<xs:simpleType name="availablecontrols">
<xs:annotation>
<xs:documentation>
Possible combinations of controls allowed in whichControls attribute of fiform element
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="all"/>
<xs:enumeration value="nav"/>
<xs:enumeration value="delete"/>
<xs:enumeration value="new"/>
<xs:enumeration value="nav,new"/>
<xs:enumeration value="new,delete"/>
<xs:enumeration value="nav,delete"/>
<xs:enumeration value="none"/>
</xs:restriction>
</xs:simpleType>

<xs:element name="code" type="xs:string">
<xs:annotation>
<xs:documentation>
PHP code executed when the form is viewed. The code does not need to be enclosed in XML processing instructions (i.e. ?php tags)
</xs:documentation>
</xs:annotation>
</xs:element>

<xs:element name="iText">
<xs:annotation>
<xs:documentation>
iText (data-bound text box) FiForm object.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attributeGroup ref="inputfields">
</xs:attributeGroup>
</xs:complexType>
</xs:element>

<xs:element name="iHidden">
<xs:annotation>
<xs:documentation>
iHidden (hidden data-bound text box) FiForm object.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attributeGroup ref="inputfields">
</xs:attributeGroup>
</xs:complexType>
</xs:element>

<xs:element name="iTextArea">
<xs:annotation>
<xs:documentation>
iTextArea (data-bound text area) FiForm object. Equivalant to iText, but uses textarea instead of input
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attributeGroup ref="inputfields">
</xs:attributeGroup>
<xs:attribute name="rows" type="xs:integer">
<xs:annotation>
<xs:documentation>
Number of rows (height) of text area
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="cols" type="xs:integer">
<xs:annotation>
<xs:documentation>
Number of columns (width) of text area
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>

<xs:element name="iROText">
<xs:annotation>
<xs:documentation>
iROText (read-only database field) FiForm object. 
</xs:documentation>
<xs:documentation>
Note that this does not actually create a form object that will be submitted, it simply prints the value of the field in text on the HTML page. This should be combined with iHidden if you want the value submitted on the form, or use iText disabled=&quot;disabled&quot; to display the field in a disabled text box.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attributeGroup ref="inputfields">
</xs:attributeGroup>
</xs:complexType>
</xs:element>

<xs:element name="iDBSelect">
<xs:annotation>
<xs:documentation>
iDBSelect (data bound selection, drop-down box, or radio button group) FiForm object.
</xs:documentation>
<xs:documentation>
Options can be queried from the database by specifing a query in the rowQuery attribute or they can be specified here manually with option elements inside the iDBSelect element.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" ref="option">
</xs:element>
</xs:sequence>
<xs:attributeGroup ref="inputfields">
</xs:attributeGroup>
<xs:attribute name="rowQuery">
<xs:annotation>
<xs:documentation>
SQL query for row options. This query should return either 1 or 2 columns. If 1 column is returned, the values are used for the values and text in the select box. If 2 columns are returned, the first is used as the values stored in the field and the second is used as the display text.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>

<xs:element name="option" type="optionType">
<xs:annotation>
<xs:documentation>
Option listing under iDBSelect. Although similar in syntax and function, this is not to be confused with the option element in the XHTML namespace.
</xs:documentation>
</xs:annotation>
</xs:element>

<xs:complexType name="optionType">
<xs:annotation>
<xs:documentation>
Type definition for option under iDBSelect.
</xs:documentation>
</xs:annotation>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="value" use="optional">
<xs:annotation>
<xs:documentation>
&quot;Key&quot; value. If not specified, the value of the option is used.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:element name="iDateText">
<xs:annotation>
<xs:documentation>
iDateText (data-bound date input box) FiForm object.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attributeGroup ref="inputfields">
</xs:attributeGroup>
</xs:complexType>
</xs:element>

<xs:element name="iLink">
<xs:annotation>
<xs:documentation>
Link to a page (iLink FiForm object)
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name="href" type="xs:anyURI" use="optional">
<xs:annotation>
<xs:documentation>
URI of page
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="linktext" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>
Text of the link (contents of anchor element in HTML)
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="caption" type="xs:string">
<xs:annotation>
<xs:documentation>
Column heading or text beside the link.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute default="link" name="type" type="link_button" use="optional">
</xs:attribute>
<xs:attributeGroup ref="windowattributes">
</xs:attributeGroup>
</xs:complexType>
</xs:element>

<xs:simpleType name="link_button">
<xs:annotation>
<xs:documentation>
Possible types for iLink
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="link"/>
<xs:enumeration value="button"/>
</xs:restriction>
</xs:simpleType>

<xs:element name="if" type="ifType">
<xs:annotation>
<xs:documentation>
Construct for conditional definitions. Elements inside this element will be present only if the condition is true. 
</xs:documentation>
<xs:documentation>
Note: This schema technically allows elements under &quot;if&quot; that belong in the &quot;connection&quot;, &quot;fiforms&quot;, or &quot;wrapper&quot; elements. Although this may be technically allowed by the schema, no element is allowed under &quot;if&quot; that would not be allowed if it were outside the &quot;if&quot; element.
</xs:documentation>
</xs:annotation>
</xs:element>

<xs:complexType name="ifType">
<xs:choice>
<xs:group ref="controls">
</xs:group>
<xs:element ref="connect">
</xs:element>
<xs:element maxOccurs="unbounded" minOccurs="1" ref="query">
</xs:element>
<xs:sequence>
<xs:element ref="headerTags">
</xs:element>
<xs:element ref="pageHeader">
</xs:element>
<xs:element ref="pageFooter">
</xs:element>
</xs:sequence>
</xs:choice>
<xs:attribute name="param" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>
Name of any GET variable passed to the form. (i.e. sheetView)
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute default="exists" name="test" type="testvalues" use="optional">
<xs:annotation>
<xs:documentation>
Any one of the comparison operators allowed in testValues
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="value" type="xs:string">
<xs:annotation>
<xs:documentation>
The value to compare &quot;param&quot; to, if necessary (depending of test)
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>

<xs:simpleType name="testvalues">
<xs:annotation>
<xs:documentation>
Possible comparison operators for &quot;if&quot;
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="exists"/>
<xs:enumeration value="equals"/>
<xs:enumeration value="does not exist"/>
<xs:enumeration value="does not equal"/>
<xs:enumeration value="is greater than"/>
<xs:enumeration value="is less than"/>
<xs:enumeration value="is greater than or equal to"/>
<xs:enumeration value="is less than or equal to"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="subviewtype">
<xs:annotation>
<xs:documentation>
Possible views for a subform.
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="normal"/>
<xs:enumeration value="sheet"/>
<xs:enumeration value="new"/>
</xs:restriction>
</xs:simpleType><xs:group name="controls">
<xs:annotation>
<xs:documentation>
Group of controls and elements that can be found under &quot;fiform&quot; or &quot;if&quot; elements
</xs:documentation>
</xs:annotation>
<xs:choice>
<xs:element ref="code"/>
<xs:element ref="iText"/>
<xs:element ref="iROText"/>
<xs:element ref="iHidden"/>
<xs:element ref="iTextArea"/>
<xs:element ref="iDateText"/>
<xs:element ref="iDBSelect"/>
<xs:element ref="iLink"/>
<xs:element ref="iSubform"/>
<xs:element ref="iCustomInput"/>
<xs:element ref="input"/>
<xs:element ref="if"/>
</xs:choice>
</xs:group>

<xs:attributeGroup name="windowattributes">
<xs:attribute name="window" use="optional">
<xs:annotation>
<xs:documentation>
Name of the window to open in.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="menubar" type="yes_no">
<xs:annotation>
<xs:documentation>
Display the menu bar?
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="toolbar" type="yes_no">
<xs:annotation>
<xs:documentation>
Display the tool bar?
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="scrollbars" type="yes_no">
<xs:annotation>
<xs:documentation>
Display scroll bars?
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="resizable" type="yes_no">
<xs:annotation>
<xs:documentation>
Window is resizable?
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="location" type="yes_no">
<xs:annotation>
<xs:documentation>
Display the location bar?
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="width" type="xs:integer">
<xs:annotation>
<xs:documentation>
Width of the window (in pixels)
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="height" type="xs:integer">
<xs:annotation>
<xs:documentation>
Height of the window (in pixels)
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:attributeGroup>


<xs:element name="iSubform">
<xs:annotation>
<xs:documentation>
iSubform FiForm object. This displays a separate form in an iframe to show/edit related records.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name="caption">
<xs:annotation>
<xs:documentation>
Caption text displayed for this field.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="href" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>
File name of linked form. 
</xs:documentation>

</xs:annotation>
</xs:attribute>
<xs:attribute default="normal" name="view" type="subviewtype">
<xs:annotation>
<xs:documentation>
The default view of the subform. Normal is data entry view, starting on first record. Sheet is sheet view. New is data entry view starting with a new record.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="params" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>
Parameters passed to subform. Name=value pairs delimited with ampersand (&amp;) signs. Variable substitutions will be made for all field names enclosed in percent (%) signs. 
</xs:documentation>
<xs:documentation>
eg. params=&quot;fk1=%pk%&amp;fk2=%pk2%&quot; 
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="width">
<xs:annotation>
<xs:documentation>
Width of the iframe, in pixels.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="height">
<xs:annotation>
<xs:documentation>
Height of the iframe, in pixels. 
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="iCustomInput">
<xs:annotation>
<xs:documentation>
FiForm iCustomInput Object. A fully customizable control. The contents of this control will simply be copied into the form, with variable substitutions made in between percent (%) signs.
</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:sequence maxOccurs="unbounded">
<xs:any namespace="http://www.w3.org/1999/xhtml" processContents="skip"/>
</xs:sequence>
<xs:attribute name="caption">
<xs:annotation>
<xs:documentation>
Caption text displayed for this field.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>

<xs:element name="input">
<xs:annotation>
<xs:documentation>
Deprecated input element. If possible, specific elements such as iText, iTextArea, iDateText, etc. should be used as they are more expressive.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name="type" use="required">
<xs:annotation>
<xs:documentation>
Type of input. (i.e. &quot;iText&quot;, &quot;iTextArea&quot;)
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attributeGroup ref="inputfields">
</xs:attributeGroup>
<xs:attribute name="p1">
<xs:annotation>
<xs:documentation>
First Parameter passed to constructor (after field name)
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="p2">
<xs:annotation>
<xs:documentation>
Second Parameter
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="p3">
<xs:annotation>
<xs:documentation>
Third Parameter, etc.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="p4">
</xs:attribute>
<xs:attribute name="p5">
</xs:attribute>
<xs:attribute name="p6">
</xs:attribute>
<xs:attribute name="p7">
</xs:attribute>
<xs:attribute name="p8">
</xs:attribute>
</xs:complexType>
</xs:element>

<xs:attributeGroup name="inputfields">
<xs:attribute name="field" type="xs:token" use="required">
<xs:annotation>
<xs:documentation>
The name of the database field to which this input is bound, and also the name of the field in the HTML form. If this name does not match any field in the database, the input will simply not be bound to any field, but the value will be submitted with this name.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="caption" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>
Second Parameter
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="default" use="optional">
<xs:annotation>
<xs:documentation>
Default value for this field in new records.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="onchange">
<xs:annotation>
<xs:documentation>
Javascript executed when the field is changed.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="onblur">
<xs:annotation>
<xs:documentation>
Javascript executed when the field has lost the focus.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="onfocus">
<xs:annotation>
<xs:documentation>
Javascript executed when the field gains the focus.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="onkeypress">
<xs:annotation>
<xs:documentation>
Javascript executed on key press
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="onkeydown">
<xs:annotation>
<xs:documentation>
Javascript executed on key down
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:attributeGroup>

<xs:simpleType name="yes_no">
<xs:restriction base="xs:string">
<xs:enumeration value="yes"/>
<xs:enumeration value="no"/>
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="selected">
<xs:restriction base="xs:string">
<xs:enumeration value="selected"/>
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="navlink_positions">
<xs:restriction base="xs:string">
<xs:enumeration value="bottom"/>
<xs:enumeration value="top"/>
<xs:enumeration value="both"/>
<xs:enumeration value="none"/>
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="svlink_positions">
<xs:restriction base="xs:string">
<xs:enumeration value="right"/>
<xs:enumeration value="left"/>
<xs:enumeration value="both"/>
<xs:enumeration value="none"/>
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="allowed_view">
<xs:restriction base="xs:string">
<xs:enumeration value="both"/>
<xs:enumeration value="form"/>
<xs:enumeration value="sheet"/>
<xs:enumeration value="none"/>
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="default_vew">
<xs:restriction base="xs:string">
<xs:enumeration value="form"/>
<xs:enumeration value="sheet"/>
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="database">
<xs:annotation>
<xs:documentation>
Database types for which support may be added. Currently, only MySQL is supported.
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="MySQL"/>
<xs:enumeration value="Oracle"/>
<xs:enumeration value="PostgreSQL"/>
<xs:enumeration value="ODBC"/>
<xs:enumeration value="XML"/>
</xs:restriction>
</xs:simpleType>

<xs:element name="connect">
<xs:annotation>
<xs:documentation>
Information needed to connect with the database.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" ref="primaryKey">
<xs:annotation>
<xs:documentation>
Primary Key(s) of table, used to update.
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute default="MySQL" name="type" type="database" use="optional">
<xs:annotation>
<xs:documentation>
Type of database to connect to. Currently only MySQL is supported.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="id" type="xs:integer" use="required">
<xs:annotation>
<xs:documentation>
Numerical ID of connection. Usually 1.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="server" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>
Hostname or IP address of server. Leave blank for default (localhost)
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="db" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>
Database to select after connecting.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="update" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>
Information about the table that will be updated by this form.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="user" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>
Optional. Username to use in connecting to database.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="passwd" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>
Optional. Password to use in connecting to database.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>



<xs:element name="update">

<xs:complexType>

<xs:attribute name="table" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>
Name of the primary table this form updates. Although a query can be specified to retreive rows from any table, only this will be updated.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="query">
<xs:annotation>
<xs:documentation>
Optional specification of an SQL query to retreive data for the form. Note that only the table specified in &quot;update&quot; will be updated. Also, column names from the query must match the names of the fields in the underlying table on all fields that are to be updated. The dataQuery should not contain a GROUP BY or HAVING clause. 
</xs:documentation>
<xs:documentation>
If grouped results are desired, you can use a sub-query in MySQL 4.1 or later. eg. &quot;SELECT * FROM (SELECT a, SUM(b) FROM table1 GROUP BY a) as t&quot;. Note, however, that such an arrangement may yield unpredictable results if updates are allowed, as aggregate queries do not necessarily have a 1 to 1 relationship with underlying data.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="1" ref="sql">
</xs:element>
<xs:element maxOccurs="unbounded" minOccurs="0" ref="query">
</xs:element>
</xs:sequence>
<xs:attribute name="connectid" type="xs:integer" use="required">
</xs:attribute>
<xs:attribute name="output" type="yes_no" use="required">
</xs:attribute>
<xs:attribute name="resultname" type="xs:string" use="optional">
</xs:attribute>
</xs:complexType>
</xs:element>

<xs:element name="sql" type="varMixed">
<xs:annotation>
<xs:documentation>
SQL query with &quot;var&quot; substitutions mixed in. Note for forms that
</xs:documentation>
</xs:annotation>
</xs:element>

<xs:complexType mixed="true" name="varMixed">
<xs:annotation>
<xs:documentation>
Text content with param elements mixed in.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" ref="var">
</xs:element>
</xs:sequence>
</xs:complexType>

<xs:element name="var">
<xs:annotation>
<xs:documentation>
Parameter substitution element
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name="ref" type="xs:token" use="required">
<xs:annotation>
<xs:documentation>
Name of parameter to substitute
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>

<xs:element name="param">
<xs:annotation>
<xs:documentation>
Parameter retreived either from GET or from a parent query.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name="name" type="xs:token" use="required">
</xs:attribute>
<xs:attribute name="caption" type="xs:string" use="optional">
</xs:attribute>
<xs:attribute name="value" type="xs:string" use="optional">
</xs:attribute>
<xs:attribute name="type" type="xs:string" use="optional">
</xs:attribute>
</xs:complexType>
</xs:element>

<xs:element name="primaryKey">
<xs:complexType>
<xs:attribute name="field" type="xs:token" use="required">
</xs:attribute>
</xs:complexType>
</xs:element>

<xs:element name="wrapper">
<xs:annotation>
<xs:documentation>
Pieces of HTML code substituted at various places in the resulting HTML document to create a custom page header, page footer, and/or javascript tags or links in the HTML header.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:choice>
<xs:sequence>
<xs:element ref="if">
</xs:element>
</xs:sequence>
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" ref="headerTags">
</xs:element>
<xs:element maxOccurs="1" minOccurs="0" ref="pageHeader">
</xs:element>
<xs:element maxOccurs="1" minOccurs="0" ref="pageFooter">
</xs:element>
</xs:sequence>
</xs:choice>
</xs:complexType>
</xs:element>

<xs:element name="headerTags">
<xs:annotation>
<xs:documentation>

</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence maxOccurs="unbounded">
<xs:any namespace="http://www.w3.org/1999/xhtml" processContents="skip"/>
</xs:sequence>
</xs:complexType>
</xs:element>

<xs:element name="pageHeader">
<xs:complexType>
<xs:sequence maxOccurs="unbounded">
<xs:any namespace="http://www.w3.org/1999/xhtml" processContents="skip"/>
</xs:sequence>
</xs:complexType>
</xs:element>

<xs:element name="pageFooter">
<xs:complexType>
<xs:sequence maxOccurs="unbounded">
<xs:any namespace="http://www.w3.org/1999/xhtml" processContents="skip"/>
</xs:sequence>
</xs:complexType>
</xs:element>

</xs:schema>