<xsd:schema   xmlns:xsd=  "http:www.cis.hut.fi/picsom/picsom-xml-0.5.dtd">

   <xsd:annotation>
     <xsd:documentation xml:lang="en">
        Picsom Scheema for pid 1311655-in-19.xml
        Copyright 2001 cis.hut.fi.  All rights reserved.
     </xsd:documentation>
   </xsd:annotation>

   <xsd:element   name="result"    type="resultType"/>

   <xsd:complexType    name="resultType">
      <xsd:sequence>
         <xsd:element    name="identity"          type="xsd:string"/>
         <xsd:element    name="database"          type="DatabaseType"/>
         <xsd:element    name="featurelist"       type="FeatureListType"/>
         <xsd:element    name="algorithm"         type="AlgorithmType"/>
         <xsd:element    name="variables"         type="VariablesType"/>
         <xsd:element    name="parent_identity"   type="xsd:string"/>
         <xsd:element    name="otherkeys"         type="OtherKeysType"/>
         <xsd:element    name="images"            type="ImagesType"/>
      </xsd:sequence>
   </xsd:complexType>

   <xsd:complexType     name="DatabaseType">
       <xsd:sequence>
          <xsd:element   name="name"      type="xsd:string"/>
          <xsd:element   name="longname"  type="xsd:string"/>
          <xsd:element   name="shorttext" type="xsd:string"/>
          <xsd:element   name="longtext">
            <xsd:complexType  mixed="true">
              <xsd:sequence>
                 <xsd:element  name="p">
                     <xsd:complexType  mixed="true">
                        <xsd:sequence>
                          <xsd:element   name="a"/>
                          <xsd:element   name="i"/>
                        </xsd:sequence>
                     </xsd:complexType>
                 </xsd:element>
             </xsd:sequence>
           </xsd:complexType>
         </xsd:element>
         <xsd:element   name="size">
            <xsd:simpleType>
               <xsd:restriction base="xsd:positiveInteger">
                  <xsd:maxExclusive   value="1000"/>
               </xsd:restriction>
            </xsd:simpleType>
         </xsd:element>
         <xsd:element   name="tnsizes"  type="xsd:string"/>
         <xsd:element   name="views">
            <xsd:simpleType>
               <xsd:restriction base="xsd:positiveInteger">
                  <xsd:maxExclusive   value="10"/>
               </xsd:restriction>
            </xsd:simpleType>
         </xsd:element>
       </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType  name="FeatureListType">
       <xsd:sequence>
         <xsd:element  name="feature"   type="FEA"/>
       </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType  name="FEA">
       <xsd:sequence>
         <xsd:element  name="name"      type="xsd:string"/>
         <xsd:element  name="longname"  type="xsd:string"/>
         <xsd:element  name="shorttext" type="xsd:string"/>
         <xsd:element  name="longtext"  type="xsd:string"/>
         <xsd:element  name="size">
            <xsd:simpleType>
              <xsd:restriction   base="positiveInteger">
                <xsd:maxExclusive    value="100"/>
              </xsd:restriction>
            </xsd:simpleType>
         </xsd:element>
         <xsd:element  name="levels">
            <xsd:simpleType>
              <xsd:restriction   base="positiveInteger">
                <xsd:maxExclusive    value="100"/>
              </xsd:restriction>
            </xsd:simpleType>
         </xsd:element>
         <xsd:element  name="selected">
            <xsd:simpleType>
              <xsd:restriction   base="positiveInteger">
                <xsd:maxExclusive     value="100"/>
              </xsd:restriction>
            </xsd:simpleType>
         </xsd:element>
       </xsd:sequence>
    </xsd:complexType> 
   
    <xsd:complexType      name="AlgorithmType">
        <xsd:sequence>
           <xsd:element   name="name"  type="xsd:string"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType      name="VariableType">
       <xsd:sequence>
           <xsd:element   name="permapnewimages">
              <xsd:simpleType>
                <xsd:restriction  base="positiveInteger">
                  <xsd:maxExclusive   value="100"/>
                </xsd:restriction>
              </xsd:simpleType>
           </xsd:element>
           <xsd:element   name="imgcols">
              <xsd:simpleType>
                <xsd:restriction  base="integer">
                  <xsd:maxExclusive   value="100"/>
                </xsd:restriction>
              </xsd:simpleType>
           </xsd:element>
           <xsd:element   name="showstats">
              <xsd:simpleType>
                <xsd:restriction  base="positiveInteger">
                  <xsd:maxExclusive   value="100"/>
                </xsd:restriction>
              </xsd:simpleType>
           </xsd:element>
           <xsd:element   name="vqlevel">
              <xsd:simpleType>
                <xsd:restriction  base="positiveInteger">
                  <xsd:maxExclusive   value="100"/>
                </xsd:restriction>
              </xsd:simpleType>
           </xsd:element>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType  name="OtherKeysType">
       <xsd:sequence>
         <xsd:element name="fii"   type="xsd:string"/>
       </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="ImagesType">
       <xsd:sequence>
         <xsd:element name="plusimagelist"      type="xsd:string"/>
         <xsd:element name="minusimagelist"     type="xsd:string"/>
         <xsd:element name="zeroimagelist"      type="xsd:string"/>
         <xsd:element name="showimagelist"      type="xsd:string"/>
         <xsd:element name="questionimagelist"  type="QUEST"/>
       </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType  name="QUEST">
       <xsd:sequence>
           <xsd:element  name="imageinfo"  minOccurs="0" maxOccurs="unbounded">             <xsd:complexType>
               <xsd:sequence>
                 <xsd:element name="label"     type="xsd:decimal"/>
                 <xsd:element name="name"      type="xsd:string"/>
                 <xsd:element name="url"       type="xsd:string"/>
                 <xsd:element name="available">
                    <xsd:simpleType>
                      <xsd:restriction     base="xsd:positiveInteger">
                       <xsd:maxExclusive  value="100"/>
                      </xsd:restriction>
                    </xsd:simpleType>
                 </xsd:element>
                 <xsd:element name="score">
                    <xsd:simpleType>
                      <xsd:restriction     base="xsd:positiveInteger">        
                         <xsd:maxExclusive  value="100"/>
                      </xsd:restriction>
                    </xsd:simpleType>
                 </xsd:element>
                 <xsd:element name="segmentationinfolist"  type="SEG"/>
               </xsd:sequence>        
             </xsd:complexType>
           </xsd:element>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType  name="SEG">
       <xsd:sequence>
         <xsd:attribute name="method"  type="MET"  minOccurs="0"/>
       </xsd:sequence>
    </xsd:complexType>

    <xsd:simpleType  name="MET">
      <xsd:restriction base="xsd:string">
         <xsd:pattern value="\[A-Z]{2}-[A-Z]{2}"/>
      </xsd:restriction>
    </xsd:simpleType>

</xsd:schema>



    

   










