<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:sawsdl="http://www.w3.org/ns/sawsdl"
    targetNamespace="http://www.nexml.org/2009" xmlns="http://www.nexml.org/2009"
    elementFormDefault="qualified">
    <xs:annotation>
        <xs:documentation>
            This module defines complex types for sets of things. These
            sets are elements called "set", with a required "id" attribute,
            an optional "label" attribute, and one ore more attributes named
            after the elements that are members of the set. The value of
            these latter attributes are ID references. Set elements can
            be annotated (i.e. enclose "meta" elements), in which case
            they need to have an "about" attribute, whose value matches that
            of the "id" attribute prefixed with a "#" symbol.            
            Set elements are placed at the bottom of the container element
            that collects candidate members of the set. Hence, concrete
            instances of the set elements are defined in the modules that
            define the respective container elements.
        </xs:documentation>
    </xs:annotation>    
    
    <xs:include schemaLocation="../abstract.xsd"/>
    
    <xs:complexType name="AbstractSet" abstract="true" mixed="false">
        <xs:complexContent>
            <xs:extension base="IDTagged"/>
        </xs:complexContent>
    </xs:complexType>
    
    <xs:complexType name="TaxonSet" abstract="false" mixed="false">
        <xs:complexContent>
            <xs:extension base="AbstractSet">
                <xs:attribute name="otu" type="xs:IDREFS" use="required"/>
            </xs:extension>                           
        </xs:complexContent>        
    </xs:complexType>
    
    <xs:complexType name="StateSet" abstract="false" mixed="false">
        <xs:complexContent>
            <xs:extension base="AbstractSet">
                <xs:attribute name="state" type="xs:IDREFS" use="optional"/>
                <xs:attribute name="polymorphic_state_set" type="xs:IDREFS" use="optional"/>
                <xs:attribute name="uncertain_state_set" type="xs:IDREFS" use="optional"/>
            </xs:extension>                           
        </xs:complexContent>        
    </xs:complexType>  

    <xs:complexType name="CharSet" abstract="false" mixed="false">
        <xs:complexContent>
            <xs:extension base="AbstractSet">
                <xs:attribute name="char" type="xs:IDREFS" use="required"/>
            </xs:extension>                           
        </xs:complexContent>        
    </xs:complexType>
    
    <xs:complexType name="RowSet" abstract="false" mixed="false">
        <xs:complexContent>
            <xs:extension base="AbstractSet">
                <xs:attribute name="row" type="xs:IDREFS" use="required"/>
            </xs:extension>                           
        </xs:complexContent>        
    </xs:complexType>  

    <xs:complexType name="CellSet" abstract="false" mixed="false">
        <xs:complexContent>
            <xs:extension base="AbstractSet">
                <xs:attribute name="cell" type="xs:IDREFS" use="required"/>
            </xs:extension>                           
        </xs:complexContent>        
    </xs:complexType> 
    
    <xs:complexType name="TreeAndNetworkSet" abstract="false" mixed="false">
        <xs:complexContent>
            <xs:extension base="AbstractSet">
                <xs:attribute name="tree" type="xs:IDREFS" use="optional"/>
                <xs:attribute name="network" type="xs:IDREFS" use="optional"/>
            </xs:extension>                           
        </xs:complexContent>         
    </xs:complexType>
    
    <xs:complexType name="NodeAndRootEdgeAndEdgeSet" abstract="false" mixed="false">
        <xs:complexContent>
            <xs:extension base="AbstractSet">
                <xs:attribute name="node" type="xs:IDREFS" use="optional"/>
                <xs:attribute name="rootedge" type="xs:IDREFS" use="optional"/>
                <xs:attribute name="edge" type="xs:IDREFS" use="optional"/>
            </xs:extension>                           
        </xs:complexContent>         
    </xs:complexType>


</xs:schema>
