<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2005 U (http://www.xmlspy.com) by No Spam (No Spam Ltd) -->
<!-- edited with XMLSPY v5 rel. 4 U (http://www.xmlspy.com) by DTI (Unitas) -->
<!-- edited with XML Spy v4.4 U (http://www.xmlspy.com) by claytonblake (dti) -->
<!--W3C Schema generated by XML Spy v4.2 U (http://www.xmlspy.com)-->
<xs:schema targetNamespace="http://www.og.dti.gov/fox_module" xmlns:fox="http://www.og.dti.gov/fox" xmlns:foxg="http://www.og.dti.gov/fox_global" xmlns:fm="http://www.og.dti.gov/fox_module" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="$Header:   //norton_samba/pvcsdb/pvcsdata/pvcsdb01/archives/Fox/source/altova_xmlspy/schema/fox_module.xsd-arc   1.147   Apr 24 2006 14:24:58   gwatson  $">
  <xs:import schemaLocation="fox_import.xsd"/>
  <xs:import namespace="http://www.og.dti.gov/fox" schemaLocation="fox.xsd"/>
  <xs:import namespace="http://www.og.dti.gov/fox_global" schemaLocation="fox_global.xsd"/>
  <!--
$Log:   //norton_samba/pvcsdb/pvcsdata/pvcsdb01/archives/Fox/source/altova_xmlspy/schema/fox_module.xsd-arc  $

   Rev 1.147   Apr 24 2006 14:24:58   gwatson
Added matrix-author search

   Rev 1.146   Apr 21 2006 15:18:28   gwatson
Added extra record field definitions.

   Rev 1.142   Apr 11 2006 15:44:42   gwatson
Updated matrix-search command syntax

   Rev 1.141   Apr 10 2006 16:25:10   gwatson
Updates for MATRIX searching.

   Rev 1.140   Mar 30 2006 18:52:18   jbrown
Major validate changes for module-replace and state-strict-pop

   Rev 1.139   Mar 22 2006 20:33:04   jbrown
Module-replace (lax for now) syntax and draft matrix-search command.

   Rev 1.138   Mar 21 2006 10:09:08   gwatsonadm
Added set-cookie, user-login and user-logout commands.

   Rev 1.137   Feb 13 2006 19:05:56   jbrown
Legacy fix

   Rev 1.136   Feb 13 2006 18:09:14   aashton
Removed errorLayout, hintLayout, errorOffSet and hintOffSet

   Rev 1.135   Sep 13 2005 15:28:16   jamiel
Changed url-path to url-xpath in fm:generate

   Rev 1.134   Jun 07 2005 14:03:10   mfletcher
added delete section back to file-storage-location-type

   Rev 1.133   Jun 07 2005 12:37:14   gwatson
Updated file upload functionality.

   Rev 1.132   May 13 2005 14:22:22   gwatson
Added auto to enumeration of data types.

   Rev 1.131   May 12 2005 16:09:40   gwatson
Changed default datatype to "auto" generate cell elements.

   Rev 1.130   May 12 2005 14:07:36   gwatson
Added generate to Excel (XLS and CSV) capability.

   Rev 1.129   May 10 2005 17:59:18   gwatson
Added generate Excel sheet options.

   Rev 1.128   Feb 04 2005 13:25:52   gwatson
Added security-scope capabilities.

   Rev 1.127   Dec 29 2004 19:15:50   jbrown
Storage location insert clause can now be proceeded with a fm:do block - this allows seq.NEXTVAL to be used before insert and subsiquent subsequent update

   Rev 1.126   Dec 23 2004 00:23:12   jbrown
fm:generate now has storage-location and annotation added

   Rev 1.125   Dec 18 2004 23:35:48   jbrown
New commands: fm:context-set and fm:context-clear

   Rev 1.124   Dec 07 2004 16:56:54   gwatson
Added MATRIX record retrieval into TRIM option on show-popup command.

   Rev 1.123   Sep 28 2004 11:17:16   gwatson
Added document template show-popup features.

   Rev 1.122   Sep 21 2004 19:02:26   jbrown
Pragma renamed: load-document-template

   Rev 1.121   Sep 21 2004 14:55:40   jbrown
Pragma command enhanced for LOAD DOC TEMPLATE

   Rev 1.120   Jun 07 2004 17:49:22   gwatson
Added window naming capability to show popups.

   Rev 1.119   Jun 01 2004 10:59:10   aashton
Minor

   Rev 1.118   May 07 2004 22:19:10   jbrown
Added application-title to header (required)

   Rev 1.117   May 04 2004 15:27:02   gwatson
Added popup window capability.

   Rev 1.116   Apr 29 2004 11:57:34   gwatson
Tardy changes to the generate command definition.

   Rev 1.115   Dec 12 2003 11:38:28   jbrown
Syntax enhanced

   Rev 1.114   Dec 09 2003 12:22:02   psimpson
schema-module

   Rev 1.113   Nov 21 2003 11:45:42   psimpson
eval expr attribute

   Rev 1.112   Nov 18 2003 18:28:46   psimpson
compare

   Rev 1.111   Oct 09 2003 16:45:08   psimpson
anthony's name bug fixed

   Rev 1.110   Oct 09 2003 10:44:38   psimpson
using clause really fixed

   Rev 1.109   Oct 09 2003 10:40:32   psimpson
using clause fixed

   Rev 1.108   Oct 06 2003 13:59:48   psimpson
attach added to include

   Rev 1.107   Oct 01 2003 10:36:04   jbrown
Query into datadom-type enumeration xs:string corrected

   Rev 1.106   Sep 23 2003 13:49:04   psimpson
fm:order

   Rev 1.105   Aug 18 2003 13:53:38   jbrown
Validate workaround on nested command groups (made optional) and store-location query optional

   Rev 1.104   Aug 18 2003 09:16:38   cblake
mapset additions

   Rev 1.103   Jul 16 2003 10:53:40   psimpson
send

   Rev 1.101   Jul 02 2003 13:05:58   psimpson
content-type added to generate

   Rev 1.100   Jun 30 2003 14:17:18   jbrown
Fixed typo from previous change

   Rev 1.99   Jun 30 2003 13:39:30   jbrown
Transaction do block made optional

   Rev 1.98   Jun 30 2003 12:31:46   jbrown
Assign syntax changed to setTarget or initTarget

   Rev 1.97   Jun 30 2003 11:45:22   gwatson
Made test expression attributes mandatory on the "if" command.

   Rev 1.96   Jun 25 2003 12:18:32   jbrown
transaction commit syntax

   Rev 1.95   Jun 19 2003 14:31:00   jbrown
Fix to context-localise syntax

   Rev 1.94   Jun 18 2003 18:32:34   jbrown
context-localise and eval commands added

   Rev 1.93   Jun 11 2003 16:10:14   cblake
Changed datatype of using clause

   Rev 1.92   May 22 2003 10:05:32   cblake
Added datatype conversion tags for dbinterface

   Rev 1.91   May 08 2003 13:08:02   psimpson
fm:generate

   Rev 1.90   Apr 15 2003 10:37:52   psimpson
using-type enumnerations added

   Rev 1.89   Apr 04 2003 11:18:56   gwatson
Removed unused security operation types.

   Rev 1.88   Apr 02 2003 17:20:26   gwatson
Security rule now non-mandatory.

   Rev 1.87   Apr 02 2003 17:14:34   gwatson
Changes for chemical uploads and security rules.

   Rev 1.86   Mar 20 2003 11:53:44   jbrown
new pragma

   Rev 1.85   Mar 11 2003 17:08:44   psimpsonadm
mailto command added

   Rev 1.84   Feb 13 2003 03:09:58   jbrown
transaction syntax

   Rev 1.83   Feb 13 2003 00:16:00   jbrown
cosmetic

   Rev 1.82   Feb 12 2003 23:32:02   jbrown
transaction command

   Rev 1.81   Feb 10 2003 09:48:10   cblake
Added validate attribute

   Rev 1.80   Jan 30 2003 11:49:30   gwatson
Added enumerations for some attribute values.

   Rev 1.79   Jan 20 2003 10:22:58   gwatson
Changes for security.

   Rev 1.78   Jan 10 2003 11:11:38   cblake
Added purge-selected mode instead of purge

   Rev 1.77   Jan 09 2003 10:08:42   psimpson
css text

   Rev 1.76   Jan 08 2003 16:19:28   psimpson
css

   Rev 1.75   Jan 07 2003 15:10:28   psimpson
hint-out

   Rev 1.74   Jan 06 2003 15:39:06   jbrown
added store-location/update statement

   Rev 1.73   Dec 30 2002 10:39:20   psimpson
fm:error-out

   Rev 1.72   Dec 17 2002 16:36:36   psimpson
rename

   Rev 1.71   Dec 16 2002 14:02:00   jbrown
Added fox_global namespace

   Rev 1.70   Dec 16 2002 12:47:08   jbrown
Added css-list

   Rev 1.69   Dec 13 2002 16:00:54   jbrown
minor

   Rev 1.68   Dec 12 2002 14:29:28   cblake
Added namespace attribute to table tag

   Rev 1.67   Dec 11 2002 17:58:14   jbrown
Security table

   Rev 1.66   Dec 10 2002 14:18:16   jbrown
html not now namespace

   Rev 1.65   Dec 10 2002 13:23:34   psimpson
focus

   Rev 1.64   Dec 06 2002 10:26:52   psimpson
if then

   Rev 1.63   Dec 05 2002 16:56:24   psimpson
external-url

   Rev 1.62   Dec 05 2002 15:07:16   psimpson
alert messages

   Rev 1.61   Dec 03 2002 17:08:32   jbrown
added pragma function

   Rev 1.60   Dec 02 2002 18:50:10   jbrown
converted groups to types to work around xmlspy mixed content validation errors (in set-buffer/set-page blocks)

   Rev 1.59   Nov 28 2002 15:53:22   jbrown
open mixed AFTER (not in) menu-out etc

   Rev 1.58   Nov 28 2002 15:24:56   psimpson
for-each

   Rev 1.57   Nov 25 2002 14:06:32   gwatson
Added file-storage-location type.

   Rev 1.56   Nov 20 2002 15:28:12   jbrown
Presentation section mand at module level and optional at state level

   Rev 1.55   Nov 19 2002 13:56:30   cblake
Added library attributes

   Rev 1.54   Nov 15 2002 17:18:16   jbrown
added schema reference

   Rev 1.53   Nov 13 2002 16:40:44   gwatson
Updated annotation of init command.

   Rev 1.52   Nov 12 2002 15:12:54   cblake
Modified interface api in line with new standards

   Rev 1.51   Nov 12 2002 10:19:02   gwatson
Attributes of init command changed.

   Rev 1.50   Oct 31 2002 14:59:18   gwatson
Added expr attribute to assign command.

   Rev 1.49   Oct 23 2002 16:10:30   gwatson
Added log command.

   Rev 1.48   Oct 22 2002 12:19:32   psimpson
display-attr-list added and remove state name child

   Rev 1.47   Oct 15 2002 17:16:26   jbrown
Corrected xpath regexp for 'x' and whitespace

   Rev 1.46   Oct 15 2002 17:06:08   gwatson
Added try...catch...finally a looping constructs.

   Rev 1.45   Oct 03 2002 13:10:44   gwatson
Added "title" and "description" to state.
Consolidated state call syntax. Now there is one "state"
command to replace the push, pop and replace state
commands.

   Rev 1.44   Sep 26 2002 16:42:50   gwatson
Added module call/exit commands.

   Rev 1.43   Sep 24 2002 15:53:20   jbrown
Enhanced xpath regexp to cope with numbers

   Rev 1.42   Sep 17 2002 15:54:42   gwatson
Added assign command syntax.

   Rev 1.41   Sep 16 2002 12:32:06   jbrown
xpath fix plus call command proto

   Rev 1.40   Sep 13 2002 16:54:00   gwatson
Added replace-state command to module schema.

   Rev 1.39   Sep 13 2002 13:56:34   gwatson
added push/pop-state commands to schema.

   Rev 1.38   Sep 12 2002 12:11:30   jbrown
Added remove and pragma commands, fixed using clause

   Rev 1.37   Sep 11 2002 12:39:54   jbrown
attribute duplicated bug

   Rev 1.36   Sep 11 2002 11:05:10   psimpson
action-out attributes fixed

   Rev 1.35   Sep 11 2002 11:05:34   jbrown
using clause

   Rev 1.34   Sep 11 2002 10:06:48   psimpson
action-out attributes add to fox attributes group

   Rev 1.33   Sep 06 2002 12:21:32   psimpson
added run to action-out

   Rev 1.32   Sep 05 2002 16:58:40   psimpson
prompt-xpath added to the action and action-out

   Rev 1.31   Sep 05 2002 16:41:02   jbrown
set-menu now menu-out

   Rev 1.30   Sep 05 2002 16:34:42   jbrown
Annotation changed

   Rev 1.29   Sep 05 2002 14:49:26   cblake
Validate commands

   Rev 1.28   Sep 04 2002 10:24:52   cblake
Added primary key elements

   Rev 1.27   Sep 03 2002 09:48:12   jbrown
Prototype state command

   Rev 1.26   Sep 02 2002 12:51:08   jbrown
Enhanced store location using clauses and use of entered-string validation over string

   Rev 1.25   Aug 30 2002 10:45:32   psimpson
set-menu added

   Rev 1.24   Aug 29 2002 17:49:30   cblake
Map set definitions

   Rev 1.23   Aug 29 2002 11:42:58   psimpson
set-menu added

   Rev 1.22   Aug 28 2002 19:32:12   jbrown
Simple XPATH syntax validation added

   Rev 1.21   Aug 27 2002 14:51:26   jbrown
minor

   Rev 1.20   Aug 27 2002 11:23:54   jbrown
Standardisation process

   Rev 1.19   Aug 23 2002 16:45:32   jbrown
validation

   Rev 1.18   Aug 21 2002 14:30:06   jbrown
Prototyped map-set constructs (incomplete)

   Rev 1.17   Aug 19 2002 16:22:36   jbrown
Added library section and action definitions for menus

   -->
  <xs:element name="module">
    <xs:annotation>
      <xs:documentation>VALIDATION WARNING:

This schema must be validated in Text View in XML Spy. Bug: type "xs:string" already exists when validated from "Schema Design View".</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element name="header">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="name" type="fm:entered-string"/>
              <xs:element name="title" type="fm:entered-string"/>
              <xs:element name="application-title" type="fm:entered-string"/>
              <xs:element name="version-no">
                <xs:simpleType>
                  <xs:restriction base="fm:entered-string">
                    <xs:pattern value="[$]Revision(: .*){0,1}[$]"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="version-desc">
                <xs:simpleType>
                  <xs:restriction base="fm:entered-string">
                    <xs:pattern value="[$]Header(: .*){0,1}[$]"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="history">
                <xs:simpleType>
                  <xs:restriction base="fm:entered-string">
                    <xs:pattern value="\s{1,}[$]Log(: .*){0,1}[$]\s{1,}(.|\s)*"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="description" type="xs:string"/>
              <xs:element name="build-notes" type="xs:string"/>
              <xs:element name="help-text" type="xs:string"/>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="control">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="transaction-mode" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="fm:entered-string">
                    <xs:enumeration value="read-committed"/>
                    <xs:enumeration value="write-uncommitted"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="transaction-mode-new" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="fm:entered-string">
                    <xs:enumeration value="read-committed/write"/>
                    <xs:enumeration value="read-only-statement-consistent"/>
                    <xs:enumeration value="read-only-session-consistent"/>
                    <xs:enumeration value="serializable-read/write"/>
                    <xs:enumeration value="repeatable-read/write"/>
                    <xs:enumeration value="read-uncommitted/write"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="transaction-commit" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="fm:entered-string">
                    <xs:enumeration value="manual"/>
                    <xs:enumeration value="auto-action-end"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="transaction-procedural-state" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="fm:entered-string">
                    <xs:enumeration value="unimportant-auto-clear-action-end"/>
                    <xs:enumeration value="important-replay-to-restore"/>
                    <xs:enumeration value="important-failure-final"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="xml-commit" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="fm:entered-string">
                    <xs:enumeration value="auto-autonomous-action-end"/>
                    <xs:enumeration value="ZZtransactional"/>
                    <xs:enumeration value="with-transaction"/>
                    <xs:enumeration value="ZZautonomous-lock-transaction-commit"/>
                    <xs:enumeration value="ZZautonomous-lock-commit"/>
                    <xs:enumeration value="ZZtransaction-lock-commit"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="security-list">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="security-rule" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                  <xs:attribute name="name" type="xs:string" use="required"/>
                  <xs:attributeGroup ref="fm:security-rule-conditions-att-grp"/>
                </xs:complexType>
              </xs:element>
              <xs:element name="mode-rule" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                  <xs:attributeGroup ref="fm:security-rule-ref-att-grp"/>
                  <xs:attributeGroup ref="fm:security-rule-op-att-grp"/>
                  <xs:attributeGroup ref="fm:security-rule-conditions-att-grp"/>
                </xs:complexType>
              </xs:element>
              <xs:element name="view-rule" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                  <xs:attributeGroup ref="fm:security-rule-ref-att-grp"/>
                  <xs:attributeGroup ref="fm:security-rule-op-att-grp"/>
                  <xs:attributeGroup ref="fm:security-rule-conditions-att-grp"/>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="library-list">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="schema" type="fm:entered-string" minOccurs="0">
                <xs:annotation>
                  <xs:documentation>Primary data schema definition fox component in format:[Application/]ComponentPath where [Application is optional] A module can reference itself a the schema.</xs:documentation>
                </xs:annotation>
              </xs:element>
              <xs:element name="library" minOccurs="0" maxOccurs="unbounded">
                <xs:annotation>
                  <xs:documentation>Fox component reference in format:
[Application/]ComponentPath where [Application is optional] </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="fm:entered-string">
                    <xs:minLength value="1"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="storage-location-list">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="storage-location" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                  <xs:complexContent>
                    <xs:extension base="fm:storage-location-type">
                      <xs:attribute name="name" type="fm:entered-string" use="required"/>
                      <xs:attribute name="stub-overload"/>
                      <xs:attribute name="build-only"/>
                    </xs:extension>
                  </xs:complexContent>
                </xs:complexType>
              </xs:element>
              <xs:element name="file-storage-location" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                  <xs:complexContent>
                    <xs:extension base="fm:file-storage-location-type">
                      <xs:attribute name="name" type="xs:string" use="required"/>
                      <xs:attribute name="stub-overload"/>
                      <xs:attribute name="build-only"/>
                    </xs:extension>
                  </xs:complexContent>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="entry-theme-list">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="entry-theme" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="storage-location" type="fm:entered-string"/>
                    <xs:element name="state" type="fm:entered-string"/>
                    <xs:element name="attach" type="fm:fox-xpath-type"/>
                    <xs:element name="do" type="fm:do-block-type"/>
                  </xs:sequence>
                  <xs:attribute name="name" type="fm:entered-string" use="required"/>
                  <xs:attribute name="stub-overload"/>
                  <xs:attribute name="build-only"/>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="action-list" type="fm:action-list-type"/>
        <xs:element name="db-interface-list">
          <xs:annotation>
            <xs:documentation>Contains all interfaces for a module to describe how database selects, inserts updates, locks and native API calls are processed</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:sequence>
              <xs:group ref="fm:db-interface-grp"/>
            </xs:sequence>
          </xs:complexType>
          <xs:key name="db-interface-name-pkey">
            <xs:selector xpath="fm:db-interface"/>
            <xs:field xpath="@name"/>
          </xs:key>
        </xs:element>
        <xs:element name="css-list" minOccurs="0">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="css" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="presentation" type="fm:presentation-type"/>
        <xs:element name="state-list">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="state" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="action-list" type="fm:action-list-type" minOccurs="0"/>
                    <xs:element name="presentation" type="fm:presentation-type" minOccurs="0"/>
                  </xs:sequence>
                  <xs:attribute name="name" type="fm:entered-string" use="required">
                    <xs:annotation>
                      <xs:documentation>A programmatic name. This name will never be presented to the user but is used to identify this module component in a programmtic sense.
											</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="title" type="xs:string" use="optional">
                    <xs:annotation>
                      <xs:documentation>Defaults to the value of the name attribute, if not specified.</xs:documentation>
                      <xs:documentation>A human-readable short title. The title may be presented to the user.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="description" type="xs:string" use="optional">
                    <xs:annotation>
                      <xs:documentation>Defaults to the value of the title attribute, if not specified.</xs:documentation>
                      <xs:documentation>A short description that clearly states the purpose of the module component. The
description may be presented to the end user, if not specified.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="stub-overload"/>
                  <xs:attribute name="build-only"/>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="template-list">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="template" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                  <xs:sequence>
                    <xs:any namespace="##any" processContents="skip" minOccurs="0" maxOccurs="unbounded"/>
                  </xs:sequence>
                  <xs:attribute name="name" type="fm:entered-string" use="required"/>
                  <xs:attribute name="stub-only"/>
                  <xs:attribute name="build-only"/>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="map-set-list">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="map-set" minOccurs="0" maxOccurs="unbounded">
                <xs:annotation>
                  <xs:documentation>A container for key and data items such as those used in html LOV pulldowns.
<!-- 
Mapsets can have the following structures:
 
  A) A simple map set 
  
  <mapset>
     <rec>
         <key> 
           {value}
         </key>
         <data>
           {value}
         </data>
         
  B) A complex map set:
  
  <mapset>
     <rec>
         <key> 
           <{keyname1..}>
                  {value}
           </{keyname1}>
                ... 
         </key>
         <data> 
             <{dataname..}>
                 {value}   
             </{dataname}> 
             ...
          </data>
  -->
                  </xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="storage-location">
                      <xs:annotation>
                        <xs:documentation>The storage location where the map set is to be stored</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="do" type="fm:do-block-type"/>
                    <xs:element name="refresh-timeout-mins">
                      <xs:annotation>
                        <xs:documentation>If the refresh-timeout is expired then the next time a map set is accessed the contents will be reloaded</xs:documentation>
                      </xs:annotation>
                      <xs:simpleType>
                        <xs:restriction base="xs:integer">
                          <xs:minInclusive value="0"/>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:element>
                    <xs:element name="refresh-in-background" type="xs:boolean">
                      <xs:annotation>
                        <xs:documentation>for background refreshing to be enabled, the minimum refresh-timeout must be 5mins.</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                  </xs:sequence>
                  <xs:attribute name="name" type="fm:entered-string" use="required"/>
                  <xs:attribute name="stub-overload"/>
                  <xs:attribute name="build-only"/>
                  <xs:attribute name="refresh" type="fm:yn-flag" use="optional" default="Y">
                    <xs:annotation>
                      <xs:documentation>Y - a refresh will be performed at intervals specified by the map set refresh element settings.

N - indicates Fox will never refresh or initially populate the map set by executing the child DO command. This means its up to the developer to manually load the map set (possibly in the storage location initialization)</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
          <xs:key name="map-set-pk">
            <xs:selector xpath="fm:map-set"/>
            <xs:field xpath="@name"/>
          </xs:key>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:complexType name="do-block-type">
    <xs:sequence>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="apply"/>
        <xs:element name="attach">
          <xs:complexType>
            <xs:attribute name="to" type="fm:fox-xpath-type" use="required"/>
          </xs:complexType>
        </xs:element>
        <xs:element name="run-dml">
          <xs:complexType>
            <xs:annotation>
              <xs:documentation>Call a DML interface to process database records. Ins, upd, del, lock are allowed only if the interface conatins a table tag</xs:documentation>
            </xs:annotation>
            <xs:attribute name="match" type="fm:fox-xpath-type" default=".">
              <xs:annotation>
                <xs:documentation>Specifies the Xpath pathname of context nodes to process. </xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="interface" type="fm:entered-string" use="required">
              <xs:annotation>
                <xs:documentation>The interface attribute is the name of the db-interface to use </xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="ins" type="fm:yn-flag">
              <xs:annotation>
                <xs:documentation>Insert database records</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="upd" type="fm:yn-flag">
              <xs:annotation>
                <xs:documentation>Update database records</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="del" type="fm:yn-flag">
              <xs:annotation>
                <xs:documentation>Delete database records</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="lock" type="fm:yn-flag" default="N">
              <xs:annotation>
                <xs:documentation>Lock database records for update. Overides di-interface for update tag???</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="lock-when" type="fm:fox-xpath-type" use="optional">
              <xs:annotation>
                <xs:documentation>overide table XML search conditions to identify records for processing</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="del-when" type="fm:fox-xpath-type" use="optional">
              <xs:annotation>
                <xs:documentation>override table XML search conditions to identify records for processing indicates an Xpath expression</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="mode" use="optional">
              <xs:annotation>
                <xs:documentation>When purge is entered the source dom node (and all its children) will be removed. So use with care.</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="fm:entered-string">
                  <xs:enumeration value="PURGE">
                    <xs:annotation>
                      <xs:documentation>Deletes the the source dom node and all its children.
In the case of composite keys the parent node of the last key and allits children are deleted.</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="returning" type="fm:yn-flag">
              <xs:annotation>
                <xs:documentation>For ins or upd modes Indicates dom values should be updated with the results of update. This is useful where triggers modify the values during an update/insert. The DOM elements to be updateed are defined in the primary key  tags</xs:documentation>
              </xs:annotation>
            </xs:attribute>
          </xs:complexType>
        </xs:element>
        <xs:element name="run-api">
          <xs:annotation>
            <xs:documentation>Call a API interface to process database records. </xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:attribute name="match" type="fm:fox-xpath-type" default=".">
              <xs:annotation>
                <xs:documentation>Specifies the pathname of context nodes to process. </xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="interface" type="fm:entered-string" use="required">
              <xs:annotation>
                <xs:documentation>The interface attribute is the name of the db-interface to use </xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="mode">
              <xs:annotation>
                <xs:documentation>overides default mode for API</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="fm:entered-string">
                  <xs:enumeration value="PURGE-SELECTED"/>
                  <xs:enumeration value="PURGE-ALL"/>
                  <xs:enumeration value="AUGMENT"/>
                  <xs:enumeration value="ADD-TO"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="api" type="fm:entered-string"/>
          </xs:complexType>
        </xs:element>
        <xs:element name="run-query">
          <xs:complexType>
            <xs:annotation>
              <xs:documentation>Call a DML interface to query or lock database records. </xs:documentation>
            </xs:annotation>
            <xs:attribute name="match" type="fm:fox-xpath-type" default=".">
              <xs:annotation>
                <xs:documentation>“match” specifies the pathname of context nodes to process.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="interface" type="fm:entered-string" use="required">
              <xs:annotation>
                <xs:documentation>The interface attribute is the name of the db-interface to use </xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="mode">
              <xs:annotation>
                <xs:documentation>ovverides default mode for query</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="fm:entered-string">
                  <xs:enumeration value="PURGE-SELECTED"/>
                  <xs:enumeration value="PURGE-ALL"/>
                  <xs:enumeration value="AUGMENT"/>
                  <xs:enumeration value="ADD-TO"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="query" type="fm:entered-string">
              <xs:annotation>
                <xs:documentation>the name of the query within the interface that will be executed for each node matched from the match tag</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="lock" type="fm:yn-flag">
              <xs:annotation>
                <xs:documentation>Lock database records for update.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="refetch" type="fm:yn-flag">
              <xs:annotation>
                <xs:documentation>Used to requery existing records via primary key</xs:documentation>
              </xs:annotation>
            </xs:attribute>
          </xs:complexType>
        </xs:element>
        <xs:element name="assign">
          <xs:annotation>
            <xs:documentation>Assign a textual or XPath-expression value to a specified target node or nodes list. setTarget assigns nodes that exist only, whereas initTarget creates nodes if they dont exist.</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:attribute name="setTarget" type="fm:fox-xpath-type" use="optional"/>
            <xs:attribute name="initTarget" type="fm:fox-xpath-type" use="optional"/>
            <xs:attribute name="textValue" type="xs:string" use="optional"/>
            <xs:attribute name="expr" type="fm:fox-xpath-type" use="optional"/>
          </xs:complexType>
        </xs:element>
        <xs:element name="init">
          <xs:annotation>
            <xs:documentation>Initialise elements from a named template or from the data schema.

If initialising from the schema, schema elements can make use of the 'default' or 'fixed' value attributes.

</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:sequence>
              <xs:any namespace="##any" processContents="skip" minOccurs="0" maxOccurs="unbounded"/>
            </xs:sequence>
            <xs:attribute name="target" type="fm:fox-xpath-type" use="optional" default=".">
              <xs:annotation>
                <xs:documentation>The target(s) to initialise, relative to the current attach point. The specified target(s) may exist in the Data DOM, or refer to nodes in the Model DOM (via simple XPath) or may be a user-defined path.

Whether existing targetted nodes are initialised or new nodes are created depends
on the value of the 'method' attribute.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="template" type="fm:entered-string" use="optional">
              <xs:annotation>
                <xs:documentation>The name of the template, within the module, to call.

Note that all child nodes of the template are used in the initialisation
process and those nodes MUST be in the same XML namespace -
the empty namespace ("") - as the DATA/Model DOM.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="for-schema" type="fm:entered-string" use="optional" default=".">
              <xs:annotation>
                <xs:documentation>The elements from the Model DOM, relative to the specified target node(s),
that are to be initialised under the target node(s).</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="min-occurs" type="xs:integer" use="optional">
              <xs:annotation>
                <xs:documentation>If the method is 'new' or 'both', the minimum number of target node types
to ensure exist. Nodes may be created in order to bring the total number of
target node types up to the minimum specified.
</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="max-occurs" type="xs:integer" use="optional">
              <xs:annotation>
                <xs:documentation>If the method is 'new' or 'both', the maximum number of target node types
that will exist as a result of the initialise operation. The initialise operation will
never exceed the specified maximum bound when new target node(s) are created.

Depending on the value of the 'new-target-count' attribute, the number of target nodes
may be brought up to the specified maximum bound.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="method" use="optional" default="both">
              <xs:annotation>
                <xs:documentation>The initialisation method: new, augment or both (the default). The targetted
node(s) are initialised from the specified template or schema elements. The
template or schema elements will be initialised as new children of the targetted
node(s).

If the method is 'new', the 'new-target-count' attribute should be used to specify
the number of new targets required. The 'min-occurs' and 'max-occurs' attributes
may also be specified to bring the number of target node type instances up to
the specified minimum number and up to, but not exceeding, the maximum number.

If the method is 'augment', only existing target nodes will be initialised. Any
child nodes, of the targetted nodes, that do not have any content will be initialised
according to their configured initialisation attributes from the Model DOM.

For the method of 'both', which is the default method, any target nodes that
exist and any required new target node instances (refer to the 'new' and 'augment'
attributes) are initialised.
</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="fm:entered-string">
                  <xs:enumeration value="both">
                    <xs:annotation>
                      <xs:documentation>The default mode. The initialise command may potentially, depending on your
new-target-count, min-occurs or max-occurs attributes, create new instances of
the target node type and augment any existing intances it finds.</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="new">
                    <xs:annotation>
                      <xs:documentation>The initialise command may potentially, depending on your
new-target-count, min-occurs or max-occurs attributes, create new instances of
the target node type and ONLY initialise those new instances created.

Any existing intances of the target node type will not be initialised by this invocation
on init.</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="augment">
                    <xs:annotation>
                      <xs:documentation>In this mode, the initialise command will only add to any existing intances of the
target node type it finds. Any descendants of existing targets will be recursively
searched and created where they do not yet exist according to the meta-model.</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="new-target-count" type="xs:integer" use="optional"/>
          </xs:complexType>
        </xs:element>
        <xs:element name="if">
          <xs:annotation>
            <xs:documentation>An industry standard if-then-else-if-else like command.</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:sequence>
              <xs:element name="then" type="fm:do-block-type"/>
              <xs:element name="else-if" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                  <xs:complexContent>
                    <xs:extension base="fm:do-block-type">
                      <xs:attribute name="test" type="xs:string" use="required"/>
                    </xs:extension>
                  </xs:complexContent>
                </xs:complexType>
              </xs:element>
              <xs:element name="else" type="fm:do-block-type" minOccurs="0"/>
            </xs:sequence>
            <xs:attribute name="test" type="fm:fox-xpath-type" use="required"/>
          </xs:complexType>
        </xs:element>
        <xs:element name="move">
          <xs:annotation>
            <xs:documentation>Moves elements from a named location to a new destination.</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:attribute name="from" type="fm:fox-xpath-type" use="optional" default="."/>
            <xs:attribute name="to" type="fm:fox-xpath-type" use="optional" default="."/>
          </xs:complexType>
        </xs:element>
        <xs:element name="copy">
          <xs:annotation>
            <xs:documentation>Copies elements from a named location to another location.</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:attribute name="from" type="fm:fox-xpath-type" use="optional" default="."/>
            <xs:attribute name="to" type="fm:fox-xpath-type" use="optional" default="."/>
          </xs:complexType>
        </xs:element>
        <xs:element name="process-set">
          <xs:annotation>
            <xs:documentation>Map-set set operator processing - to be defined JB</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:attribute name="target-set"/>
          </xs:complexType>
        </xs:element>
        <xs:element name="refresh-map-set">
          <xs:annotation>
            <xs:documentation>Deletes and refreshes the map set from scratch regardless of timeout settings</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:attribute name="name" type="fm:entered-string" use="required"/>
          </xs:complexType>
        </xs:element>
        <xs:group ref="fm:validate-cmd-grp"/>
        <xs:group ref="fm:do-cmd-grp"/>
        <xs:group ref="fm:cmd-remove-grp"/>
        <xs:group ref="fm:cmd-pragma-grp"/>
        <xs:group ref="fm:cmd-call-grp"/>
        <xs:element name="try">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="do" type="fm:do-block-type"/>
              <xs:element name="catch" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="do" type="fm:do-block-type"/>
                  </xs:sequence>
                  <xs:attribute name="codes" type="xs:NMTOKENS" use="required"/>
                </xs:complexType>
              </xs:element>
              <xs:element name="finally" minOccurs="0">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="do" type="fm:do-block-type"/>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="throw">
          <xs:complexType>
            <xs:attribute name="code" type="xs:NMTOKEN" use="required"/>
            <xs:attribute name="message" type="xs:string" use="required"/>
          </xs:complexType>
        </xs:element>
        <xs:element name="while">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="do" type="fm:do-block-type"/>
            </xs:sequence>
            <xs:attribute name="xpath" type="fm:fox-xpath-type" use="required"/>
          </xs:complexType>
        </xs:element>
        <xs:element name="for-each">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="do" type="fm:do-block-type"/>
            </xs:sequence>
            <xs:attribute name="xpath" type="fm:fox-xpath-type" use="optional"/>
            <xs:attribute name="itemContextName" type="xs:string" use="optional" default="loopItem"/>
            <xs:attribute name="statusContextName" type="xs:string" use="optional" default="loopStatus"/>
            <xs:attribute name="num-range-from" type="xs:double" use="optional" default="0"/>
            <xs:attribute name="num-range-to" type="xs:double" use="optional" default="-1"/>
            <xs:attribute name="num-range-step" type="xs:double" use="optional" default="1"/>
          </xs:complexType>
        </xs:element>
        <xs:element name="log">
          <xs:complexType>
            <xs:attribute name="message" type="xs:string" use="required">
              <xs:annotation>
                <xs:documentation>The message to be logged.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
          </xs:complexType>
        </xs:element>
        <xs:element name="alert">
          <xs:annotation>
            <xs:documentation>Creates a javascript dialog box on the screen next time the page loads.</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:attribute name="message" type="xs:string" use="required"/>
          </xs:complexType>
        </xs:element>
        <xs:element name="focus">
          <xs:complexType>
            <xs:attribute name="xpath" type="xs:string" use="required"/>
          </xs:complexType>
        </xs:element>
        <xs:element name="rename">
          <xs:complexType>
            <xs:attribute name="match" type="fm:fox-xpath-type" use="required"/>
            <xs:attribute name="rename-to" type="xs:string" use="required"/>
          </xs:complexType>
        </xs:element>
        <xs:element name="transaction">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="do" type="fm:do-block-type" minOccurs="0"/>
            </xs:sequence>
            <xs:attribute name="operation" use="required">
              <xs:simpleType>
                <xs:restriction base="fm:entered-string">
                  <xs:enumeration value="COMMIT"/>
                  <xs:enumeration value="JOIN"/>
                  <xs:enumeration value="ROLLBACK"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="transaction" type="fm:entered-string" use="optional"/>
          </xs:complexType>
        </xs:element>
        <xs:element name="XSLTransform">
          <xs:annotation>
            <xs:documentation>Transforms XML with an XSLT style sheet.</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:attribute name="source-xml-xpath" type="fm:fox-xpath-type" use="optional">
              <xs:annotation>
                <xs:documentation>The source root element of the data to be transformed. This may refer to a file-type
element, in which case the content of the file (assumed to be XML) is used as
the source.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="source-xsl-URI" type="fm:entered-string" use="optional">
              <xs:annotation>
                <xs:documentation>The source URI which may refer to an entry in the applications resource table, for example "xsl/continuous-usage", a resource within the WAR or EAR deployement
or an external resource on the web.

The resource is assumed to be an XSL Style Sheet for Transformation (XSLT).</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="target-xpath" type="fm:fox-xpath-type" use="optional">
              <xs:annotation>
                <xs:documentation>The parent element under which the transformed data will be placed.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
          </xs:complexType>
        </xs:element>
        <xs:element name="generate">
          <xs:annotation>
            <xs:documentation>Generate a fox display and then store the output (HTML) so it can be accessed later. 
Note that all database operations are currently performed in a discreet database transaction.
Usage attrs:
- state="state_name", is used to specify the display state to generate display with - when not specified current state is used.
- buffer="state_name|MODULE/buffer_name", is used to specify the starting buffer to generate - when not specified special PAGE is used.
- method="preview", the output is displayed immediately in a pop-up window - feature often used for Print Preview pop-up.
- method="storage-location", the output will be saved using a standard fox storage location. Also need attrs:
  -- storage-location="storage_location_name", the name of the storage-location to use.
- method="copy-to", the output (html node) is copied to one or more DOM elements. Also need attrs:
  -- copy-to-xpath="xpath", the dom nodes to copy html node to (will create dom node when does not exist).
- method="url" (formally internal), the output is saved in fox server internally for access later via a URL. Also need attrs:
  -- url-xpath="xpath", (formally target="xpath") an element which will be assigned with the full URL string needed to access the output.
  -- expires="HH:MM", duration to hold output in fox server for - after this time the url may not return the output - default 00:09.
  -- client-cache="HH:MM", tells client browser to cache url page for duration, so repeated url use does not reload from server - default 00:00.
  -- scope="SESSION", fixed value - reserved for future use to indicate who can access the url - currently no security restriction if have url.
  -- content-type="text/html; charset=UTF-8", fixed value for output encoding mime-type - reserved for future use. 

For the MS Excel methods of CSV and XLS, the type of generated cells is derived, by default, from schema mode. If the type of each cell cannot be derived from the schema model, the type and format of generated column cells may be set explicitly using the "type" and "format-spec" attributes of the generate-column specifiers. Otherwise the default generated type of each cell is "string".</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:group ref="fm:generate-cmd-grp"/>
            <xs:attribute name="method" use="required">
              <xs:annotation>
                <xs:documentation>- method="preview", the output is displayed immediately in a pop-up window - feature often used for Print Preview pop-up.
- method="storage-location", the output will be saved using a standard fox storage location. Also need attrs:
  -- storage-location="storage_location_name", the name of the storage-location to use.
- method="copy-to", the output (html node) is copied to one or more DOM elements. Also need attrs:
  -- copy-to-xpath="xpath", the dom nodes to copy html node to (will create dom node when does not exist).
- method="url" (formally internal), the output is saved in fox server internally for access later via a URL. Also need attrs:
  -- url-xpath="xpath", (formally target="xpath") an element which will be assigned with the full URL string needed to access the output.
  -- expires="HH:MM", duration to hold output in fox server for - after this time the url may not return the output - default 00:09.
  -- client-cache="HH:MM", tells client browser to cache url page for duration, so repeated url use does not reload from server - default 00:00.
  -- scope="SESSION", fixed value - reserved for future use to indicate who can access the url - currently no security restriction if have url.
  -- content-type="text/html; charset=UTF-8", fixed value for output encoding mime-type - reserved for future use. </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:enumeration value="preview"/>
                  <xs:enumeration value="url"/>
                  <xs:enumeration value="storage-location"/>
                  <xs:enumeration value="copy-to"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="state" type="xs:string" use="optional">
              <xs:annotation>
                <xs:documentation>state="state_name", is used to specify the display state to generate display with - when not specified current state is used.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="buffer" type="xs:string" use="optional">
              <xs:annotation>
                <xs:documentation>buffer="state_name|MODULE/buffer_name", is used to specify the starting buffer to generate - when not specified special PAGE is used.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="storage-location" type="fm:entered-string" use="optional">
              <xs:annotation>
                <xs:documentation>- method="storage-location", the output will be saved using a standard fox storage location. Also need attrs:
  -- storage-location="storage_location_name", the name of the storage-location to use.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="copy-to-path" type="fm:fox-xpath-type" use="optional">
              <xs:annotation>
                <xs:documentation>- method="copy-to", the output (html node) is copied to one or more DOM elements. Also need attrs:
  -- copy-to-xpath="xpath", the dom nodes to copy html node to (will create dom node when does not exist).</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="url-xpath" type="fm:fox-xpath-type" use="optional">
              <xs:annotation>
                <xs:documentation>- method="url" (formally internal), the output is saved in fox server internally for access later via a URL. Also need attrs:
  -- url-xpath="xpath", (formally target="xpath") an element which will be assigned with the full URL string needed to access the output.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="expires" use="optional" default="00:09">
              <xs:annotation>
                <xs:documentation>- method="url" (formally internal), the output is saved in fox server internally for access later via a URL. Also need attrs:
  -- expires="HH:MM", duration to hold output in fox server for - after this time the url may not return the output - default 00:09.
</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:pattern value="\d*:?\d+"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="client-cache" use="optional" default="0">
              <xs:annotation>
                <xs:documentation>- method="url" (formally internal), the output is saved in fox server internally for access later via a URL. Also need attrs:
  -- client-cache="HH:MM", tells client browser to cache url page for duration, so repeated url use does not reload from server - default 00:00.
</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:pattern value="\d*:?\d+"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="scope" use="optional" fixed="SESSION">
              <xs:annotation>
                <xs:documentation>- method="url" (formally internal), the output is saved in fox server internally for access later via a URL. Also need attrs:
  -- scope="SESSION", fixed value - reserved for future use to indicate who can access the url - currently no security restriction if have url.
</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string"/>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="content-type" type="xs:string" use="optional" fixed="text/html; charset=UTF-8">
              <xs:annotation>
                <xs:documentation>- method="url" (formally internal), the output is saved in fox server internally for access later via a URL. Also need attrs:
  -- content-type="text/html; charset=UTF-8", fixed value for output encoding mime-type - reserved for future use. </xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="output-type" use="optional" default="XHTML">
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:enumeration value="XHTML"/>
                  <xs:enumeration value="CSV"/>
                  <xs:enumeration value="XLS"/>
                  <xs:enumeration value="XML"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
          </xs:complexType>
        </xs:element>
        <xs:element name="context-localise">
          <xs:complexType>
            <xs:complexContent>
              <xs:extension base="fm:do-block-type">
                <xs:attribute name="name" type="fm:entered-string" use="optional" default="local"/>
                <xs:attribute name="xpath" type="fm:fox-xpath-type" use="optional" default="."/>
                <xs:attribute name="map-set" type="fm:entered-string" use="optional"/>
                <xs:attribute name="storage-location" type="fm:entered-string" use="optional"/>
                <xs:attribute name="operation" use="optional">
                  <xs:simpleType>
                    <xs:restriction base="fm:entered-string">
                      <xs:enumeration value="reset-references"/>
                    </xs:restriction>
                  </xs:simpleType>
                </xs:attribute>
                <xs:attribute name="return-storage-id" type="fm:entered-string" use="optional"/>
              </xs:extension>
            </xs:complexContent>
          </xs:complexType>
        </xs:element>
        <xs:element name="context-set">
          <xs:annotation>
            <xs:documentation>scope="state" to set context for current state only - usually the case. scope="localised" is used only when inside fm:context-localise or fm:for-each blocks.</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:attribute name="scope" use="required">
              <xs:annotation>
                <xs:documentation>scope="state" to set context for current state only - usually the case. scope="localised" is used only when inside fm:context-localise or fm:for-each blocks.</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:enumeration value="state"/>
                  <xs:enumeration value="localised"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="name" type="fm:entered-string" use="required"/>
            <xs:attribute name="xpath" type="fm:fox-xpath-type" use="required"/>
          </xs:complexType>
        </xs:element>
        <xs:element name="context-clear">
          <xs:annotation>
            <xs:documentation>scope="state" to clear context for current state only - usually the case. scope="localised" is used only when inside fm:context-localise or fm:for-each blocks.</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:attribute name="scope" use="required">
              <xs:annotation>
                <xs:documentation>scope="state" to clear context for current state only - usually the case. scope="localised" is used only when inside fm:context-localise or fm:for-each blocks.</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:enumeration value="state"/>
                  <xs:enumeration value="localised"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="name" type="fm:entered-string" use="required"/>
          </xs:complexType>
        </xs:element>
        <xs:element name="eval">
          <xs:complexType>
            <xs:attribute name="match" type="fm:fox-xpath-type" use="optional"/>
            <xs:attribute name="expr" use="optional"/>
          </xs:complexType>
        </xs:element>
        <xs:element name="send">
          <xs:complexType>
            <xs:sequence minOccurs="0" maxOccurs="unbounded">
              <xs:element name="part">
                <xs:complexType>
                  <xs:attribute name="section"/>
                  <xs:attribute name="url-xpath"/>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
            <xs:attribute name="addressee-xpath"/>
          </xs:complexType>
        </xs:element>
        <xs:element name="order">
          <xs:complexType>
            <xs:sequence maxOccurs="unbounded">
              <xs:element name="by">
                <xs:complexType>
                  <xs:attribute name="key" type="fm:fox-xpath-type"/>
                  <xs:attribute name="logic" use="optional">
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:enumeration value="blank-number-alpha-ascend"/>
                        <xs:enumeration value="blank-number-alpha-descend"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
            <xs:attribute name="match" type="fm:fox-xpath-type"/>
          </xs:complexType>
        </xs:element>
        <xs:element name="compare">
          <xs:complexType>
            <xs:attribute name="context-one" type="fm:entered-string" use="required"/>
            <xs:attribute name="context-two" type="fm:entered-string" use="required"/>
            <xs:attribute name="version-one" type="fm:entered-string" use="optional"/>
            <xs:attribute name="version-two" type="fm:entered-string" use="required"/>
            <xs:attribute name="context-out" type="fm:entered-string" use="required"/>
            <xs:attribute name="schema-module" type="fm:entered-string" use="optional"/>
          </xs:complexType>
        </xs:element>
        <xs:group ref="fm:server-side-include-cmd-grp"/>
        <xs:element name="security-scope">
          <xs:annotation>
            <xs:documentation>Chamges the current user system-level and object-level privileges.

The defaul for system-level privileges is "*" (all); with the default for object-level privileges set to "" (none).</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:attribute name="csv-system-privs" type="xs:string" default="*">
              <xs:annotation>
                <xs:documentation>Comma-Seperated-Values list of system-level privileges.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="uref-xpath" type="fm:fox-xpath-type">
              <xs:annotation>
                <xs:documentation>An XPath expression that identifies the Universal References (URefs) of the items whose object-level priveleges are to be obtained for the current user.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="csv-object-privs" type="xs:string">
              <xs:annotation>
                <xs:documentation>Comma-Seperated-Values list of object-level privileges to check against the urefs identified by the uref-xpath for the current user.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="csv-uref-types" type="xs:string">
              <xs:annotation>
                <xs:documentation>Comma-Seperated-Values list of Universal Reference Types of objects whose object-level priveleges are to be determined for the current user.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
          </xs:complexType>
        </xs:element>
        <xs:element name="set-cookie">
          <xs:complexType>
            <xs:attribute name="name" type="fm:fox-xpath-type" use="required"/>
            <xs:attribute name="value" type="fm:fox-xpath-type" use="required"/>
            <xs:attribute name="max-age" type="fm:fox-xpath-type" use="optional" default="-1">
              <xs:annotation>
                <xs:documentation>The maximum age of the cookie, in seconds. By default, this is set to
-1 to indicate until browser shutdown.

While this can be an XPath expression it must yield a numeric value.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
          </xs:complexType>
        </xs:element>
        <xs:element name="user-login">
          <xs:annotation>
            <xs:documentation>Logs in a portal user. The current FOX session is then owned by the specified user.</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:attribute name="wua-login-id" type="fm:fox-xpath-type" use="required">
              <xs:annotation>
                <xs:documentation>The Web User Account Login ID of the user to log in.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="password" type="fm:fox-xpath-type" use="required">
              <xs:annotation>
                <xs:documentation>The password for the user account specified.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
          </xs:complexType>
        </xs:element>
        <xs:element name="user-logout">
          <xs:annotation>
            <xs:documentation>Logs out the current user from the portal.

The user is returned to the Portal Home page.</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:group ref="fm:cmd-matrix"/>
        <xs:element name="state">
          <xs:annotation>
            <xs:documentation>
State transition command. Use this command to move between states on your bunsess workflow diagram.

This behaviour of this command is determined by the 'action' attribute:

push:
Adds a new state to the state-call stack.
Note that any previous states still exist on the stack-call stack. Any previous state will be returned to when the state added is subsequently 'popped' off the stack.

pop:
Pops off the state at the top of the state-call stack.

replace:
Replaces the topmost state, on the state-call stack, with the specified state.
Can also be used to replace all states on the state-call stack with the state specified.
</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:attribute name="action" use="required">
              <xs:simpleType>
                <xs:restriction base="fm:entered-string">
                  <xs:enumeration value="push"/>
                  <xs:enumeration value="replace"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="name" type="xs:string" use="optional"/>
            <xs:attribute name="attach" type="fm:fox-xpath-type" use="optional"/>
            <xs:attribute name="all" type="xs:boolean" use="optional" default="false"/>
          </xs:complexType>
        </xs:element>
        <xs:element name="state-push">
          <xs:annotation>
            <xs:documentation>
State transition command. Use this command to move between states on your bunsess workflow diagram.

This behaviour of this command is determined by the 'action' attribute:

push:
Adds a new state to the state-call stack.
Note that any previous states still exist on the stack-call stack. Any previous state will be returned to when the state added is subsequently 'popped' off the stack.

pop:
Pops off the state at the top of the state-call stack.

replace:
Replaces the topmost state, on the state-call stack, with the specified state.
Can also be used to replace all states on the state-call stack with the state specified.
</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:attribute name="name" type="xs:string" use="optional"/>
            <xs:attribute name="attach" type="fm:fox-xpath-type" use="optional"/>
            <xs:attribute name="all" type="xs:boolean" use="optional" default="false"/>
          </xs:complexType>
        </xs:element>
        <xs:element name="state-replace">
          <xs:annotation>
            <xs:documentation>
State transition command. Use this command to move between states on your bunsess workflow diagram.

This behaviour of this command is determined by the 'action' attribute:

push:
Adds a new state to the state-call stack.
Note that any previous states still exist on the stack-call stack. Any previous state will be returned to when the state added is subsequently 'popped' off the stack.

pop:
Pops off the state at the top of the state-call stack.

replace:
Replaces the topmost state, on the state-call stack, with the specified state.
Can also be used to replace all states on the state-call stack with the state specified.
</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:attribute name="name" type="xs:string" use="optional"/>
            <xs:attribute name="attach" type="fm:fox-xpath-type" use="optional"/>
            <xs:attribute name="all" type="xs:boolean" use="optional" default="false"/>
          </xs:complexType>
        </xs:element>
        <xs:element name="state-strict-pop">
          <xs:annotation>
            <xs:documentation>
State transition command. Use this command to move between states on your bunsess workflow diagram.

This behaviour of this command is determined by the 'action' attribute:

push:
Adds a new state to the state-call stack.
Note that any previous states still exist on the stack-call stack. Any previous state will be returned to when the state added is subsequently 'popped' off the stack.

pop:
Pops off the state at the top of the state-call stack.

replace:
Replaces the topmost state, on the state-call stack, with the specified state.
Can also be used to replace all states on the state-call stack with the state specified.
</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:attribute name="name" type="xs:string" use="optional"/>
            <xs:attribute name="attach" type="fm:fox-xpath-type" use="optional"/>
            <xs:attribute name="all" type="xs:boolean" use="optional" default="false"/>
          </xs:complexType>
        </xs:element>
      </xs:choice>
      <xs:choice minOccurs="0">
        <xs:element name="call-module">
          <xs:annotation>
            <xs:documentation>Calls a theme in the same or  another module, modally or modelessly.

A modal call shares the original browser window. A modeless call launches a new browser window that is a child of the current browser.

A called module must exit a call with the exit-module command.</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:attribute name="module" type="xs:string" use="required">
              <xs:annotation>
                <xs:documentation>The name of the module, within the specified application, to call. Defaults
to the current module.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="theme" type="xs:string" use="required">
              <xs:annotation>
                <xs:documentation>The name of the theme. within the specified application and module, to call.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="type" use="required">
              <xs:annotation>
                <xs:documentation>The type of module call. Must be one of:
modal - the existing browser window will be used to display the call dialog
modeless - a new window (a child of the existing browser) will be used to display
the call dialog. See windowName and windowProperties attributes.</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:enumeration value="modal"/>
                  <xs:enumeration value="modeless"/>
                  <xs:enumeration value="modal-return-to-first-or-replace-all-cancel-callbacks"/>
                  <xs:enumeration value="modal-replace-all-cancel-callbacks"/>
                  <xs:enumeration value="modal-replace-this-cancel-callbacks"/>
                  <xs:enumeration value="modal-replace-this-caller-callbacks-now-then-cancel-callbacks"/>
                  <xs:enumeration value="modal-replace-this-preserve-caller-callbacks-for-exit"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="app" type="xs:string" use="optional">
              <xs:annotation>
                <xs:documentation>The application mnemonic of the application whose module is to be called. Defaults
to the current application.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="params" type="xs:string" use="optional">
              <xs:annotation>
                <xs:documentation>An xpath expression that returns a node list which are the parameters of the
module call. These parameters are passed, by value, to the called module.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="literalParams" type="xs:string" use="optional">
              <xs:annotation>
                <xs:documentation>A comma-separated list of 'name=value' pairs that are additional parameters to
the module call.

Example:

literalParams="type=P,no=6000"

** NOTE: This is an in-progress solution and may change in the future.

</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="callback-action" type="xs:string" use="optional">
              <xs:annotation>
                <xs:documentation>The action to be called, in the calling module, upon exit of the called module.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="returnTargets" type="xs:string" use="optional">
              <xs:annotation>
                <xs:documentation>An xpath expression that returns a node list that identifies one or more nodes
in the calling modules data document. Any return values, from the
called module, are subsequently copied to these nodes on return from the module call.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="windowName" type="xs:string" use="optional">
              <xs:annotation>
                <xs:documentation>The name of the window, if required by the fox developer.

If specified, any child popup window will have the specified name. If a child with the specifed name
already exists, the same window will be reused. This give the fox developer control
over the number and reuse of child popups.

If not specified, a unique name is generated for any child popup that results from
the module call. This guarantees that a new child window will always appear for the
call, if modeless.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="windowProperties" type="xs:string" use="optional">
              <xs:annotation>
                <xs:documentation>Only applicable to modeless module calls. A comma-separated list of properties
of the child window that will display the module call dialog. These are
javascript properties (see javascript reference manual on 'window'
object) that specifiy the window geometry etc. etc.

Example:

windowProperties="width=200,height=600,resizable,status,toolbar,menubar"

** NOTE: This is an in-progress solution and may change in the future.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
          </xs:complexType>
        </xs:element>
        <xs:element name="exit-module">
          <xs:annotation>
            <xs:documentation>Exits the current module call. 
This command should be used to physically end a module call that maps to a logical end to some business process or procedure.</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:attribute name="type" use="optional">
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:enumeration value="exit-this-preserve-callbacks"/>
                  <xs:enumeration value="exit-this-cancel-callbacks"/>
                  <xs:enumeration value="exit-all-cancel-callbacks"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="uri" type="xs:string" use="optional"/>
          </xs:complexType>
        </xs:element>
        <xs:element name="state">
          <xs:annotation>
            <xs:documentation>
State transition command. Use this command to move between states on your bunsess workflow diagram.

This behaviour of this command is determined by the 'action' attribute:

push:
Adds a new state to the state-call stack.
Note that any previous states still exist on the stack-call stack. Any previous state will be returned to when the state added is subsequently 'popped' off the stack.

pop:
Pops off the state at the top of the state-call stack.

replace:
Replaces the topmost state, on the state-call stack, with the specified state.
Can also be used to replace all states on the state-call stack with the state specified.
</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:attribute name="action" use="required">
              <xs:simpleType>
                <xs:restriction base="fm:entered-string">
                  <xs:enumeration value="pop"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="name" type="xs:string" use="optional"/>
            <xs:attribute name="attach" type="fm:fox-xpath-type" use="optional"/>
            <xs:attribute name="all" type="xs:boolean" use="optional" default="false"/>
          </xs:complexType>
        </xs:element>
        <xs:element name="state-pop">
          <xs:annotation>
            <xs:documentation>
State transition command. Use this command to move between states on your bunsess workflow diagram.

This behaviour of this command is determined by the 'action' attribute:

push:
Adds a new state to the state-call stack.
Note that any previous states still exist on the stack-call stack. Any previous state will be returned to when the state added is subsequently 'popped' off the stack.

pop:
Pops off the state at the top of the state-call stack.

replace:
Replaces the topmost state, on the state-call stack, with the specified state.
Can also be used to replace all states on the state-call stack with the state specified.
</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:attribute name="name" type="xs:string" use="optional"/>
            <xs:attribute name="attach" type="fm:fox-xpath-type" use="optional"/>
            <xs:attribute name="all" type="xs:boolean" use="optional" default="false"/>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:sequence>
  </xs:complexType>
  <xs:simpleType name="yn-flag">
    <xs:annotation>
      <xs:documentation>Allows Y or N null is treated as a Y</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value=""/>
      <xs:enumeration value="Y"/>
      <xs:enumeration value="N"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="presentation-type">
    <xs:sequence>
      <xs:element name="set-page" minOccurs="0">
        <xs:complexType>
          <xs:complexContent>
            <xs:extension base="html-or-fox-html-tags-type">
              <xs:attribute name="stub-overload"/>
              <xs:attribute name="build-only"/>
            </xs:extension>
          </xs:complexContent>
        </xs:complexType>
      </xs:element>
      <xs:element name="set-buffer" minOccurs="0" maxOccurs="unbounded">
        <xs:complexType mixed="true">
          <xs:complexContent mixed="true">
            <xs:extension base="html-or-fox-html-tags-type">
              <xs:attribute name="name" type="fm:entered-string"/>
              <xs:attribute name="stub-overload"/>
              <xs:attribute name="build-only"/>
            </xs:extension>
          </xs:complexContent>
        </xs:complexType>
      </xs:element>
      <xs:element name="display-attr-list" minOccurs="0">
        <xs:complexType>
          <xs:complexContent>
            <xs:extension base="fm:display-attr-list-type">
              <xs:attribute name="stub-overload"/>
              <xs:attribute name="build-only"/>
            </xs:extension>
          </xs:complexContent>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="action-list-type">
    <xs:sequence>
      <xs:element name="action" minOccurs="0" maxOccurs="unbounded">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="do" type="fm:do-block-type"/>
          </xs:sequence>
          <xs:attribute name="name" type="fm:slashless-entered-string" use="required"/>
          <xs:attribute name="no-apply" type="fm:yn-flag"/>
          <xs:attribute name="stub-overload"/>
          <xs:attribute name="build-only"/>
          <xs:attributeGroup ref="fox:zzz-action-attr-grp"/>
          <xs:attributeGroup ref="foxg:zzz-action-attr-grp"/>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="storage-location-type">
    <xs:annotation>
      <xs:documentation>BEST DEFINED A TYPE, as storage location used with different attrs (module/map-set)</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="cache-key">
        <xs:complexType>
          <xs:sequence>
            <xs:group ref="fm:using-clause-grp"/>
          </xs:sequence>
          <xs:attribute name="string" type="xs:string" use="required"/>
        </xs:complexType>
      </xs:element>
      <xs:element name="new-document">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="root-element" type="fm:entered-string"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="database" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="query" minOccurs="0">
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="sql" type="fm:entered-string"/>
                  <xs:group ref="fm:using-clause-grp"/>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name="lock" minOccurs="0">
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="sql">
                    <xs:complexType>
                      <xs:simpleContent>
                        <xs:extension base="fm:entered-string">
                          <xs:attribute name="language" form="unqualified">
                            <xs:simpleType>
                              <xs:restriction base="fm:entered-string">
                                <xs:enumeration value="PL/SQL"/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:attribute>
                        </xs:extension>
                      </xs:simpleContent>
                    </xs:complexType>
                  </xs:element>
                  <xs:group ref="fm:using-clause-grp"/>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name="insert" minOccurs="0">
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="do" type="fm:do-block-type" minOccurs="0"/>
                  <xs:element name="sql" type="fm:entered-string"/>
                  <xs:group ref="fm:using-clause-grp"/>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name="update" minOccurs="0">
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="sql" type="fm:entered-string"/>
                  <xs:group ref="fm:using-clause-grp"/>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="file-storage-location-type">
    <xs:annotation>
      <xs:documentation>Storage location sub-class for files.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="cache-key">
        <xs:complexType>
          <xs:sequence>
            <xs:group ref="fm:using-clause-grp"/>
          </xs:sequence>
          <xs:attribute name="string" type="xs:string" use="required"/>
        </xs:complexType>
      </xs:element>
      <xs:sequence>
        <xs:element name="database" minOccurs="0">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="query">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="sql" type="fm:entered-string"/>
                    <xs:group ref="fm:using-clause-grp"/>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element name="insert" minOccurs="0">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="sql" type="fm:entered-string"/>
                    <xs:group ref="fm:using-clause-grp"/>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element name="update" minOccurs="0">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="sql" type="fm:entered-string"/>
                    <xs:group ref="fm:using-clause-grp"/>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element name="delete" minOccurs="0">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="sql" type="fm:entered-string"/>
                    <xs:group ref="fm:using-clause-grp"/>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="api" minOccurs="0">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="statement">
                <xs:annotation>
                  <xs:documentation>A code/script block with bind variables. The code block might be a PL/SQL anonymous block or Java.</xs:documentation>
                </xs:annotation>
              </xs:element>
              <xs:element name="using" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                  <xs:simpleContent>
                    <xs:extension base="xs:string">
                      <xs:attribute name="using-type" use="optional">
                        <xs:simpleType>
                          <xs:restriction base="fm:entered-string">
                            <xs:enumeration value="XPATH"/>
                            <xs:enumeration value="UNIQUE"/>
                            <xs:enumeration value="STATIC"/>
                            <xs:enumeration value="DATA-XMLTYPE"/>
                            <xs:enumeration value="DATA-CLOB"/>
                            <xs:enumeration value="DATA-BLOB"/>
                            <xs:enumeration value="FILE-METADATA-XMLTYPE"/>
                          </xs:restriction>
                        </xs:simpleType>
                      </xs:attribute>
                    </xs:extension>
                  </xs:simpleContent>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
            <xs:attribute name="language" default="PL/SQL">
              <xs:annotation>
                <xs:documentation>Specifies the language of the api call. Initially only PL/SQL is supported</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="fm:entered-string">
                  <xs:enumeration value="PL/SQL"/>
                  <xs:enumeration value="SOAP"/>
                  <xs:enumeration value="JAVA"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:sequence>
  </xs:complexType>
  <xs:group name="db-interface-grp">
    <xs:sequence>
      <xs:element name="db-interface" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>Defrines multiple SQL queries tags to populate DOM. Up to 1 table tag to populate database from DOM and multiple API calls to make native code callouts if required</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="table" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Provides lock and other processing to populate the database from DOM.</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="map-path">
                    <xs:annotation>
                      <xs:documentation>Defines the DOM source for the table tag. </xs:documentation>
                      <xs:documentation>Defines the DOM target for all select tags and/or          Defines the DOM source for the table tag. Mandatory for non-singleton selects or if a  table tag is present.</xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:attribute name="match" type="xs:string">
                        <xs:annotation>
                          <xs:documentation>Specifies the pathname of context nodes to process in XPath format. The directory portion of this pathname must only navigate through single instance nodes. The base name part can have multiple node instances, all of which will be processed.</xs:documentation>
                        </xs:annotation>
                      </xs:attribute>
                    </xs:complexType>
                  </xs:element>
                  <xs:element name="primary">
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="key" maxOccurs="unbounded">
                          <xs:annotation>
                            <xs:documentation>The Primary or composite part of the primary key. This refers to the database column name</xs:documentation>
                          </xs:annotation>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element name="using" minOccurs="0" maxOccurs="unbounded">
                    <xs:annotation>
                      <xs:documentation>Overrides the default sql to dom data conversion rules  </xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:simpleContent>
                        <xs:extension base="fm:entered-string">
                          <xs:attribute name="datadom-type">
                            <xs:annotation>
                              <xs:documentation>The FOX dom type that this attribute maps to.
If not entered fox will attempt to resolve the type at runtime (usually string) </xs:documentation>
                            </xs:annotation>
                            <xs:simpleType>
                              <xs:restriction base="fm:entered-string">
                                <xs:enumeration value="string">
                                  <xs:annotation>
                                    <xs:documentation>this is the default and should normally be specified.
It is put here for descriptive purposes only</xs:documentation>
                                  </xs:annotation>
                                </xs:enumeration>
                                <xs:enumeration value="dom">
                                  <xs:annotation>
                                    <xs:documentation>This will operate on the node and all sub nodes.
The equivalent sql-data must be able to be cast as an xml type.</xs:documentation>
                                  </xs:annotation>
                                </xs:enumeration>
                                <xs:enumeration value="date">
                                  <xs:annotation>
                                    <xs:documentation>CCYYMMDD</xs:documentation>
                                  </xs:annotation>
                                </xs:enumeration>
                                <xs:enumeration value="datetime">
                                  <xs:annotation>
                                    <xs:documentation>CCYYMMDDThh:mm:ss</xs:documentation>
                                  </xs:annotation>
                                </xs:enumeration>
                                <xs:enumeration value="time">
                                  <xs:annotation>
                                    <xs:documentation>hh:mm:ss</xs:documentation>
                                  </xs:annotation>
                                </xs:enumeration>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:attribute>
                          <xs:attribute name="sql-type">
                            <xs:annotation>
                              <xs:documentation>The sql datatype in the database. 
If not entered then FOX will try to determine the datatype at runtime</xs:documentation>
                            </xs:annotation>
                            <xs:simpleType>
                              <xs:restriction base="fm:entered-string">
                                <xs:enumeration value="varchar">
                                  <xs:annotation>
                                    <xs:documentation>The default for all sql data.
This is not required to be specified but it included here for completenes.
Note all numeric sql datatypes will also be converted to varchar by default.
If you dont want the default conversion then specify a format mask on the source sql code</xs:documentation>
                                  </xs:annotation>
                                </xs:enumeration>
                                <xs:enumeration value="xmltype">
                                  <xs:annotation>
                                    <xs:documentation>Inplies the api datatype will be converted between XMLTYPE and the datadomtype. The datadom data must be able to be cast as XML data for this to work</xs:documentation>
                                  </xs:annotation>
                                </xs:enumeration>
                                <xs:enumeration value="clob"/>
                                <xs:enumeration value="date"/>
                                <xs:enumeration value=""/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:attribute>
                          <xs:attribute name="sql-column-name" use="required">
                            <xs:annotation>
                              <xs:documentation>The column name on the sql table.
Any processing on this table will convert between the datadom-type and the sql-type</xs:documentation>
                            </xs:annotation>
                            <xs:simpleType>
                              <xs:restriction base="fm:entered-string">
                                <xs:maxLength value="31"/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:attribute>
                        </xs:extension>
                      </xs:simpleContent>
                    </xs:complexType>
                  </xs:element>
                  <xs:element name="for-each" minOccurs="0" maxOccurs="unbounded">
                    <xs:annotation>
                      <xs:documentation>FOR-EACH actions execute in context of the target records. The for-each actions can in turn specify further DML or DO-ACTION calls.</xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:annotation>
                        <xs:documentation>FOR-EACH actions execute in context of the target records. The for-each actions can in turn specify further DO ACTION/DML calls</xs:documentation>
                      </xs:annotation>
                      <xs:sequence>
                        <xs:element name="do" type="fm:do-block-type"/>
                      </xs:sequence>
                      <xs:attribute name="pre-ins" type="fm:yn-flag">
                        <xs:annotation>
                          <xs:documentation>block to be before an insert</xs:documentation>
                        </xs:annotation>
                      </xs:attribute>
                      <xs:attribute name="post-ins" type="fm:yn-flag">
                        <xs:annotation>
                          <xs:documentation>block executed after ( an insert</xs:documentation>
                        </xs:annotation>
                      </xs:attribute>
                      <xs:attribute name="pre-upd" type="fm:yn-flag">
                        <xs:annotation>
                          <xs:documentation>block executed  before an update</xs:documentation>
                        </xs:annotation>
                      </xs:attribute>
                      <xs:attribute name="post-upd" type="fm:yn-flag">
                        <xs:annotation>
                          <xs:documentation>block executed after an update</xs:documentation>
                        </xs:annotation>
                      </xs:attribute>
                      <xs:attribute name="pre-del" type="fm:yn-flag">
                        <xs:annotation>
                          <xs:documentation>block executed before delete</xs:documentation>
                        </xs:annotation>
                      </xs:attribute>
                      <xs:attribute name="post-del" type="fm:yn-flag">
                        <xs:annotation>
                          <xs:documentation>block executed after a delete</xs:documentation>
                        </xs:annotation>
                      </xs:attribute>
                    </xs:complexType>
                  </xs:element>
                </xs:sequence>
                <xs:attribute name="name" type="fm:entered-string" use="required">
                  <xs:annotation>
                    <xs:documentation>Indentifies the database table to lock and/or maintain</xs:documentation>
                  </xs:annotation>
                </xs:attribute>
                <xs:attribute name="cols" type="xs:positiveInteger" use="required">
                  <xs:annotation>
                    <xs:documentation>a check sum attribute which must match the number of columns included in the DML interface. It is hoped the module specifier computes cols from requirements, rather than counting up elements with {interface}=. attributes in the module specification</xs:documentation>
                  </xs:annotation>
                </xs:attribute>
                <xs:attribute name="ins" type="fm:yn-flag" use="optional">
                  <xs:annotation>
                    <xs:documentation>Insert priviledge allowed</xs:documentation>
                  </xs:annotation>
                </xs:attribute>
                <xs:attribute name="upd" type="fm:yn-flag" use="optional">
                  <xs:annotation>
                    <xs:documentation>Update priviledge allowed</xs:documentation>
                  </xs:annotation>
                </xs:attribute>
                <xs:attribute name="del" type="fm:yn-flag" use="optional">
                  <xs:annotation>
                    <xs:documentation>Delete priviledge allowed</xs:documentation>
                  </xs:annotation>
                </xs:attribute>
                <xs:attribute name="lock-when" type="xs:string">
                  <xs:annotation>
                    <xs:documentation>In addition to the DML match tag and the rec-path match tag this tag specifies extra XML search conditions to further restrict records for processing</xs:documentation>
                  </xs:annotation>
                </xs:attribute>
                <xs:attribute name="del-when" type="xs:string" use="optional">
                  <xs:annotation>
                    <xs:documentation>In additions to the DML match tag and the rec-path match tag this tag specifies extra XML search conditions to further restrict records for processing</xs:documentation>
                  </xs:annotation>
                </xs:attribute>
                <xs:attribute name="namespace" type="fm:entered-string" use="optional">
                  <xs:annotation>
                    <xs:documentation>Corresponds to ns in the ns:cols attribute of a fox element definition (to map dom columns to database columns) </xs:documentation>
                  </xs:annotation>
                </xs:attribute>
              </xs:complexType>
            </xs:element>
            <xs:group ref="fm:db-interface-query-grp"/>
            <xs:group ref="fm:db-interface-api-grp"/>
          </xs:sequence>
          <xs:attribute name="name" type="fm:entered-string" use="required">
            <xs:annotation>
              <xs:documentation source="This interface name must be uniqe for the module. "/>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="stub-overload"/>
          <xs:attribute name="build-only"/>
        </xs:complexType>
        <xs:key name="api-name-pkey">
          <xs:selector xpath="api"/>
          <xs:field xpath="@name"/>
        </xs:key>
        <xs:key name="query-name-pkey">
          <xs:selector xpath="fm:query"/>
          <xs:field xpath="@name"/>
        </xs:key>
        <xs:key name="table-name-pkey">
          <xs:selector xpath="fm:table"/>
          <xs:field xpath="@name"/>
        </xs:key>
      </xs:element>
    </xs:sequence>
  </xs:group>
  <xs:group name="db-interface-query-grp">
    <xs:sequence>
      <xs:element name="query" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>Defines query operations to populate the DOM from the database and lock database rows.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="target-path" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Defines the DOM target for all select tags. Mandatory for non-singleton selects.</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:attribute name="match" type="fm:fox-xpath-type">
                  <xs:annotation>
                    <xs:documentation>Specifies the relative path of context nodes to process. When the target name is '.' the query must select only one row. Any missing intermediate target nodes are created automatically even if the query returns no rows.</xs:documentation>
                  </xs:annotation>
                </xs:attribute>
              </xs:complexType>
            </xs:element>
            <xs:element name="primary" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Required for QUERY AUGMENT and PURGE-SELECTED modes, when the target name is not “.”.</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="key" type="fm:entered-string" maxOccurs="unbounded">
                    <xs:annotation>
                      <xs:documentation>The PRIMARY or composite part of the primary key for the records selected. This refers to a DOM element name</xs:documentation>
                    </xs:annotation>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name="select" type="fm:entered-string">
              <xs:annotation>
                <xs:documentation>Any oracle SQL statment. Input Bind variables are supported. DOM target data elements are specified as column aliases in the select statement itself or by using the into tag</xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element name="using" minOccurs="0" maxOccurs="unbounded">
              <xs:annotation>
                <xs:documentation>Specifies input parameters to the SQL query </xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:simpleContent>
                  <xs:extension base="xs:string">
                    <xs:attribute name="name">
                      <xs:annotation>
                        <xs:documentation>Specifies the name of the input bind variable.
This can be of the format :1, :2 etc or a name such as :emp_id</xs:documentation>
                      </xs:annotation>
                      <xs:simpleType>
                        <xs:restriction base="fm:entered-string">
                          <xs:maxLength value="31"/>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:attribute>
                    <xs:attribute name="datadom-location" type="fm:fox-xpath-type">
                      <xs:annotation>
                        <xs:documentation>The xpath identifying the source node(s).
By default the data is treated as the value of the node.
This can be overridden by the datadom-type such as dom which picks up any child nodes as well
</xs:documentation>
                      </xs:annotation>
                    </xs:attribute>
                    <xs:attribute name="datadom-type">
                      <xs:annotation>
                        <xs:documentation>The FOX dom type that this attribute maps to.
If not entered fox will attempt to resolve the type at runtime (usually string) </xs:documentation>
                      </xs:annotation>
                      <xs:simpleType>
                        <xs:restriction base="fm:entered-string">
                          <xs:enumeration value="xs:string">
                            <xs:annotation>
                              <xs:documentation>this is the default and should normally be specified.
It is put here for descriptive purposes only</xs:documentation>
                            </xs:annotation>
                          </xs:enumeration>
                          <xs:enumeration value="dom">
                            <xs:annotation>
                              <xs:documentation>This will operate on the node and all sub nodes.
The equivalent sql-data must be able to be cast as an xml type.</xs:documentation>
                            </xs:annotation>
                          </xs:enumeration>
                          <xs:enumeration value="xs:date">
                            <xs:annotation>
                              <xs:documentation>CCYYMMDD</xs:documentation>
                            </xs:annotation>
                          </xs:enumeration>
                          <xs:enumeration value="xs:datetime">
                            <xs:annotation>
                              <xs:documentation>CCYYMMDDThh:mm:ss</xs:documentation>
                            </xs:annotation>
                          </xs:enumeration>
                          <xs:enumeration value="xs:time">
                            <xs:annotation>
                              <xs:documentation>hh:mm:ss</xs:documentation>
                            </xs:annotation>
                          </xs:enumeration>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:attribute>
                    <xs:attribute name="sql-type">
                      <xs:annotation>
                        <xs:documentation>The sql datatype in the database. 
If not entered then FOX will try to determine the datatype at runtime</xs:documentation>
                      </xs:annotation>
                      <xs:simpleType>
                        <xs:restriction base="fm:entered-string">
                          <xs:enumeration value="varchar">
                            <xs:annotation>
                              <xs:documentation>The default for all sql data.
This is not required to be specified but it included here for completenes.
Note all numeric sql datatypes will also be converted to varchar by default.
If you dont want the default conversion then specify a format mask on the source sql code</xs:documentation>
                            </xs:annotation>
                          </xs:enumeration>
                          <xs:enumeration value="xmltype">
                            <xs:annotation>
                              <xs:documentation>Inplies the api datatype will be converted between XMLTYPE and the datadomtype. The datadom data must be able to be cast as XML data for this to work</xs:documentation>
                            </xs:annotation>
                          </xs:enumeration>
                          <xs:enumeration value="clob"/>
                          <xs:enumeration value="date"/>
                          <xs:enumeration value=""/>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:attribute>
                  </xs:extension>
                </xs:simpleContent>
              </xs:complexType>
            </xs:element>
            <xs:element name="into" minOccurs="0" maxOccurs="unbounded">
              <xs:annotation>
                <xs:documentation>Specifies output parameters from SQL  to a dom target</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:simpleContent>
                  <xs:extension base="xs:string">
                    <xs:attribute name="name" use="required">
                      <xs:annotation>
                        <xs:documentation>Specifies the name of the column alias in the query.
Use this name when you want to 
a) Use an xpath longer than 31 characters (in this case put it in the datadom-location)
b) Want to override the default sql /dom data conversion rules</xs:documentation>
                      </xs:annotation>
                      <xs:simpleType>
                        <xs:restriction base="fm:entered-string">
                          <xs:maxLength value="31"/>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:attribute>
                    <xs:attribute name="datadom-location" type="fm:fox-xpath-type">
                      <xs:annotation>
                        <xs:documentation>The xpath identifying the source node(s).
By default the data is treated as the value of the node.
This can be overridden by the datadom-type such as dom which picks up any child nodes as well
</xs:documentation>
                      </xs:annotation>
                    </xs:attribute>
                    <xs:attribute name="datadom-type">
                      <xs:annotation>
                        <xs:documentation>The FOX dom type that this attribute maps to.
If not entered fox will attempt to resolve the type at runtime (usually string) </xs:documentation>
                      </xs:annotation>
                      <xs:simpleType>
                        <xs:restriction base="fm:entered-string">
                          <xs:enumeration value="xs:string">
                            <xs:annotation>
                              <xs:documentation>this is the default and should normally be specified.
It is put here for descriptive purposes only</xs:documentation>
                            </xs:annotation>
                          </xs:enumeration>
                          <xs:enumeration value="xs:date">
                            <xs:annotation>
                              <xs:documentation>CCYYMMDD</xs:documentation>
                            </xs:annotation>
                          </xs:enumeration>
                          <xs:enumeration value="xs:dateTime">
                            <xs:annotation>
                              <xs:documentation>CCYYMMDDThh:mm:ss</xs:documentation>
                            </xs:annotation>
                          </xs:enumeration>
                          <xs:enumeration value="xs:time">
                            <xs:annotation>
                              <xs:documentation>hh:mm:ss</xs:documentation>
                            </xs:annotation>
                          </xs:enumeration>
                          <xs:enumeration value="dom">
                            <xs:annotation>
                              <xs:documentation>This will operate on the node and all sub nodes.
The equivalent sql-data must be able to be cast as an xml type.</xs:documentation>
                            </xs:annotation>
                          </xs:enumeration>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:attribute>
                    <xs:attribute name="sql-type">
                      <xs:annotation>
                        <xs:documentation>The sql datatype in the database. 
If not entered then FOX will try to determine the datatype at runtime</xs:documentation>
                      </xs:annotation>
                      <xs:simpleType>
                        <xs:restriction base="fm:entered-string">
                          <xs:enumeration value="varchar">
                            <xs:annotation>
                              <xs:documentation>The default for all sql data.
This is not required to be specified but it included here for completenes.
Note all numeric sql datatypes will also be converted to varchar by default.
If you dont want the default conversion then specify a format mask on the source sql code</xs:documentation>
                            </xs:annotation>
                          </xs:enumeration>
                          <xs:enumeration value="xmltype">
                            <xs:annotation>
                              <xs:documentation>Inplies the api datatype will be converted between XMLTYPE and the datadomtype. The datadom data must be able to be cast as XML data for this to work</xs:documentation>
                            </xs:annotation>
                          </xs:enumeration>
                          <xs:enumeration value="clob"/>
                          <xs:enumeration value="date"/>
                          <xs:enumeration value=""/>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:attribute>
                  </xs:extension>
                </xs:simpleContent>
              </xs:complexType>
            </xs:element>
            <xs:element name="row-lock" minOccurs="0">
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="select" type="fm:entered-string">
                    <xs:annotation>
                      <xs:documentation>Any oracle SQL statment. Input Bind variables are supported. DOM target data elements are specified as column aliases in the select statement itself.
RULE1: select item set here must be a strict superset of queries select item set.
RULE2: query must return exectly one row (or zero if deleted row commmited by another session).
RULE3: the onus is on the developer/architect to get index access correct.</xs:documentation>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="current-of-item" type="fm:entered-string" maxOccurs="unbounded"/>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name="for-each-fetch" minOccurs="0" maxOccurs="unbounded">
              <xs:annotation>
                <xs:documentation>FOR-EACH-FETCH actions execute in context of the target records. The for-each actions can in turn specify further DML or DO-ACTION calls.</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="do" type="fm:do-block-type">
                    <xs:keyref name="tester" refer="fm:db-interface-name-pkey">
                      <xs:selector xpath="fm:run-query"/>
                      <xs:field xpath="@interface"/>
                    </xs:keyref>
                  </xs:element>
                </xs:sequence>
                <xs:attribute name="post-dom-change" type="fm:yn-flag" default="Y">
                  <xs:annotation>
                    <xs:documentation>After database read and after XML DOM population of target (Y)</xs:documentation>
                  </xs:annotation>
                </xs:attribute>
                <xs:attribute name="pre-dom-change" type="fm:yn-flag" default="N">
                  <xs:annotation>
                    <xs:documentation>After database read and before XML DOM population of target (Y)</xs:documentation>
                  </xs:annotation>
                </xs:attribute>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
          <xs:attribute name="name" type="fm:entered-string" use="required">
            <xs:annotation>
              <xs:documentation>This query name must be uniqe for the interface. The name is reference in the run-queryi interface tag</xs:documentation>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="mode" default="AUGMENT">
            <xs:annotation>
              <xs:documentation>Operation to apply todata at the target record. 
Target modes currently are:

Target Mode      	Key Required	Performance 
(Default)	AUGMENT                     YES unless .	SLOW
PURGE-SELECTED       YES unless . 	SLOW
PURGE-ALL	       NO		EFFICIENT
ADD-TO		       NO		QUICKEST


Cann be overidden at dml mode tag level</xs:documentation>
            </xs:annotation>
            <xs:simpleType>
              <xs:restriction base="fm:entered-string">
                <xs:enumeration value="PURGE-SELECTED"/>
                <xs:enumeration value="PURGE-ALL"/>
                <xs:enumeration value="AUGMENT"/>
                <xs:enumeration value="ADD-TO"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="stub-overload"/>
          <xs:attribute name="build-only"/>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:group>
  <xs:group name="db-interface-api-grp">
    <xs:sequence>
      <xs:element name="api" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>Allows a call interface to any language such as as SQL code block. APIs can receive and return DOM elements but locking, integrity and security is the responsibility of the api call and not FOX</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="statement">
              <xs:annotation>
                <xs:documentation>An anonymous pl/sql block with bind variables</xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element name="using" minOccurs="0" maxOccurs="unbounded">
              <xs:annotation>
                <xs:documentation>Specifies input/output parameters for SQL  </xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:simpleContent>
                  <xs:extension base="xs:string">
                    <xs:attribute name="direction" default="in">
                      <xs:annotation>
                        <xs:documentation>input/output parameter direction</xs:documentation>
                      </xs:annotation>
                      <xs:simpleType>
                        <xs:restriction base="fm:entered-string">
                          <xs:enumeration value="in">
                            <xs:annotation>
                              <xs:documentation>input from the datadom to the sql api parameter</xs:documentation>
                            </xs:annotation>
                          </xs:enumeration>
                          <xs:enumeration value="out">
                            <xs:annotation>
                              <xs:documentation>output from the sql api parameter to the datadom</xs:documentation>
                            </xs:annotation>
                          </xs:enumeration>
                          <xs:enumeration value="in out"/>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:attribute>
                    <xs:attribute name="datadom-location" type="fm:fox-xpath-type">
                      <xs:annotation>
                        <xs:documentation>The xpath identifying the source node(s).
By default the data is treated as the value of the node.
This can be overridden by the datadom-type such as dom which picks up any child nodes as well
</xs:documentation>
                      </xs:annotation>
                    </xs:attribute>
                    <xs:attribute name="datadom-type">
                      <xs:annotation>
                        <xs:documentation>The FOX dom type that this attribute maps to.
If not entered fox will attempt to resolve the type at runtime (usually string) </xs:documentation>
                      </xs:annotation>
                      <xs:simpleType>
                        <xs:restriction base="fm:entered-string">
                          <xs:enumeration value="string">
                            <xs:annotation>
                              <xs:documentation>this is the default and should normally be specified.
It is put here for descriptive purposes only</xs:documentation>
                            </xs:annotation>
                          </xs:enumeration>
                          <xs:enumeration value="dom">
                            <xs:annotation>
                              <xs:documentation>This will operate on the node and all sub nodes.
The equivalent sql-data must be able to be cast as an xml type.</xs:documentation>
                            </xs:annotation>
                          </xs:enumeration>
                          <xs:enumeration value="date">
                            <xs:annotation>
                              <xs:documentation>CCYYMMDD</xs:documentation>
                            </xs:annotation>
                          </xs:enumeration>
                          <xs:enumeration value="datetime">
                            <xs:annotation>
                              <xs:documentation>CCYYMMDDThh:mm:ss</xs:documentation>
                            </xs:annotation>
                          </xs:enumeration>
                          <xs:enumeration value="time">
                            <xs:annotation>
                              <xs:documentation>hh:mm:ss</xs:documentation>
                            </xs:annotation>
                          </xs:enumeration>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:attribute>
                    <xs:attribute name="sql-type">
                      <xs:annotation>
                        <xs:documentation>The sql datatype in the database. 
If not entered then FOX will try to determine the datatype at runtime</xs:documentation>
                      </xs:annotation>
                      <xs:simpleType>
                        <xs:restriction base="fm:entered-string">
                          <xs:enumeration value="varchar">
                            <xs:annotation>
                              <xs:documentation>The default for all sql data.
This is not required to be specified but it included here for completenes.
Note all numeric sql datatypes will also be converted to varchar by default.
If you dont want the default conversion then specify a format mask on the source sql code</xs:documentation>
                            </xs:annotation>
                          </xs:enumeration>
                          <xs:enumeration value="xmltype">
                            <xs:annotation>
                              <xs:documentation>Inplies the api datatype will be converted between XMLTYPE and the datadomtype. The datadom data must be able to be cast as XML data for this to work</xs:documentation>
                            </xs:annotation>
                          </xs:enumeration>
                          <xs:enumeration value="clob"/>
                          <xs:enumeration value="date"/>
                          <xs:enumeration value=""/>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:attribute>
                    <xs:attribute name="name" type="fm:entered-string"/>
                  </xs:extension>
                </xs:simpleContent>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
          <xs:attribute name="name" type="fm:entered-string" use="required">
            <xs:annotation>
              <xs:documentation>This api name must be uniqe for the interface. The name is reference in the run-api interface tag</xs:documentation>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="mode" default="AUGMENT">
            <xs:annotation>
              <xs:documentation>Operation to apply todata at the target record. 
Target modes currently are:

Target Mode      	Key Required	Performance 
(Default)	AUGMENT                     YES unless .	SLOW
PURGE-SELECTED       YES unless . 	SLOW
PURGE-ALL	       NO		EFFICIENT
ADD-TO		       NO		QUICKEST


Cann be overidden at dml mode tag level</xs:documentation>
            </xs:annotation>
            <xs:simpleType>
              <xs:restriction base="fm:entered-string">
                <xs:enumeration value="PURGE"/>
                <xs:enumeration value="PURGE-ALL"/>
                <xs:enumeration value="AUGMENT"/>
                <xs:enumeration value="ADD-TO"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="language" default="PL/SQL">
            <xs:annotation>
              <xs:documentation>Specifies the language of the api call. Initially only PL/SQL is supported</xs:documentation>
            </xs:annotation>
            <xs:simpleType>
              <xs:restriction base="fm:entered-string">
                <xs:enumeration value="PL/SQL"/>
                <xs:enumeration value="SOAP"/>
                <xs:enumeration value="JAVA"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="stub-overload"/>
          <xs:attribute name="build-only"/>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:group>
  <xs:group name="do-cmd-grp">
    <xs:annotation>
      <xs:documentation>Complex do command
with verious control structures</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="do" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Complex do command
with verious control structures</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:complexContent>
            <xs:extension base="fm:do-block-type">
              <xs:attribute name="while-xpath" type="xs:string" use="optional"/>
              <xs:attribute name="until-xpath" type="xs:string" use="optional"/>
              <xs:attribute name="for-each-xpath" type="xs:string" use="optional"/>
              <xs:attribute name="num-range-from" type="xs:double" use="optional"/>
              <xs:attribute name="num-range-to" type="xs:double" use="optional"/>
              <xs:attribute name="num-range-step" type="xs:double" use="optional"/>
            </xs:extension>
          </xs:complexContent>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:group>
  <xs:group name="fox-html-tags-grp">
    <xs:choice minOccurs="0">
      <xs:element name="include" minOccurs="0">
        <xs:complexType mixed="true">
          <xs:attribute name="name" type="fm:entered-string"/>
          <xs:attribute name="attach" type="fm:fox-xpath-type"/>
        </xs:complexType>
      </xs:element>
      <xs:element name="set-out" type="fm:set-out-type"/>
      <xs:element name="action-out" minOccurs="0">
        <xs:complexType mixed="true">
          <xs:attribute name="action" type="fm:entered-string" use="required"/>
          <xs:attributeGroup ref="fox:zzz-action-out-attr-grp"/>
          <xs:attributeGroup ref="foxg:zzz-action-out-attr-grp"/>
        </xs:complexType>
      </xs:element>
      <xs:element name="menu-out" type="fm:menu-out-type"/>
      <xs:element name="expr-out" minOccurs="0">
        <xs:complexType mixed="true">
          <xs:attribute name="match" type="fm:fox-xpath-type" use="optional" default="."/>
        </xs:complexType>
      </xs:element>
      <xs:element name="for-each" minOccurs="0">
        <xs:complexType>
          <xs:complexContent>
            <xs:extension base="html-or-fox-html-tags-type">
              <xs:attribute name="xpath" type="fm:fox-xpath-type" use="optional"/>
              <xs:attribute name="num-range-from" type="xs:integer" use="optional"/>
              <xs:attribute name="num-range-to" type="xs:integer" use="optional"/>
              <xs:attribute name="itemContextName" type="fm:entered-string" use="optional"/>
            </xs:extension>
          </xs:complexContent>
        </xs:complexType>
      </xs:element>
      <xs:element name="if" minOccurs="0">
        <xs:complexType>
          <xs:sequence minOccurs="0">
            <xs:element name="then">
              <xs:complexType>
                <xs:complexContent>
                  <xs:extension base="html-or-fox-html-tags-type"/>
                </xs:complexContent>
              </xs:complexType>
            </xs:element>
            <xs:sequence minOccurs="0" maxOccurs="unbounded">
              <xs:element name="else-if">
                <xs:complexType>
                  <xs:complexContent>
                    <xs:extension base="html-or-fox-html-tags-type">
                      <xs:attribute name="test" type="fm:fox-xpath-type" use="required"/>
                    </xs:extension>
                  </xs:complexContent>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
            <xs:element name="else" type="html-or-fox-html-tags-type" minOccurs="0"/>
          </xs:sequence>
          <xs:attribute name="test" type="fm:fox-xpath-type" use="required"/>
        </xs:complexType>
      </xs:element>
      <xs:element name="external-url" minOccurs="0">
        <xs:complexType>
          <xs:attribute name="href" type="xs:string" use="required"/>
          <xs:attribute name="text" type="xs:string" use="required"/>
          <xs:attribute name="type" use="optional" default="fullwin">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="appwin"/>
                <xs:enumeration value="searchwin"/>
                <xs:enumeration value="filewin"/>
                <xs:enumeration value="fullwin"/>
                <xs:enumeration value="refwin"/>
                <xs:enumeration value="helpwin"/>
                <xs:enumeration value="flushwin"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="contextParams" type="xs:boolean" default="false"/>
        </xs:complexType>
      </xs:element>
      <xs:element name="error-out">
        <xs:complexType>
          <xs:attribute name="no-display" type="xs:boolean" use="optional"/>
        </xs:complexType>
      </xs:element>
      <xs:element name="hint-out">
        <xs:complexType>
          <xs:attribute ref="fox:hint-url"/>
          <xs:attribute name="text" type="xs:string" use="required"/>
        </xs:complexType>
      </xs:element>
      <xs:element name="mail-to" minOccurs="0">
        <xs:complexType>
          <xs:attribute name="email" type="xs:string" use="required"/>
          <xs:attribute name="prompt" type="xs:string" use="optional"/>
          <xs:attribute name="subject" type="xs:string" use="optional"/>
        </xs:complexType>
      </xs:element>
    </xs:choice>
  </xs:group>
  <xs:group name="set-buffer-grp">
    <xs:sequence>
      <xs:element name="set-buffer">
        <xs:complexType>
          <xs:complexContent>
            <xs:extension base="html-or-fox-html-tags-type">
              <xs:attribute name="name" type="fm:entered-string" use="required"/>
              <xs:attribute name="stub-overload"/>
              <xs:attribute name="build-only"/>
            </xs:extension>
          </xs:complexContent>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:group>
  <xs:complexType name="set-out-type" mixed="true">
    <xs:attribute name="match" type="fm:fox-xpath-type" use="optional"/>
    <xs:attribute name="display-preference" type="fm:entered-string" use="optional">
      <xs:annotation>
        <xs:documentation source="display-preference, mode-list, view-list, fox"/>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="nested-workaround-class" type="fm:entered-string" use="optional"/>
    <xs:attributeGroup ref="fox:zzz-set-out-attr-grp"/>
    <xs:attributeGroup ref="foxg:zzz-set-out-attr-grp"/>
  </xs:complexType>
  <xs:complexType name="menu-out-type" mixed="true">
    <xs:attributeGroup ref="fox:zzz-set-menu-attr-group"/>
    <xs:attributeGroup ref="foxg:zzz-set-menu-attr-group"/>
  </xs:complexType>
  <xs:group name="using-clause-grp">
    <xs:sequence minOccurs="0">
      <xs:element name="using" minOccurs="0" maxOccurs="unbounded">
        <xs:complexType>
          <xs:simpleContent>
            <xs:extension base="xs:string">
              <xs:attribute name="using-type" use="optional">
                <xs:simpleType>
                  <xs:restriction base="fm:entered-string">
                    <xs:enumeration value="XPATH"/>
                    <xs:enumeration value="UNIQUE"/>
                    <xs:enumeration value="STATIC"/>
                    <xs:enumeration value="DATA-XMLTYPE"/>
                    <xs:enumeration value="DATA-CLOB"/>
                    <xs:enumeration value="DATA-BLOB"/>
                    <xs:enumeration value="FILE-METADATA-XMLTYPE"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:attribute>
            </xs:extension>
          </xs:simpleContent>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:group>
  <xs:group name="validate-cmd-grp">
    <xs:sequence>
      <xs:element name="validate" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Validates data against schema, optionally creates missing nodes. Adds "error" nodes in context, or on summary target.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:attribute name="match" type="fm:fox-xpath-type" use="optional">
            <xs:annotation>
              <xs:documentation>Identifies nodes to validate, defaults to current attach point.</xs:documentation>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="check" use="optional">
            <xs:annotation>
              <xs:documentation>This is a list of what should be checked during validation. Validation can be applied several times on the same data, each time with different things being checked. To keep error messages from previous validate calls, use the "clear" attribute. The default is ALL.</xs:documentation>
            </xs:annotation>
            <xs:simpleType>
              <xs:restriction base="fm:entered-string">
                <xs:enumeration value="ALL">
                  <xs:annotation>
                    <xs:documentation>Validate number of node occurences within parent , validate immediate data content and nested nodes (depending on deep attribute).</xs:documentation>
                  </xs:annotation>
                </xs:enumeration>
                <xs:enumeration value="CONTENT">
                  <xs:annotation>
                    <xs:documentation>Validate immediate data value, eg. validate-xpath, enumerations, map-sets, etc.</xs:documentation>
                  </xs:annotation>
                </xs:enumeration>
                <xs:enumeration value="CARDINALITY">
                  <xs:annotation>
                    <xs:documentation>Validate number of sibling nodes (including matched node) with a common name against schema minOccurs and MaxOccurs.</xs:documentation>
                  </xs:annotation>
                </xs:enumeration>
                <xs:enumeration value="NONE">
                  <xs:annotation>
                    <xs:documentation>Perform no validation. This can be used in conjunction with "clear" or "init" attributes to initialise validation element structures.</xs:documentation>
                  </xs:annotation>
                </xs:enumeration>
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="init" type="fm:yn-flag" use="optional">
            <xs:annotation>
              <xs:documentation>Y indicates missing elements may be created in order to add contextual error messages. The default is Y. When used in conjunction with check="NONE", elements are created according to cardinality rules, but no error messages are created, thus initialising slots for input.</xs:documentation>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="clear" use="optional">
            <xs:annotation>
              <xs:documentation>Identifies previous error messages to remove from matched nodes, before validation begins, thus removing previous error messages. If errors are not removed first, multiple error nodes are created (which may be valid, or duplicates in error). Default is NONE.</xs:documentation>
            </xs:annotation>
            <xs:simpleType>
              <xs:restriction base="fm:entered-string">
                <xs:enumeration value="BOTH"/>
                <xs:enumeration value="CLEAR-NODE"/>
                <xs:enumeration value="CLEAR-SUMMARY"/>
                <xs:enumeration value="NONE"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="summary-target" type="fm:fox-xpath-type" use="optional">
            <xs:annotation>
              <xs:documentation>Locates a node which is used to add summary error message nodes to. Many node contextual errors will result in at least one summary error node being created also. Any one node  contextual  error must always create one summary error node, so that "boolean(mypath/summary/error)" returns true if any contextual errors were identified. The default summary-target is evaluated from XPATH expression "/*/error-list".  An example target might be "../../section-one/issues".</xs:documentation>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="error-limit" type="xs:integer" use="optional">
            <xs:annotation>
              <xs:documentation>Error processing will stop when this number of errors is reached.
This number includesa any previous uncleared error and works on the whole module not just the current page</xs:documentation>
            </xs:annotation>
          </xs:attribute>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:group>
  <xs:group name="cmd-remove-grp">
    <xs:sequence>
      <xs:element name="remove" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Command to remove elements from data tree
[USE WITH CAUTION] The match attribute must be specified and the builder should provide hard XPATH expressions to prevent accidental data loss. For example BAD PRACTICE: "./*" GOOD PRACTICE: "./(cat|dog|mouse)"</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:attribute name="match" type="fm:fox-xpath-type" use="required">
            <xs:annotation>
              <xs:documentation>XPath expression to target elements to remove. This must be specified and the builder should provide hard XPATH expressions to prevent accidental data loss. For example BAD PRACTICE: "./*" GOOD PRACTICE: "./(cat|dog|mouse)". Empty xpath is not allowed.
</xs:documentation>
            </xs:annotation>
          </xs:attribute>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:group>
  <xs:group name="cmd-pragma-grp">
    <xs:sequence>
      <xs:element name="pragma" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Multifunctional pragmatic command to access and interact with Fox Servlet internals.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:attribute name="function" use="required">
            <xs:annotation>
              <xs:documentation>Dump internal Fox Servlet information to target element. See target attribute.</xs:documentation>
            </xs:annotation>
            <xs:simpleType>
              <xs:restriction base="fm:entered-string">
                <xs:enumeration value="dump-cached-apps"/>
                <xs:enumeration value="flush-applications"/>
                <xs:enumeration value="dump-memory-doms"/>
                <xs:enumeration value="load-document-template"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="target" type="fm:fox-xpath-type" use="optional">
            <xs:annotation>
              <xs:documentation>XPath expression to target one element which will be used to add dump information to. Default element is the current attach point. See dump attribute.</xs:documentation>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="doc-template-name" type="fm:entered-string" use="optional"/>
          <xs:attribute name="doc-template-target-metadata" type="fm:fox-xpath-type" use="optional"/>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:group>
  <xs:group name="cmd-call-grp">
    <xs:annotation>
      <xs:documentation>Call an action.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="call" minOccurs="0">
        <xs:complexType>
          <xs:attribute name="action" type="fm:entered-string" use="required"/>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:group>
  <xs:simpleType name="entered-string">
    <xs:restriction base="xs:string">
      <xs:minLength value="1"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="fox-xpath-type">
    <xs:restriction base="xs:string"/>
  </xs:simpleType>
  <xs:simpleType name="slashless-entered-string">
    <xs:restriction base="fm:entered-string">
      <xs:pattern value="[^/]*"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="display-attr-list-type">
    <xs:sequence minOccurs="0">
      <xs:element name="attr" minOccurs="0" maxOccurs="unbounded">
        <xs:complexType>
          <xs:simpleContent>
            <xs:extension base="xs:string">
              <xs:attribute name="name" type="xs:string" use="required"/>
            </xs:extension>
          </xs:simpleContent>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:attributeGroup name="security-rule-conditions-att-grp">
    <xs:attribute name="privilege" type="xs:string"/>
    <xs:attribute name="theme" type="xs:string"/>
    <xs:attribute name="state" type="xs:string"/>
    <xs:attribute name="xpath" type="fm:fox-xpath-type"/>
    <xs:attribute name="datum-rec-path" type="fm:fox-xpath-type"/>
    <xs:attribute name="datum-type" type="xs:string"/>
    <xs:attribute name="datum-id" type="fm:fox-xpath-type"/>
    <xs:attribute name="datum-scope">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="EACH"/>
          <xs:enumeration value="ALL"/>
          <xs:enumeration value="ANY"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="build-only" type="xs:boolean"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="security-rule-op-att-grp">
    <xs:attribute name="namespace" type="fm:entered-string" use="required"/>
    <xs:attribute name="operation" use="required">
      <xs:simpleType>
        <xs:restriction base="fm:entered-string">
          <xs:enumeration value="ENABLE"/>
          <xs:enumeration value="DISABLE"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:attributeGroup>
  <xs:attributeGroup name="security-rule-ref-att-grp">
    <xs:attribute name="rule-ref" type="xs:string" use="optional"/>
  </xs:attributeGroup>
  <xs:group name="server-side-include-cmd-grp">
    <xs:annotation>
      <xs:documentation>A group of server side include commands.</xs:documentation>
    </xs:annotation>
    <xs:choice>
      <xs:element name="show-popup">
        <xs:annotation>
          <xs:documentation>A storage location or URI based server-side-include and client popup command.

A resource reterieved is sent back to the client as a popup.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:attribute name="window-name" type="fm:entered-string" use="optional">
            <xs:annotation>
              <xs:documentation>The browser client window name. If not specified, will default to
a unique name that is automatically generated for each new window.</xs:documentation>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="js-win-features" type="xs:string" use="optional">
            <xs:annotation>
              <xs:documentation>The javascript window properties. For example:

menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no,width=600,height=400</xs:documentation>
            </xs:annotation>
          </xs:attribute>
          <xs:attributeGroup ref="fm:storage-location-popup-resource-att-grp"/>
          <xs:attributeGroup ref="fm:url-based-popup-resource-att-grp"/>
          <xs:attributeGroup ref="fm:doc-template-popup-att-grp"/>
          <xs:attributeGroup ref="fm:matrix-record-popup-att-grp"/>
        </xs:complexType>
      </xs:element>
    </xs:choice>
  </xs:group>
  <xs:attributeGroup name="storage-location-popup-resource-att-grp">
    <xs:annotation>
      <xs:documentation>A storage-location based server-side-include popup resource attribute group.</xs:documentation>
    </xs:annotation>
    <xs:attribute name="storage-location" type="fm:entered-string" use="optional">
      <xs:annotation>
        <xs:documentation>The storage location of the LOB or XMLType whose content is to be retrieved
on the server and displayed in a popup on the client.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="file-name" type="fm:entered-string" use="optional">
      <xs:annotation>
        <xs:documentation>The filename of the browser popup resource. This might be "mydoc.pdf" to
force the browser to consider the real resource type to be PDF and to
facilitate recognisible file names to a user that might want to "Save As..." the
resource.

This might also prove useful if the content type is not retrieved by the URI or storage
location query and the type is implied from this name.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:attributeGroup>
  <xs:attributeGroup name="url-based-popup-resource-att-grp">
    <xs:annotation>
      <xs:documentation>A URI based server-side-include popup resource attribute group.</xs:documentation>
    </xs:annotation>
    <xs:attribute name="uri" type="fm:entered-string" use="optional"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="doc-template-popup-att-grp">
    <xs:annotation>
      <xs:documentation>A group of attributes used by show-popup to preview generated documents a template.</xs:documentation>
    </xs:annotation>
    <xs:attribute name="doc-template-name" type="fm:entered-string" use="optional"/>
    <xs:attribute name="doc-template-target-metadata" type="fm:fox-xpath-type" use="optional"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="matrix-record-popup-att-grp">
    <xs:annotation>
      <xs:documentation>An group of attributes for launching a popup that displays a record in MATRIX.</xs:documentation>
    </xs:annotation>
    <xs:attribute name="matrix-record-no-xpath" type="fm:fox-xpath-type" use="optional"/>
  </xs:attributeGroup>
  <xs:group name="generate-cmd-grp">
    <xs:annotation>
      <xs:documentation>Generate command group.</xs:documentation>
    </xs:annotation>
    <xs:choice>
      <xs:element name="generate-sheet" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>Creates an associated Excel worksheet in the output document.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="generate-column" maxOccurs="unbounded">
              <xs:annotation>
                <xs:documentation>Represents a column of data in the worksheet.

The column specification includes an expression to populate the column cells.</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:attribute name="name" type="xs:string" use="optional"/>
                <xs:attribute name="column-expr" type="xs:string" use="required"/>
                <xs:attributeGroup ref="fm:data-type-att-grp"/>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
          <xs:attribute name="name" type="xs:string" use="optional">
            <xs:annotation>
              <xs:documentation>The name of the worksheet to create. This may be specified as
a simple string, such as name="sheet1", or as an XPATH expression, {expr},
that would yield a simple string value, specified as "string({expr})". Any XPATH
expression is computed relative to the current attachment point.

For example, name="Hello World!" and name="string('Hello World!')" are
identical. Other examples include:

1) name="string(/*/EMP_LIST/EMP/@name)"
2) name="string(./DEPARTMENT[0]/@name)"
3) name="string(concat('Sheet #', count(preceding-sibling::EMP)+1))" would yield
worksheet names (per employee in this case) like "Sheet #1", "Sheet #2" ... "Sheet #n" </xs:documentation>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="row-expr" type="xs:string" use="required"/>
        </xs:complexType>
      </xs:element>
    </xs:choice>
  </xs:group>
  <xs:attributeGroup name="data-type-att-grp">
    <xs:annotation>
      <xs:documentation>A group of attributes that defines the type and format specification of a data element.</xs:documentation>
    </xs:annotation>
    <xs:attribute name="datatype" use="optional" default="auto">
      <xs:annotation>
        <xs:documentation>The required type of the element. Refer to the 'enumerations' for the
