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        <sequence>
 168            <element name="name" type="contact:intLocType" minOccurs="0" maxOccurs="2">
 169                <annotation><documentation>NOT ALLOWED</documentation></annotation></element>
 170            <element name="org" type="contact:intLocType" minOccurs="0" maxOccurs="2">
 171                <annotation><documentation>NOT USED</documentation></annotation></element>
 172            <element name="addr" type="contact:intLocType" minOccurs="0" maxOccurs="2">
 173                <annotation><documentation>Affects only street, pc, city and sp.  Not cc.
 174                    If one of street, pc, city, sp, voice or fax is flagged as "do not disclose" all are flagged as "do not disclose".</documentation></annotation></element>
 175            <element name="voice" minOccurs="0">
 176                <annotation><documentation>If one of street, pc, city, sp, voice or fax is flagged as "do not disclose" all are flagged as "do not disclose".</documentation></annotation></element>
 177            <element name="fax" minOccurs="0">
 178                <annotation><documentation>NOT USED.</documentation></annotation></element>
 179            <element name="email" minOccurs="0"><annotation><documentation>NOT ALLOWED</documentation></annotation></element>
 180        </sequence>
 181        <attribute name="flag" type="boolean" use="required"/>
 182    </complexType>
 183
 184    <complexType name="intLocType">
 185        <attribute name="type" type="contact:postalInfoEnumType"
 186                   use="required"/>
 187    </complexType>
 188
 189    <!--
 190    Child element of commands that require only an identifier.
 191    -->
 192    <complexType name="sIDType">
 193        <sequence>
 194            <element name="id" type="eppcom:clIDType"/>
 195        </sequence>
 196    </complexType>
 197
 198    <!--
 199    Child element of commands that accept multiple identifiers.
 200    -->
 201    <complexType name="mIDType">
 202        <sequence>
 203            <element name="id" type="eppcom:clIDType"
 204                     maxOccurs="unbounded"/>
 205        </sequence>
 206    </complexType>
 207
 208    <!--
 209    Child elements of the <info> and <transfer> commands.
 210    -->
 211    <complexType name="authIDType">
 212        <sequence>
 213            <element name="id" type="eppcom:clIDType"/>
 214            <element name="authInfo" type="contact:authInfoType"
 215                     minOccurs="0"/>
 216        </sequence>
 217    </complexType>
 218
 219    <!--
 220    Child elements of the <update> command.
 221    -->
 222    <complexType name="updateType">
 223        <sequence>
 224            <element name="id" type="eppcom:clIDType"/>
 225            <element name="add" type="contact:addRemType"
 226                     minOccurs="0"/>
 227            <element name="rem" type="contact:addRemType"
 228                     minOccurs="0"/>
 229            <element name="chg" type="contact:chgType"
 230                     minOccurs="0"/>
 231        </sequence>
 232    </complexType>
 233
 234    <!--
 235    Data elements that can be added or removed.
 236    -->
 237    <complexType name="addRemType">
 238        <sequence>
 239            <element name="status" type="contact:statusType"
 240                     maxOccurs="7"/>
 241        </sequence>
 242    </complexType>
 243
 244    <!--
 245    Data elements that can be changed.
 246    -->
 247    <complexType name="chgType">
 248        <sequence>
 249            <element name="postalInfo" type="contact:chgPostalInfoType"
 250                     minOccurs="0" maxOccurs="2"/>
 251            <element name="voice" type="contact:e164Type"
 252                     minOccurs="0"/>
 253            <element name="fax" type="contact:e164Type"
 254                     minOccurs="0"/>
 255            <element name="email" type="eppcom:minTokenType"
 256                     minOccurs="0"/>
 257            <element name="authInfo" type="contact:authInfoType"
 258                     minOccurs="0"/>
 259            <element name="disclose" type="contact:discloseType"
 260                     minOccurs="0"/>
 261        </sequence>
 262    </complexType>
 263
 264    <complexType name="chgPostalInfoType">
 265        <sequence>
 266            <element name="name" type="contact:postalLineType" minOccurs="0"><annotation><documentation>NOT ALLOWED</documentation></annotation></element>
 267            <element name="org" type="contact:optPostalLineType" minOccurs="0"><annotation><documentation>NOT USED</documentation></annotation></element>
 268            <element name="addr" type="contact:addrType"
 269                     minOccurs="0"><annotation><documentation>maxOccurs=1</documentation></annotation></element>
 270        </sequence>
 271        <attribute name="type" type="contact:postalInfoEnumType"
 272                   use="required"/>
 273    </complexType>
 274
 275    <!--
 276    Child response elements.
 277    -->
 278    <element name="chkData" type="contact:chkDataType"/>
 279    <element name="creData" type="contact:creDataType"/>
 280    <element name="infData" type="contact:infDataType"/>
 281    <element name="panData" type="contact:panDataType"/>
 282    <element name="trnData" type="contact:trnDataType"/>
 283
 284    <!--
 285    <check> response elements.
 286    -->
 287    <complexType name="chkDataType">
 288        <sequence>
 289            <element name="cd" type="contact:checkType"
 290                     maxOccurs="unbounded"/>
 291        </sequence>
 292    </complexType>
 293
 294    <complexType name="checkType">
 295        <sequence>
 296            <element name="id" type="contact:checkIDType"/>
 297            <element name="reason" type="eppcom:reasonType"
 298                     minOccurs="0"/>
 299        </sequence>
 300    </complexType>
 301
 302    <complexType name="checkIDType">
 303        <simpleContent>
 304            <extension base="eppcom:clIDType">
 305                <attribute name="avail" type="boolean"
 306                           use="required"/>
 307            </extension>
 308        </simpleContent>
 309    </complexType>
 310    <!--
 311    <create> response elements.
 312    -->
 313    <complexType name="creDataType">
 314        <sequence>
 315            <element name="id" type="eppcom:clIDType"/>
 316            <element name="crDate" type="dateTime"/>
 317        </sequence>
 318    </complexType>
 319
 320    <!--
 321    <info> response elements.
 322    -->
 323    <complexType name="infDataType">
 324        <sequence>
 325            <element name="id" type="eppcom:clIDType"/>
 326            <element name="roid" type="eppcom:roidType"/>
 327            <element name="status" type="contact:statusType" maxOccurs="7">
 328                    <annotation><documentation>Always set to serverTransferProhibited and serverDeleteProhibited see .is contact extension</documentation></annotation></element>
 329            <element name="postalInfo" type="contact:postalInfoType"
 330                     maxOccurs="2"/>
 331            <element name="voice" type="contact:e164Type"
 332                     minOccurs="0"/>
 333            <element name="fax" type="contact:e164Type" minOccurs="0">
 334                         <annotation><documentation>NOT USED</documentation></annotation></element>
 335            <element name="email" type="eppcom:minTokenType"/>
 336            <element name="clID" type="eppcom:clIDType">
 337                <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>
 338            <element name="crID" type="eppcom:clIDType"/>
 339            <element name="crDate" type="dateTime"/>
 340            <element name="upID" type="eppcom:clIDType"
 341                     minOccurs="0"/>
 342            <element name="upDate" type="dateTime"
 343                     minOccurs="0"/>
 344            <element name="trDate" type="dateTime" minOccurs="0">
 345                <annotation><documentation>Since ISNIC is not registry-registrar there are no contact transfers.</documentation></annotation></element>
 346            <element name="authInfo" type="contact:authInfoType"
 347                     minOccurs="0"/>
 348            <element name="disclose" type="contact:discloseType"
 349                     minOccurs="0"/>
 350        </sequence>
 351    </complexType>
 352
 353    <!--
 354    Status is a combination of attributes and an optional human-readable
 355    message that may be expressed in languages other than English.
 356    -->
 357    <complexType name="statusType">
 358        <simpleContent>
 359            <extension base="normalizedString">
 360                <attribute name="s" type="contact:statusValueType"
 361                           use="required"/>
 362                <attribute name="lang" type="language"
 363                           default="en"/>
 364            </extension>
 365        </simpleContent>
 366    </complexType>
 367
 368    <simpleType name="statusValueType">
 369        <annotation><documentation>Not really used see contact .is extension.  Is always fixed to serverDeleteProhibited and serverTransferProhibited.</documentation></annotation>
 370        <restriction base="token">
 371            <enumeration value="clientDeleteProhibited"/>
 372            <enumeration value="clientTransferProhibited"/>
 373            <enumeration value="clientUpdateProhibited"/>
 374            <enumeration value="linked"/>
 375            <enumeration value="ok"/>
 376            <enumeration value="pendingCreate"/>
 377            <enumeration value="pendingDelete"/>
 378            <enumeration value="pendingTransfer"/>
 379            <enumeration value="pendingUpdate"/>
 380            <enumeration value="serverDeleteProhibited"/>
 381            <enumeration value="serverTransferProhibited"/>
 382            <enumeration value="serverUpdateProhibited"/>
 383        </restriction>
 384    </simpleType>
 385
 386    <!--
 387    Pending action notification response elements.
 388    -->
 389    <complexType name="panDataType">
 390        <sequence>
 391            <element name="id" type="contact:paCLIDType"/>
 392            <element name="paTRID" type="epp:trIDType"/>
 393            <element name="paDate" type="dateTime"/>
 394        </sequence>
 395    </complexType>
 396
 397    <complexType name="paCLIDType">
 398        <simpleContent>
 399            <extension base="eppcom:clIDType">
 400                <attribute name="paResult" type="boolean"
 401                           use="required"/>
 402            </extension>
 403        </simpleContent>
 404    </complexType>
 405
 406    <!--
 407    <transfer> response elements.
 408    -->
 409    <complexType name="trnDataType">
 410        <sequence>
 411            <element name="id" type="eppcom:clIDType"/>
 412            <element name="trStatus" type="eppcom:trStatusType"/>
 413            <element name="reID" type="eppcom:clIDType"/>
 414            <element name="reDate" type="dateTime"/>
 415            <element name="acID" type="eppcom:clIDType"/>
 416            <element name="acDate" type="dateTime"/>
 417        </sequence>
 418    </complexType>
 419
 420    <!--
 421    End of schema.
 422    -->
 423</schema>
 424