1<?xml version="1.0" encoding="UTF-8"?>
   2<schema xmlns="http://www.w3.org/2001/XMLSchema"
   3        xmlns:is-ext-contact="urn:is.isnic:xml:ns:is-ext-contact-1.0"
   4        xmlns:contact="urn:ietf:params:xml:ns:contact-1.0"
   5        xmlns:epp="urn:ietf:params:xml:ns:epp-1.0"
   6        targetNamespace="urn:is.isnic:xml:ns:is-ext-contact-1.0"
   7        elementFormDefault="qualified">
   8
   9    <annotation><documentation>.is contact extension</documentation></annotation>
  10
  11    <import namespace="urn:ietf:params:xml:ns:contact-1.0"
  12            schemaLocation="contact-1.0.xsd"/>
  13    <import namespace="urn:ietf:params:xml:ns:epp-1.0"
  14            schemaLocation="epp-1.0.xsd"/>
  15
  16
  17    <element name="infData" type="is-ext-contact:infDataType"/>
  18    <element name="create" type="is-ext-contact:createType"/>
  19    <element name="update" type="is-ext-contact:updateType"/>
  20
  21    <complexType name="infDataType">
  22        <annotation><documentation>Extra info returned for contacts</documentation></annotation>
  23        <sequence>
  24            <element name="type" type="is-ext-contact:contactType" minOccurs="1" maxOccurs="1" />
  25            <element name="status" type="is-ext-contact:statusType" maxOccurs="7" />
  26            <element name="mobile" type="contact:e164Type" minOccurs="0">
  27                <annotation><documentation>Can be used for lost password retrieval</documentation></annotation></element>
  28            <element name="sid" type="is-ext-contact:sidType" minOccurs="0" maxOccurs="1"><annotation><documentation>kennitala, allows island.is single sign on for persons and companies</documentation></annotation></element>
  29            <element name="autoUpdateFromNationalRegistry" type="boolean" minOccurs="0" maxOccurs="1">
  30                <annotation><documentation>If sid is not set this can be ignored. If sid is set and this variable is set to true then address will be updated according to Þjóðskrá Íslands</documentation></annotation></element>
  31            <element name="cancelPaper" type="boolean" minOccurs="0" maxOccurs="1">
  32                <annotation><documentation>Defaults to true, true ISNIC does not send Invoices in snailmail. If set to false additional fee is charged.</documentation></annotation></element>
  33        </sequence>
  34    </complexType>
  35
  36    <complexType name="createType">
  37        <sequence>
  38            <element name="type" type="is-ext-contact:contactType" minOccurs="1" maxOccurs="1" />
  39            <element name="mobile" type="contact:e164Type" minOccurs="0">
  40                <annotation><documentation>Can be used for lost password retrieval</documentation></annotation></element>
  41            <element name="sid" type="is-ext-contact:sidType" minOccurs="0" maxOccurs="1"><annotation><documentation>kennitala, allows island.is single sign on for persons and companies</documentation></annotation></element>
  42            <element name="autoUpdateFromNationalRegistry" type="boolean" minOccurs="0" maxOccurs="1">
  43                <annotation><documentation>If sid is not set this can be ignored. If sid is set and this variable is set to true then address will be updated according to Þjóðskrá Íslands</documentation></annotation></element>
  44            <element name="cancelPaper" type="boolean" minOccurs="0" maxOccurs="1">
  45                <annotation><documentation>Defaults to true, true ISNIC does not send Invoices in snailmail. If set to false additional fee is charged.</documentation></annotation></element>
  46            <element name="lang" type="language" default="en" minOccurs="0" maxOccurs="1">
  47                <annotation><documentation>only en and is valid</documentation></annotation>
  48            </element>
  49        </sequence>
  50    </complexType>
  51
  52    <complexType name="updateType">
  53        <sequence>
  54            <element name="chg" type="is-ext-contact:chgType" minOccurs="0"/>
  55            <element name="oldPW" type="epp:pwType"/>
  56        </sequence>
  57    </complexType>
  58
  59    <complexType name="chgType">
  60        <sequence>
  61            <element name="mobile" type="contact:e164Type" minOccurs="0"/>
  62            <element name="autoUpdateFromNationalRegistry" type="boolean" minOccurs="0" maxOccurs="1"/>
  63            <element name="cancelPaper" type="boolean" minOccurs="0" maxOccurs="1"/>
  64            <element name="lang" type="language" default="en" minOccurs="0" maxOccurs="1"/>
  65        </sequence>
  66    </complexType>
  67
  68    <!--
  69    Status is a combination of attributes and an optional human-readable
  70    message that may be expressed in languages other than English.
  71    -->
  72    <complexType name="statusType">
  73        <simpleContent>
  74            <extension base="normalizedString">
  75                <attribute name="s" type="is-ext-contact:statusValueType"
  76                           use="required"/>
  77                <attribute name="lang" type="language"
  78                           default="en"/>
  79            </extension>
  80        </simpleContent>
  81    </complexType>
  82
  83    <simpleType name="statusValueType">
  84        <restriction base="token">
  85            <enumeration value="ok"><annotation><documentation>Contact has confirmed email</documentation></annotation></enumeration>
  86            <enumeration value="okUnconfirmed"><annotation><documentation>Contact was created by the server or ISP, can be used for certain things and does not have confirmed email</documentation></annotation></enumeration>
  87            <enumeration value="pendingCreate"><annotation><documentation>Contact has yet to confirm email</documentation></annotation></enumeration>
  88            <enumeration value="serverExpired"><annotation><documentation>Contact is not used anywhere and has been marked for deletion</documentation></annotation></enumeration>
  89            <enumeration value="serverSuspended"><annotation><documentation>Registry has suspended contact due to registration info is incomplete or other abnormal actions</documentation></annotation></enumeration>
  90        </restriction>
  91    </simpleType>
  92
  93    <simpleType name="contactType">
  94        <annotation><documentation>Is contact a person (individual) or role (organisation or something else).  Controls "do not disclose" capabilities.</documentation></annotation>
  95        <restriction base="token">
  96            <enumeration value="person"><annotation><documentation>Contact is an individual, can mark certain fields "not disclose"</documentation></annotation></enumeration>
  97            <enumeration value="role"><annotation><documentation>Contact is not an individual (role or organisation), cannot mark certain fields "not disclose"</documentation></annotation></enumeration>
  98        </restriction>
  99    </simpleType>
 100
 101    <simpleType name="sidType">
 102        <annotation><documentation>Icelandic national identification number (https://en.wikipedia.org/wiki/Kennitala) only set for Icelandic individuals or organisations</documentation></annotation>
 103        <restriction base="token">
 104            <pattern value="[0-9]{10,10}"/>
 105            <minLength value="10"/>
 106            <maxLength value="10"/>
 107        </restriction>
 108    </simpleType>
 109
 110</schema>