list of values accepted for the type attribute.

Also, if the type is "real" or "integer" you may supply a format specification mask
for the resulting string representation in the output, using the output-format attribute. The format-spec attribute uses the Java DecimalFormat and
SimpleDateFormat fomat models for numbers and dates respectively. These
are available at  
http://java.sun.com/j2se/1.4.2/docs/api/java/text/DecimalFormat.html and http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html

respectively.</xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="string"/>
          <xs:enumeration value="integer"/>
          <xs:enumeration value="real"/>
          <xs:enumeration value="boolean"/>
          <xs:enumeration value="date"/>
          <xs:enumeration value="time"/>
          <xs:enumeration value="datetime"/>
          <xs:enumeration value="auto"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="input-format" type="xs:string" use="optional">
      <xs:annotation>
        <xs:documentation>The accepted format patterns for the type specified, if parsing as input from a string. Only used when the specified type is "integer" or "real".

The accepted input-format patterns are  the Java DecimalFormat and SimpleDateFormat fomat models for numbers and dates, respectively. These
are available at  http://java.sun.com/j2se/1.4.2/docs/api/java/text/DecimalFormat.html and http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html respectively. 

</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="output-format" type="xs:string" use="optional">
      <xs:annotation>
        <xs:documentation>The accepted format patterns for the type specified. Only used when the specified type is "integer" or "real".

