<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://qof.sourceforge.net/" 
xmlns:qsf-map="http://qof.sourceforge.net/">
<xsd:annotation>
    <xsd:documentation xml:lang="en">
	Query Object Framework Serialization Format (QSF)
	Copyright 2004 Neil Williams linux@codehelp.co.uk
	QSF is part of QOF.
	QOF is free software; you can redistribute it and/or modify it
	under the terms of the GNU General Public License as published by the
	Free Software Foundation; either version 2 of the License, or (at your
	option) any later version.
	This program is distributed in the hope that it will be useful, but
	WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
	General Public License for more details.
	You should have received a copy of the GNU General Public License along
	with this program; if not, write to the Free Software Foundation, Inc., 59
	Temple	Place, Suite 330, Boston, MA 02111-1307 USA
    </xsd:documentation>
  </xsd:annotation>
<xsd:element name="qsf-map" qsf-map:type="map-type"/>
<xsd:complexType name="map-type">
 <xsd:sequence>
   <xsd:element name="definition" qsf-map:type="qsfdefinition"/>
   <xsd:element name="object" qsf-map:type="mapobject" minOccurs="1" maxOccurs="unbounded"/>
 </xsd:sequence>
</xsd:complexType>
<xsd:complexType name="qsfdefinition">
 <xsd:sequence>
   <xsd:element name="define" qsf-map:type="qsfdefine" minOccurs="2" maxOccurs="unbounded"/>
   <xsd:element name="default" qsf-map:type="qsfdefault" minOccurs="0" maxOccurs="unbounded"/>
   <xsd:element name="variable" qsf-map:type="qsfvariable" minOccurs="0" maxOccurs="unbounded"/>
 </xsd:sequence>
 <xsd:attribute name="qof_version" type="xsd:positiveInteger"/>
</xsd:complexType>
<xsd:complexType name="qsfdefine">
 <xsd:simpleContent>
   <xsd:extension base="xsd:string">
     <xsd:attribute name="e_type" type="xsd:string"/>
   </xsd:extension>
 </xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="qsfdefault">
 <xsd:simpleContent>
   <xsd:extension base="xsd:string">
     <xsd:attribute name="name" type="xsd:string"/>
     <xsd:attribute name="type" type="xsd:string"/>
     <xsd:attribute name="value" type="xsd:string"/>
   </xsd:extension>
 </xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="qsfvariable">
 <xsd:simpleContent>
   <xsd:extension base="xsd:string">
     <xsd:attribute name="name" type="xsd:string"/>
     <xsd:attribute name="type" type="xsd:string"/>
     <xsd:attribute name="value" type="xsd:string"/>
   </xsd:extension>
 </xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="mapobject">
 <xsd:sequence>
   <xsd:element name="calculate" qsf-map:type="qsfcalculate" minOccurs="1" maxOccurs="unbounded"/>
 </xsd:sequence>
 <xsd:attribute name="type" type="xsd:string"/>
 <xsd:attribute name="value" type="xsd:string"/>
</xsd:complexType>
<xsd:complexType name="qsfcalculate">
 <xsd:sequence>
   <xsd:element name="set" qsf-map:type="qsf_set" minOccurs="0" maxOccurs="1"/>
   <xsd:element name="if" qsf-map:type="qsf_if" minOccurs="0" maxOccurs="unbounded"/>
   <xsd:element name="equals" qsf-map:type="qsf_equal" minOccurs="0" maxOccurs="unbounded"/>
   <xsd:element name="else" qsf-map:type="qsf_else" minOccurs="0" maxOccurs="unbounded"/>
 </xsd:sequence>
 <xsd:attribute name="type" type="xsd:string"/>
 <xsd:attribute name="value" type="xsd:string"/>
</xsd:complexType>
<xsd:complexType name="qsf_set">
 <xsd:simpleContent>
   <xsd:extension base="xsd:string">
     <xsd:attribute name="option" type="xsd:string" use="optional"/>
     <xsd:attribute name="format" type="xsd:string" use="optional"/>
     <xsd:attribute name="object" type="xsd:string" use="optional"/>
   </xsd:extension>
 </xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="qsf_if">
 <xsd:sequence>
   <xsd:element name="set" qsf-map:type="qsf_set" minOccurs="0" maxOccurs="1"/>
   <xsd:element name="equals" qsf-map:type="qsf_equal" minOccurs="0" maxOccurs="1"/>
 </xsd:sequence>
 <xsd:attribute name="boolean" type="xsd:string" use="optional"/>
 <xsd:attribute name="type" type="xsd:string" use="optional"/>
 <xsd:attribute name="value" type="xsd:string" use="optional"/>
 <xsd:attribute name="string" type="xsd:string" use="optional"/>
</xsd:complexType>
<xsd:complexType name="qsf_else">
 <xsd:sequence>
   <xsd:element name="set" qsf-map:type="qsf_set" minOccurs="0" maxOccurs="1"/>
   <xsd:element name="equals" qsf-map:type="qsf_equal" minOccurs="0" maxOccurs="1"/>
 </xsd:sequence>
 <xsd:attribute name="type" type="xsd:string"/>
 <xsd:attribute name="value" type="xsd:string"/>
</xsd:complexType>
<xsd:complexType name="qsf_equal">
 <xsd:sequence>
   <xsd:element name="set" qsf-map:type="qsf_set" minOccurs="0" maxOccurs="1"/>
   <xsd:element name="equals" qsf-map:type="qsf_equal" minOccurs="0" maxOccurs="1"/>
 </xsd:sequence>
 <xsd:attribute name="type" type="xsd:string"/>
 <xsd:attribute name="value" type="xsd:string"/>
</xsd:complexType>

</xsd:schema>

