1<?xml version="1.0" encoding="UTF-8"?>
   2<!--
   3 Copyright (c) 2009 IETF Trust and the persons identified as authors
   4   of the code.  All rights reserved.
   5
   6   Redistribution and use in source and binary forms, with or without
   7   modification, are permitted provided that the following conditions
   8   are met:
   9
  10   o  Redistributions of source code must retain the above copyright
  11      notice, this list of conditions and the following disclaimer.
  12
  13   o  Redistributions in binary form must reproduce the above copyright
  14      notice, this list of conditions and the following disclaimer in
  15      the documentation and/or other materials provided with the
  16      distribution.
  17
  18   o  Neither the name of Internet Society, IETF or IETF Trust, nor the
  19      names of specific contributors, may be used to endorse or promote
  20      products derived from this software without specific prior written
  21      permission.
  22
  23   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  24   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  25   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  26   A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT
  27   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  28   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  29   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  30   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  31   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  32   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  33   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  34-->
  35<schema targetNamespace="urn:ietf:params:xml:ns:contact-1.0"
  36        xmlns:contact="urn:ietf:params:xml:ns:contact-1.0"
  37        xmlns:epp="urn:ietf:params:xml:ns:epp-1.0"
  38        xmlns:eppcom="urn:ietf:params:xml:ns:eppcom-1.0"
  39        xmlns="http://www.w3.org/2001/XMLSchema"
  40        elementFormDefault="qualified">
  41
  42    <!--
  43    Import common element types.
  44    -->
  45    <import namespace="urn:ietf:params:xml:ns:eppcom-1.0"
  46            schemaLocation="eppcom-1.0.xsd"/>
  47    <import namespace="urn:ietf:params:xml:ns:epp-1.0"
  48            schemaLocation="epp-1.0.xsd"/>
  49
  50    <annotation>
  51        <documentation>
  52            Extensible Provisioning Protocol v1.0
  53            contact provisioning schema.
  54        </documentation>
  55    </annotation>
  56
  57    <!--
  58    Child elements found in EPP commands.
  59    -->
  60    <element name="check" type="contact:mIDType"/>
  61    <element name="create" type="contact:createType"/>
  62    <element name="delete" type="contact:sIDType"/>
  63    <element name="info" type="contact:authIDType"/>
  64    <element name="transfer" type="contact:authIDType"/>
  65    <element name="update" type="contact:updateType"/>
  66
  67    <!--
  68    Utility types.
  69    -->
  70    <simpleType name="ccType">
  71        <restriction base="token">
  72            <length value="2"/>
  73        </restriction>
  74    </simpleType>
  75
  76    <complexType name="e164Type">
  77        <simpleContent>
  78            <extension base="contact:e164StringType">
  79                <attribute name="x" type="token"/>
  80            </extension>
  81        </simpleContent>
  82    </complexType>
  83
  84    <simpleType name="e164StringType">
  85        <restriction base="token">
  86            <pattern value="(\+[0-9]{1,3}\.[0-9]{1,14})?"/>
  87            <maxLength value="17"/>
  88        </restriction>
  89    </simpleType>
  90
  91    <simpleType name="pcType">
  92        <restriction base="token">
  93            <maxLength value="16"/>
  94        </restriction>
  95    </simpleType>
  96
  97    <simpleType name="postalLineType">
  98        <restriction base="normalizedString">
  99            <minLength value="1"/>
 100            <maxLength value="255"/>
 101        </restriction>
 102    </simpleType>
 103
 104    <simpleType name="optPostalLineType">
 105        <restriction base="normalizedString">
 106            <maxLength value="255"/>
 107        </restriction>
 108    </simpleType>
 109
 110    <!--
 111    Child elements of the <create> command.
 112    -->
 113    <complexType name="createType">
 114        <sequence>
 115            <element name="id" type="eppcom:clIDType"><annotation><documentation>This is ignored, and is assigned by the server when contact is created.</documentation></annotation></element>
 116            <element name="postalInfo" type="contact:postalInfoType"
 117                     maxOccurs="2"/>
 118            <element name="voice" type="contact:e164Type"
 119                     minOccurs="0"/>
 120            <element name="fax" type="contact:e164Type" minOccurs="0"><annotation><documentation>This is ignored.</documentation></annotation></element>
 121            <element name="email" type="eppcom:minTokenType"/>
 122            <element name="authInfo" type="contact:authInfoType"><annotation><documentation>pw REQUIRED</documentation></annotation></element>
 123            <element name="disclose" type="contact:discloseType"
 124                     minOccurs="0"/>
 125        </sequence>
 126    </complexType>
 127
 128    <complexType name="postalInfoType">
 129        <sequence>
 130            <element name="name" type="contact:postalLineType"/>
 131            <element name="org" type="contact:optPostalLineType" minOccurs="0">
 132                <annotation><documentation>NOT USED</documentation></annotation></element>
 133            <element name="addr" type="contact:addrType"/>
 134        </sequence>
 135        <attribute name="type" type="contact:postalInfoEnumType"
 136                   use="required"/>
 137    </complexType>
 138
 139    <simpleType name="postalInfoEnumType">
 140        <restriction base="token">
 141            <enumeration value="loc"><annotation><documentation>NOT USED</documentation></annotation></enumeration>
 142            <enumeration value="int"><annotation><documentation>All addresses are international</documentation></annotation></enumeration>
 143        </restriction>
 144    </simpleType>
 145
 146    <complexType name="addrType">
 147        <sequence>
 148            <element name="street" type="contact:optPostalLineType"
 149                     minOccurs="0" maxOccurs="3"/>
 150            <element name="city" type="contact:postalLineType">
 151                <annotation><documentation>If contact has address set as "do not disclose", this contains a single blank space</documentation></annotation></element>
 152            <element name="sp" type="contact:optPostalLineType"
 153                     minOccurs="0"/>
 154            <element name="pc" type="contact:pcType"
 155                     minOccurs="0"/>
 156            <element name="cc" type="contact:ccType"/>
 157        </sequence>
 158    </complexType>
 159
 160    <complexType name="authInfoType">
 161        <choice>
 162            <element name="pw" type="eppcom:pwAuthInfoType"/>
 163            <element name="ext" type="eppcom:extAuthInfoType"/>
 164        </choice>
 165    </complexType>
 166    <complexType name="discloseType">
 167        <annotation><documentation>Default is "do not disclose" for person.  NOTE cc is always diclosed.  Role's cannot "do not disclose". If one of name, email, street, pc, city, sp or voice is flagged as "disclose" all are flagged as "disclose".</documentation></annotation>
 168        <sequence>
 169            <element name="name" type="contact:intLocType" minOccurs="0" maxOccurs="2">
 170                <annotation><documentation>If one of name, email, street, pc, city, sp or voice is flagged as "disclose" all are flagged as "disclose".</documentation></annotation></element>
 171            <element name="org" type="contact:intLocType" minOccurs="0" maxOccurs="2">
 172                <annotation><documentation>NOT USED</documentation></annotation></element>
 173            <element name="addr" type="contact:intLocType" minOccurs="0" maxOccurs="2">
 174                <annotation><documentation>If one of name, email, street, pc, city, sp or voice is flagged as "disclose" all are flagged as "disclose".</documentation></annotation></element>
 175            <element name="voice" minOccurs="0">
 176                <annotation><documentation> If one of name, email, street, pc, city, sp or voice is flagged as "disclose" all are flagged as "disclose".</documentation></annotation></element>
 177            <element name="fax" minOccurs="0">
 178                <annotation><documentation>NOT USED.</documentation></annotation></element>
 179            <element name="email" minOccurs="0">
 180				<annotation><documentation> If one of name, email, street, pc, city, sp or voice is flagged as "disclose" all are flagged as "disclose".</documentation></annotation>
 181			</element>
 182        </sequence>
 183        <attribute name="flag" type="boolean" use="required"/>
 184    </complexType>
 185
 186    <complexType name="intLocType">
 187        <attribute name="type" type="contact:postalInfoEnumType"
 188                   use="required"/>
 189    </complexType>
 190
 191    <!--
 192    Child element of commands that require only an identifier.
 193    -->
 194    <complexType name="sIDType">
 195        <sequence>
 196            <element name="id" type="eppcom:clIDType"/>
 197        </sequence>
 198    </complexType>
 199
 200    <!--
 201    Child element of commands that accept multiple identifiers.
 202    -->
 203    <complexType name="mIDType">
 204        <sequence>
 205            <element name="id" type="eppcom:clIDType"
 206                     maxOccurs="unbounded"/>
 207        </sequence>
 208    </complexType>
 209
 210    <!--
 211    Child elements of the <info> and <transfer> commands.
 212    -->
 213    <complexType name="authIDType">
 214        <sequence>
 215            <element name="id" type="eppcom:clIDType"/>
 216            <element name="authInfo" type="contact:authInfoType"
 217                     minOccurs="0"/>
 218        </sequence>
 219    </complexType>
 220
 221    <!--
 222    Child elements of the <update> command.
 223    -->
 224    <complexType name="updateType">
 225        <sequence>
 226            <element name="id" type="eppcom:clIDType"/>
 227            <element name="add" type="contact:addRemType"
 228                     minOccurs="0"/>
 229            <element name="rem" type="contact:addRemType"
 230                     minOccurs="0"/>
 231            <element name="chg" type="contact:chgType"
 232                     minOccurs="0"/>
 233        </sequence>
 234    </complexType>
 235
 236    <!--
 237    Data elements that can be added or removed.
 238    -->
 239    <complexType name="addRemType">
 240        <sequence>
 241            <element name="status" type="contact:statusType"
 242                     maxOccurs="7"/>
 243        </sequence>
 244    </complexType>
 245
 246    <!--
 247    Data elements that can be changed.
 248    -->
 249    <complexType name="chgType">
 250        <sequence>
 251            <element name="postalInfo" type="contact:chgPostalInfoType"
 252                     minOccurs="0" maxOccurs="2"/>
 253            <element name="voice" type="contact:e164Type"
 254                     minOccurs="0"/>
 255            <element name="fax" type="contact:e164Type"
 256                     minOccurs="0"/>
 257            <element name="email" type="eppcom:minTokenType"
 258                     minOccurs="0"/>
 259            <element name="authInfo" type="contact:authInfoType"
 260                     minOccurs="0"/>
 261            <element name="disclose" type="contact:discloseType"
 262                     minOccurs="0"/>
 263        </sequence>
 264    </complexType>
 265
 266    <complexType name="chgPostalInfoType">
 267        <sequence>
 268            <element name="name" type="contact:postalLineType" minOccurs="0"><annotation><documentation>NOT ALLOWED</documentation></annotation></element>
 269            <element name="org" type="contact:optPostalLineType" minOccurs="0"><annotation><documentation>NOT USED</documentation></annotation></element>
 270            <element name="addr" type="contact:addrType"
 271                     minOccurs="0"><annotation><documentation>maxOccurs=1</documentation></annotation></element>
 272        </sequence>
 273        <attribute name="type" type="contact:postalInfoEnumType"
 274                   use="required"/>
 275    </complexType>
 276
 277    <!--
 278    Child response elements.
 279    -->
 280    <element name="chkData" type="contact:chkDataType"/>
 281    <element name="creData" type="contact:creDataType"/>
 282    <element name="infData" type="contact:infDataType"/>
 283    <element name="panData" type="contact:panDataType"/>
 284    <element name="trnData" type="contact:trnDataType"/>
 285
 286    <!--
 287    <check> response elements.
 288    -->
 289    <complexType name="chkDataType">
 290        <sequence>
 291            <element name="cd" type="contact:checkType"
 292                     maxOccurs="unbounded"/>
 293        </sequence>
 294    </complexType>
 295
 296    <complexType name="checkType">
 297        <sequence>
 298            <element name="id" type="contact:checkIDType"/>
 299            <element name="reason" type="eppcom:reasonType"
 300                     minOccurs="0"/>
 301        </sequence>
 302    </complexType>
 303
 304    <complexType name="checkIDType">
 305        <simpleContent>
 306            <extension base="eppcom:clIDType">
 307                <attribute name="avail" type="boolean"
 308                           use="required"/>
 309            </extension>
 310        </simpleContent>
 311    </complexType>
 312    <!--
 313    <create> response elements.
 314    -->
 315    <complexType name="creDataType">
 316        <sequence>
 317            <element name="id" type="eppcom:clIDType"/>
 318            <element name="crDate" type="dateTime"/>
 319        </sequence>
 320    </complexType>
 321
 322    <!--
 323    <info> response elements.
 324    -->
 325    <complexType name="infDataType">
 326        <sequence>
 327            <element name="id" type="eppcom:clIDType"/>
 328            <element name="roid" type="eppcom:roidType"/>
 329            <element name="status" type="contact:statusType" maxOccurs="7">
 330                    <annotation><documentation>Always set to serverTransferProhibited and serverDeleteProhibited see .is contact extension</documentation></annotation></element>
 331            <element name="postalInfo" type="contact:postalInfoType"
 332                     maxOccurs="2"/>
 333            <element name="voice" type="contact:e164Type"
 334                     minOccurs="0"/>
 335            <element name="fax" type="contact:e164Type" minOccurs="0">
 336                         <annotation><documentation>NOT USED</documentation></annotation></element>
 337			<element name="email" type="eppcom:minTokenType">
 338				 <annotation><documentation>If contact has address set as "do not disclose", this contains a '_'. There are some legacy contacts that have no email.</documentation></annotation>
 339			</element>
 340            <element name="clID" type="eppcom:clIDType">
 341                <annotation><documentation>Since ISNIC is not registry-registrar there is no sponsoring client so the contact is always returned as the sponsoring client</documentation></annotation></element>
 342            <element name="crID" type="eppcom:clIDType"/>
 343            <element name="crDate" type="dateTime"/>
 344            <element name="upID" type="eppcom:clIDType"
 345                     minOccurs="0"/>
 346            <element name="upDate" type="dateTime"
 347                     minOccurs="0"/>
 348            <element name="trDate" type="dateTime" minOccurs="0">
 349                <annotation><documentation>Since ISNIC is not registry-registrar there are no contact transfers.</documentation></annotation></element>
 350            <element name="authInfo" type="contact:authInfoType"
 351                     minOccurs="0"/>
 352            <element name="disclose" type="contact:discloseType"
 353                     minOccurs="0"/>
 354        </sequence>
 355    </complexType>
 356
 357    <!--
 358    Status is a combination of attributes and an optional human-readable
 359    message that may be expressed in languages other than English.
 360    -->
 361    <complexType name="statusType">
 362        <simpleContent>
 363            <extension base="normalizedString">
 364                <attribute name="s" type="contact:statusValueType"
 365                           use="required"/>
 366                <attribute name="lang" type="language"
 367                           default="en"/>
 368            </extension>
 369        </simpleContent>
 370    </complexType>
 371
 372    <simpleType name="statusValueType">
 373        <annotation><documentation>Not really used see contact .is extension.  Is always fixed to serverDeleteProhibited and serverTransferProhibited.</documentation></annotation>
 374        <restriction base="token">
 375            <enumeration value="clientDeleteProhibited"/>
 376            <enumeration value="clientTransferProhibited"/>
 377            <enumeration value="clientUpdateProhibited"/>
 378            <enumeration value="linked"/>
 379            <enumeration value="ok"/>
 380            <enumeration value="pendingCreate"/>
 381            <enumeration value="pendingDelete"/>
 382            <enumeration value="pendingTransfer"/>
 383            <enumeration value="pendingUpdate"/>
 384            <enumeration value="serverDeleteProhibited"/>
 385            <enumeration value="serverTransferProhibited"/>
 386            <enumeration value="serverUpdateProhibited"/>
 387        </restriction>
 388    </simpleType>
 389
 390    <!--
 391    Pending action notification response elements.
 392    -->
 393    <complexType name="panDataType">
 394        <sequence>
 395            <element name="id" type="contact:paCLIDType"/>
 396            <element name="paTRID" type="epp:trIDType"/>
 397            <element name="paDate" type="dateTime"/>
 398        </sequence>
 399    </complexType>
 400
 401    <complexType name="paCLIDType">
 402        <simpleContent>
 403            <extension base="eppcom:clIDType">
 404                <attribute name="paResult" type="boolean"
 405                           use="required"/>
 406            </extension>
 407        </simpleContent>
 408    </complexType>
 409
 410    <!--
 411    <transfer> response elements.
 412    -->
 413    <complexType name="trnDataType">
 414        <sequence>
 415            <element name="id" type="eppcom:clIDType"/>
 416            <element name="trStatus" type="eppcom:trStatusType"/>
 417            <element name="reID" type="eppcom:clIDType"/>
 418            <element name="reDate" type="dateTime"/>
 419            <element name="acID" type="eppcom:clIDType"/>
 420            <element name="acDate" type="dateTime"/>
 421        </sequence>
 422    </complexType>
 423
 424    <!--
 425    End of schema.
 426    -->
 427</schema>
 428