<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
        xmlns:is-ext-domain="urn:is.isnic:xml:ns:is-ext-domain-1.0"
        xmlns:eppcom="urn:ietf:params:xml:ns:eppcom-1.0"
        targetNamespace="urn:is.isnic:xml:ns:is-ext-domain-1.0"
        elementFormDefault="qualified">

    <annotation><documentation>.is domain extension</documentation></annotation>


    <import namespace="urn:ietf:params:xml:ns:eppcom-1.0" schemaLocation="eppcom-1.0.xsd"/>

    <element name="infData" type="is-ext-domain:infDataType"/>
    <element name="create" type="is-ext-domain:createType"/>
    <element name="renew" type="is-ext-domain:renewType"/>
    <element name="update" type="is-ext-domain:updateType"/>

    <complexType name="infDataType">
        <annotation><documentation>Extra info returned for domains</documentation></annotation>
        <sequence>
            <element name="contact" type="is-ext-domain:contactType"
                     minOccurs="0" maxOccurs="unbounded"/>
        </sequence>
    </complexType>

    <complexType name="contactType">
        <annotation><documentation>Only the zone contact is returned here</documentation></annotation>
        <simpleContent>
            <extension base="eppcom:clIDType">
                <attribute name="type" type="is-ext-domain:contactAttrType"/>
            </extension>
        </simpleContent>
    </complexType>

    <simpleType name="contactAttrType">
        <restriction base="token">
            <enumeration value="zone"><annotation><documentation>Zone contact is defined as the admin contact for the first host defined on a domain.</documentation></annotation></enumeration>
        </restriction>
    </simpleType>

    <complexType name="createType">
        <sequence>
            <element name="cardID" type="int"><annotation><documentation>ID of the creditcard or prepaid account to be billed for the domain, use the web gui to manage your creditcards.</documentation></annotation></element>
            <element name="cardCVC" type="int"><annotation><documentation>NOT USED, to comply with schema set to any 3 digit number</documentation></annotation></element>
        </sequence>
    </complexType>

    <complexType name="renewType">
        <sequence>
            <element name="cardID" type="int"><annotation><documentation>ID of the creditcard or prepaid account to be billed for the domain, use the web gui to manage your creditcards.</documentation></annotation></element>
            <element name="cardCVC" type="int"><annotation><documentation>NOT USED, to comply with schema set to any 3 digit number</documentation></annotation></element>
        </sequence>
    </complexType>

    <complexType name="updateType">
        <sequence>
            <element name="rem" type="is-ext-domain:remType" minOccurs="0"><annotation><documentation>used to remove all</documentation></annotation></element>
            <element name="chg" type="is-ext-domain:chgType" minOccurs="0"><annotation><documentation>use to get better control over which ns becomes the primary nameserver, admin contact for host becomes zone contact for the domain.</documentation></annotation></element>
        </sequence>
    </complexType>

    <complexType name="remType">
        <choice>
            <element name="ns_all" type="boolean"/>
       </choice>
    </complexType>

    <complexType name="chgType">
        <sequence>
            <element name="master_ns" type="is-ext-domain:nsType"  minOccurs="0" maxOccurs="1"/>
        </sequence>
    </complexType>

    <complexType name="nsType">
        <choice>
            <element name="hostObj" type="eppcom:labelType" maxOccurs="unbounded"/>
        </choice>
    </complexType>

</schema>