<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema version="1.5"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns="http://ands.org.au/standards/rif-cs/registryObjects"
    targetNamespace="http://ands.org.au/standards/rif-cs/registryObjects"
    elementFormDefault="qualified"
    attributeFormDefault="unqualified">
    
    <xsd:include schemaLocation="registryTypes.xsd"/>
    
    <xsd:annotation>
        <xsd:documentation xml:lang="en">
            Schema for an ISO2146 collections and services registry Activity object.
        </xsd:documentation>
        <xsd:documentation xml:lang="en">
            ISO2146 states that development of an Activity profile still needs exploration. My feeling is this should be omitted from the schema at this point (ISO2146 4.2). Suggest something similar to METS mdWrap for profile metadata, see Collection schema for example.
        </xsd:documentation>
    </xsd:annotation>
    
    <xsd:element name="activity">
        <xsd:annotation>
            <xsd:documentation xml:lang="en">
                Wrapper element for descriptive and administrative metadata for an activity registry object.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:choice minOccurs="0" maxOccurs="unbounded">
                <xsd:element name="identifier" type="identifierType" minOccurs="0" maxOccurs="unbounded">
                    <xsd:annotation>
                        <xsd:documentation xml:lang="en">
                            Primary and alternative identifiers for an activity. The value of the &lt;key&gt; element may be repeated, or any additional (local or global) identifiers described. Each identifier must be represented in its own identifier element.
                        </xsd:documentation>
                    </xsd:annotation>    
                </xsd:element>
                
                <xsd:element name="name" type="nameType" minOccurs="0" maxOccurs="unbounded">
                    <xsd:annotation>
                        <xsd:documentation xml:lang="en">
                            The name of the party in either a simple or compound form.
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:element>
                
                <xsd:element name="location" type="locationType" minOccurs="0" maxOccurs="unbounded">
                    <xsd:annotation>
                        <xsd:documentation xml:lang="en">
                            Location(s) relevant to the activity. A location element should contain information about a single location (e.g. activity web site).
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:element>
                
                <xsd:element name="coverage" type="coverageType" minOccurs="0" maxOccurs="unbounded">
                    <xsd:annotation>
                        <xsd:documentation xml:lang="en">
                            Activity coverage information.
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:element>
                
                <xsd:element name="relatedObject" type="relatedObjectType" minOccurs="0" maxOccurs="unbounded">
                    <xsd:annotation>
                        <xsd:documentation xml:lang="en">
                            Element for holding information about a related registry object.
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:element>
                
                <xsd:element name="subject" type="subjectType" minOccurs="0" maxOccurs="unbounded">
                    <xsd:annotation>
                        <xsd:documentation xml:lang="en">
                            A subject category into which the activity falls or the activity is related. Multiple subjects must be represented via separate subject elements. 
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:element>
                
                <xsd:element name="description" type="descriptionType" minOccurs="0" maxOccurs="unbounded">
                    <xsd:annotation>
                        <xsd:documentation xml:lang="en">
                            A textual description or URI resolving to a description relevant to the ativity.
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:element>
                
                <xsd:element name="rights" type="rightsType" minOccurs="0" maxOccurs="unbounded">
                    <xsd:annotation>
                        <xsd:documentation xml:lang="en">Rights(s) relevant to the collection. </xsd:documentation>
                    </xsd:annotation>
                </xsd:element>
                
                <xsd:element name="existenceDates" type="existenceDateType" minOccurs="0"
                    maxOccurs="unbounded">
                    <xsd:annotation>
                        <xsd:documentation xml:lang="en">
                            Element for holding a start date and end date.
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:element>
                
                <xsd:element name="relatedInfo" type="relatedInfoType" minOccurs="0" maxOccurs="unbounded">
                    <xsd:annotation>
                        <xsd:documentation xml:lang="en">
                            A URI pointing to information related to the activity.
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:element>
            </xsd:choice>
            
            <xsd:attributeGroup ref="objectAttributes"/>
            
        </xsd:complexType>
    </xsd:element>
</xsd:schema>