datacite/orcid_client

View on GitHub
resources/record_2.1/funding-2.1.xsd

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:sch="http://purl.oclc.org/dsdl/schematron" elementFormDefault="qualified"
    targetNamespace="http://www.orcid.org/ns/funding" xmlns:funding="http://www.orcid.org/ns/funding"
    xmlns:common="http://www.orcid.org/ns/common">
    <xs:annotation>
        <xs:documentation>
            =============================================================================

            ORCID (R) Open Source
            http://orcid.org

            Copyright (c) 2012-2014 ORCID,
            Inc.
            Licensed under an MIT-Style License (MIT)
            http://orcid.org/open-source-license

            This copyright and license
            information (including a link to the full
            license)
            shall be included in
            its entirety in all copies or substantial portion of
            the software.

            =============================================================================
            The schema describes the message format used for ORCID API requests
            and responses.
            The top level element is orcid-message.
        </xs:documentation>
        <xs:appinfo>
            <sch:title>Schematron validation</sch:title>
            <sch:ns prefix="orcid" uri="http://www.orcid.org/ns/orcid" />
        </xs:appinfo>
    </xs:annotation>

    <xs:import namespace="http://www.orcid.org/ns/common"
        schemaLocation="../common_2.1/common-2.1.xsd" />

    <xs:element name="funding">
        <xs:annotation>
            <xs:documentation>Funding received by the researcher or contributor.
                * REQUIRED FIELDS: Funding-type, Funding-title, Funding Agency
                (organization)
                * The visibility attribute (private, limited or
                public) can be set at
                record creation, and indicates who can see this
                section of
                information.
                * The put-code attribute is used only when
                reading this element. When
                updating the item, the put-code attribute
                must be included to
                indicate the specific record to be updated.
            </xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:complexContent>
                <xs:extension base="common:element-summary">
                    <xs:sequence>
                        <xs:element name="type" type="funding:funding-type"
                            minOccurs="1" maxOccurs="1" />
                        <xs:element name="organization-defined-type" type="common:organization-defined-type"
                            minOccurs="0" maxOccurs="1" />
                        <xs:element name="title" type="funding:funding-title"
                            minOccurs="0" />
                        <xs:element name="short-description" type="common:short-description"
                            minOccurs="0" />
                        <xs:element name="amount" type="common:amount"
                            minOccurs="0" maxOccurs="1" />
                        <xs:element name="url" type="common:url" minOccurs="0"
                            maxOccurs="1" />
                        <xs:element ref="common:start-date" minOccurs="0"
                            maxOccurs="1">
                            <xs:annotation>
                                <xs:documentation>Start date for the funding.</xs:documentation>
                            </xs:annotation>
                        </xs:element>
                        <xs:element ref="common:end-date" minOccurs="0"
                            maxOccurs="1">
                            <xs:annotation>
                                <xs:documentation>End date for the funding.</xs:documentation>
                            </xs:annotation>
                        </xs:element>
                        <xs:element ref="common:external-ids"
                            minOccurs="0" />
                        <xs:element name="contributors" type="funding:contributors"
                            minOccurs="0" />
                        <xs:element name="organization" type="common:organization"
                            minOccurs="1" maxOccurs="1" />
                    </xs:sequence>
                </xs:extension>
            </xs:complexContent>
        </xs:complexType>
    </xs:element>

    <xs:element name="funding-summary">
        <xs:complexType>
            <xs:complexContent>
                <xs:extension base="common:element-summary">
                    <xs:sequence>
                        <xs:element name="title" type="funding:funding-title"
                            minOccurs="1" />
                        <xs:element ref="common:external-ids"
                            minOccurs="0" />
                        <xs:element name="type" type="funding:funding-type"
                            minOccurs="1" maxOccurs="1" />
                        <xs:element ref="common:start-date" minOccurs="0"
                            maxOccurs="1">
                            <xs:annotation>
                                <xs:documentation>Start date for the funding.</xs:documentation>
                            </xs:annotation>
                        </xs:element>
                        <xs:element ref="common:end-date" minOccurs="0"
                            maxOccurs="1">
                            <xs:annotation>
                                <xs:documentation>End date for the funding.</xs:documentation>
                            </xs:annotation>
                        </xs:element>
                        <xs:element name="organization" type="common:organization" 
                            minOccurs="1" maxOccurs="1" />
                    </xs:sequence>
                </xs:extension>
            </xs:complexContent>
        </xs:complexType>
    </xs:element>

    <xs:complexType name="funding-title">
        <xs:annotation>
            <xs:documentation>Container for titles of the funding.
            </xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element ref="common:title">
                <xs:annotation>
                    <xs:documentation>The main name or title of the funding.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element ref="common:translated-title" minOccurs="0" />
        </xs:sequence>
    </xs:complexType>

    <xs:simpleType name="funding-type">
        <xs:annotation>
            <xs:documentation>The type of funding, it could be grant, contract,
                award or salary-award.
            </xs:documentation>
        </xs:annotation>

        <xs:restriction base="xs:string">
            <xs:enumeration value="grant" />
            <xs:enumeration value="contract" />
            <xs:enumeration value="award" />
            <xs:enumeration value="salary-award" />
        </xs:restriction>
    </xs:simpleType>
    
    <xs:complexType name="contributors">
        <xs:annotation>
            <xs:documentation>Container for the contributors of a funding.
            </xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element maxOccurs="unbounded" minOccurs="0" name="contributor"
                type="funding:contributor" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="contributor">
        <xs:annotation>
            <xs:documentation>A collaborator or other contributor to a work or
                other orcid-activity
            </xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element ref="common:contributor-orcid" minOccurs="0"
                maxOccurs="1" />
            <xs:element name="credit-name" type="common:credit-name"
                minOccurs="0" maxOccurs="1" />
            <xs:element name="contributor-email" type="common:contributor-email"
                minOccurs="0" maxOccurs="1" />
            <xs:element name="contributor-attributes" type="funding:contributor-attributes"
                minOccurs="0" maxOccurs="1" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="contributor-attributes">
        <xs:annotation>
            <xs:documentation>Provides detail of the nature of the contribution
                by the collaborator or other contirbutor.
            </xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="contributor-role" type="funding:contributor-role"
                minOccurs="0" />
        </xs:sequence>
    </xs:complexType>

    <xs:simpleType name="contributor-role">
        <xs:annotation>
            <xs:documentation>The role performed by the collaborator or other
                contributor.
            </xs:documentation>
        </xs:annotation>
        <xs:restriction base="xs:string">
            <xs:enumeration value="lead" />
            <xs:enumeration value="co-lead" />
            <xs:enumeration value="supported-by" />
            <xs:enumeration value="other-contribution" />
        </xs:restriction>
    </xs:simpleType>

</xs:schema>