The format-spec attribute usage differs for the cases where method is CSV and
XLS. 

When method is CSV  the Java DecimalFormat and SimpleDateFormat fomat models for numbers and dates, respectively, are used. These
are available at  http://java.sun.com/j2se/1.4.2/docs/api/java/text/DecimalFormat.html and http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html respectively.  The default format specification for integers is "#" (any number of digits); the default for reals is "0.00" (2 decimal places with zeros always present, rounded if necessary).

When the method is XLS then one of the Excel built-in format model listed below
must be used:

General
0
0.00
#,##0
#,##0.00
($#,##0_);($#,##0)
($#,##0_);[Red]($#,##0)
($#,##0.00);($#,##0.00)
($#,##0.00_);[Red]($#,##0.00)
0%
0.00%
0.00E+00
# ?/?
# ??/??
m/d/yy
d-mmm-yy
d-mmm
mmm-yy
h:mm AM/PM
h:mm:ss AM/PM
h:mm
h:mm:ss
m/d/yy h:mm
(#,##0_);[Red](#,##0)
(#,##0.00_);(#,##0.00)
(#,##0.00_);[Red](#,##0.00)
_(*#,##0_);_(*(#,##0);_(* \"-\"_);_(@_)
_($*#,##0_);_($*(#,##0);_($* \"-\"_);_(@_)
_(*#,##0.00_);_(*(#,##0.00);_(*\"-\"??_);_(@_)
_($*#,##0.00_);_($*(#,##0.00);_($*\"-\"??_);_(@_)
mm:ss
[h]:mm:ss
mm:ss.0
##0.0E+0
@
text - Alias for @

</xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:attributeGroup>
  <xs:group name="matrix-search-criteria-grp">
    <xs:choice>
      <xs:group ref="fm:matrix-word-search-methods"/>
      <xs:group ref="fm:matrix-number-search-methods"/>
      <xs:group ref="fm:matrix-date-search-methods"/>
      <xs:element name="matrix-record-type">
        <xs:annotation>
          <xs:documentation>One or more space separated record types.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:attribute name="names" type="fm:fox-xpath-type" use="required">
            <xs:annotation>
              <xs:documentation>An XPath expression which should return a one-off string, single element or a nodelist whose content is a valid record-type as defined by the matrix-record-type enumeration.</xs:documentation>
            </xs:annotation>
          </xs:attribute>
        </xs:complexType>
      </xs:element>
      <xs:element name="matrix-and">
        <xs:complexType>
          <xs:group ref="fm:matrix-search-criteria-grp" minOccurs="2" maxOccurs="unbounded"/>
        </xs:complexType>
      </xs:element>
      <xs:element name="matrix-or">
        <xs:complexType>
          <xs:group ref="fm:matrix-search-criteria-grp" minOccurs="2" maxOccurs="unbounded"/>
        </xs:complexType>
      </xs:element>
    </xs:choice>
  </xs:group>
  <xs:group name="cmd-matrix">
    <xs:sequence>
      <xs:element name="matrix-search">
        <xs:complexType>
          <xs:sequence>
            <xs:group ref="fm:matrix-search-criteria-grp" maxOccurs="unbounded"/>
            <xs:element name="matrix-order-by" minOccurs="0" maxOccurs="3">
              <xs:annotation>
                <xs:documentation>Used to order the results of the search in a SQL-select fashion.

Specify a field to order on and the direction of the ordering: ascending or descending.</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:attribute name="name" type="fm:matrix-record-field" use="required"/>
                <xs:attribute name="direction" type="fm:matrix-sort-ordering-direction" use="optional" default="ascending"/>
              </xs:complexType>
            </xs:element>
            <xs:element name="matrix-into" minOccurs="0" maxOccurs="unbounded">
              <xs:annotation>
                <xs:documentation>The field name(s) of the MATRIX record to return in the search.</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:attribute name="name" type="fm:matrix-record-field-list" use="optional" default="NUMBER">
                  <xs:annotation>
                    <xs:documentation>The space-separated names of fields of the MATRIX record required. Refer
to the matrix-record-field type.</xs:documentation>
                  </xs:annotation>
                </xs:attribute>
                <xs:attribute name="target-path" type="fm:fox-xpath-type" use="optional" default=".">
                  <xs:annotation>
                    <xs:documentation>The path, relative to the matrix-search results-target-path, where the specified
field name(s) will be placed.</xs:documentation>
                  </xs:annotation>
                </xs:attribute>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
          <xs:attribute name="results-target-path" type="fm:fox-xpath-type" use="required">
            <xs:annotation>
              <xs:documentation>The target parent node under which the MATRIX_RECORD search result
records will be placed.

If the target node does not exist it will be created for you.</xs:documentation>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="results-set-size" type="fm:fox-xpath-type" use="optional" default="20">
            <xs:annotation>
              <xs:documentation>The maximum number of results that will be returned by the search. The
number of results actually returned depends upon how many results
are left to return from the ofsset position specified, if any.

This is a 'paging' property that can be used to page through results
of the search when coupled with the results-set-offset property.</xs:documentation>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="results-set-offset" type="fm:fox-xpath-type" use="optional" default="0">
            <xs:annotation>
              <xs:documentation>The zero-based offset (or index) from which search results will be returned. For example, if there are 100 results that match the search criteria and the offset
specified is 10 then the 11th result onwards will be returned.

This is a 'paging' property that can be used to page through results
of the search when coupled with the results-set-size property.

Another example might specify results-set-offset of 20 and results-set-size of
30; in which case results 21 to 50 are returned.</xs:documentation>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="record-fields" type="fm:matrix-record-field-list" use="optional" default="NUMBER">
            <xs:annotation>
              <xs:documentation>A space separated list of the fields of the MATRIX record to return in the results
set.

Refer to the matrix-record-field definition for a list of the fields.</xs:documentation>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="mode" type="xs:string" use="required" fixed="augment">
            <xs:annotation>
              <xs:documentation>The method by which results are placed under the specified target.

The mode is always fixed as 'augment': records are effectively merged in
with any existing records under the target path, any other data under the target
IS NOT modified in any way and new records are created if needed.</xs:documentation>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="matrix-user-email-id" type="fm:fox-xpath-type" use="optional">
            <xs:annotation>
              <xs:documentation>The email address of the user instigating the search. This is VERY IMPORTANT.

The email address specified must correspond to a registered user in the
portal schema, a registered MATRIX user and a user on the DTI
Human Resources database (people@DTI) and ALL MUST CORRESPOND. If
there are any problems locating the correct MATRIX user by the specified email
address an error will be returned.</xs:documentation>
            </xs:annotation>
          </xs:attribute>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:group>
  <xs:group name="matrix-word-search-methods">
    <xs:annotation>
      <xs:documentation>MATRIX word-based search methods.</xs:documentation>
    </xs:annotation>
    <xs:choice>
      <xs:element name="matrix-record-title">
        <xs:complexType>
          <xs:attributeGroup ref="fm:matrix-word-search-criterion-att-grp"/>
          <xs:attribute name="operator" type="fm:matrix-search-criterion-instring-operators" use="optional" default="in"/>
        </xs:complexType>
      </xs:element>
      <xs:element name="matrix-external-reference">
        <xs:complexType>
          <xs:attributeGroup ref="fm:matrix-word-search-criterion-att-grp"/>
          <xs:attribute name="operator" type="fm:matrix-search-criterion-instring-operators" use="optional" default="in"/>
        </xs:complexType>
      </xs:element>
      <xs:element name="matrix-notes">
        <xs:complexType>
          <xs:attributeGroup ref="fm:matrix-word-search-criterion-att-grp"/>
          <xs:attribute name="operator" type="fm:matrix-search-criterion-instring-operators" use="optional" default="in"/>
        </xs:complexType>
      </xs:element>
      <xs:element name="matrix-author">
        <xs:complexType>
          <xs:attributeGroup ref="fm:matrix-word-search-criterion-att-grp"/>
          <xs:attribute name="operator" type="fm:matrix-search-criterion-instring-operators" use="optional" default="in"/>
        </xs:complexType>
      </xs:element>
    </xs:choice>
  </xs:group>
  <xs:attributeGroup name="matrix-number-search-criterion-att-grp">
    <xs:annotation>
      <xs:documentation>MATRIX number search criterion attribute group.</xs:documentation>
    </xs:annotation>
    <xs:attribute name="number" type="fm:fox-xpath-type" use="required"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="matrix-word-search-criterion-att-grp">
    <xs:annotation>
      <xs:documentation>MATRIX word search criterion group.</xs:documentation>
    </xs:annotation>
    <xs:attribute name="words" type="fm:fox-xpath-type" use="required"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="matrix-date-search-criterion-att-grp">
    <xs:annotation>
      <xs:documentation>MATRIX date search criterion group.</xs:documentation>
    </xs:annotation>
    <xs:attribute name="from-date" type="fm:fox-xpath-type" use="optional"/>
    <xs:attribute name="to-date" type="fm:fox-xpath-type" use="optional"/>
  </xs:attributeGroup>
  <xs:simpleType name="matrix-search-criterion-equality-operators">
    <xs:annotation>
      <xs:documentation>Equality operators accepted by MATRIX.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="equals"/>
      <xs:enumeration value="not equals"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="matrix-search-criterion-instring-operators">
    <xs:annotation>
      <xs:documentation>In-string search operators accepted by MATRIX.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="in"/>
      <xs:enumeration value="not in"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:group name="matrix-number-search-methods">
    <xs:annotation>
      <xs:documentation>MATRIX number-based search methods.</xs:documentation>
    </xs:annotation>
    <xs:choice>
      <xs:element name="matrix-container-record-number">
        <xs:complexType>
          <xs:attribute/>
          <xs:attributeGroup ref="fm:matrix-number-search-criterion-att-grp"/>
          <xs:attribute name="operator" type="fm:matrix-search-criterion-equality-operators" use="optional" default="equals"/>
        </xs:complexType>
      </xs:element>
      <xs:element name="matrix-record-number">
        <xs:complexType>
          <xs:attributeGroup ref="fm:matrix-number-search-criterion-att-grp"/>
          <xs:attribute name="operator" type="fm:matrix-search-criterion-equality-operators" use="optional" default="equals"/>
        </xs:complexType>
      </xs:element>
    </xs:choice>
  </xs:group>
  <xs:group name="matrix-search-methods-grp">
    <xs:choice/>
  </xs:group>
  <xs:group name="matrix-date-search-methods">
    <xs:annotation>
      <xs:documentation>MATRIX date-based search methods.</xs:documentation>
    </xs:annotation>
    <xs:choice>
      <xs:element name="matrix-date-closed">
        <xs:complexType>
          <xs:attributeGroup ref="fm:matrix-date-search-criterion-att-grp"/>
        </xs:complexType>
      </xs:element>
      <xs:element name="matrix-date-created">
        <xs:complexType>
          <xs:attributeGroup ref="fm:matrix-date-search-criterion-att-grp"/>
        </xs:complexType>
      </xs:element>
      <xs:element name="matrix-date-registered">
        <xs:complexType>
          <xs:attributeGroup ref="fm:matrix-date-search-criterion-att-grp"/>
        </xs:complexType>
      </xs:element>
    </xs:choice>
  </xs:group>
  <xs:simpleType name="matrix-record-type">
    <xs:annotation>
      <xs:documentation>An enumeration of the MATRIX record types.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="ALL"/>
      <xs:enumeration value="DOCUMENT"/>
      <xs:enumeration value="EMAIL"/>
      <xs:enumeration value="SCANNED_DOCUMENT"/>
      <xs:enumeration value="ADMINISTRATION_FOLDER"/>
      <xs:enumeration value="CASE_FOLDER"/>
      <xs:enumeration value="MINISTERS_CASE_FOLDER"/>
      <xs:enumeration value="POLICY_FOLDER"/>
      <xs:enumeration value="PQ_FOLDER"/>
      <xs:enumeration value="DTI_PUBLICATION_EXTERNAL"/>
      <xs:enumeration value="DTI_PUBLICATION_INTERNAL"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="matrix-record-type-list">
    <xs:annotation>
      <xs:documentation>A list of MATRIX record types.</xs:documentation>
    </xs:annotation>
    <xs:list itemType="fm:matrix-record-type"/>
  </xs:simpleType>
  <xs:simpleType name="matrix-record-field">
    <xs:annotation>
      <xs:documentation>Common field names of a MATRIX record.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="AUTHOR"/>
      <xs:enumeration value="CONTAINER_NUMBER"/>
      <xs:enumeration value="DATE_CLOSED"/>
      <xs:enumeration value="DATE_CREATED"/>
      <xs:enumeration value="DATE_REGISTERED"/>
      <xs:enumeration value="EXTERNAL_REFERENCE"/>
      <xs:enumeration value="NOTES"/>
      <xs:enumeration value="NUMBER"/>
      <xs:enumeration value="TITLE"/>
      <xs:enumeration value="TYPE">
        <xs:annotation>
          <xs:documentation>The record type. Refer to matrix-record-type for a valid list of the record types.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="matrix-record-field-list">
    <xs:annotation>
      <xs:documentation>A list of MATRIX record fields.</xs:documentation>
    </xs:annotation>
    <xs:list itemType="fm:matrix-record-field"/>
  </xs:simpleType>
  <xs:simpleType name="matrix-sort-ordering-direction">
    <xs:annotation>
      <xs:documentation>The ascending or descending order directions.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="ascending"/>
      <xs:enumeration value="descending"/>
    </xs:restriction>
  </xs:simpleType>
</xs:schema>
