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:domain-1.0"
  36        xmlns:domain="urn:ietf:params:xml:ns:domain-1.0"
  37        xmlns:host="urn:ietf:params:xml:ns:host-1.0"
  38        xmlns:epp="urn:ietf:params:xml:ns:epp-1.0"
  39        xmlns:eppcom="urn:ietf:params:xml:ns:eppcom-1.0"
  40        xmlns="http://www.w3.org/2001/XMLSchema"
  41        elementFormDefault="qualified">
  42
  43    <!--
  44    Import common element types.
  45    -->
  46    <import namespace="urn:ietf:params:xml:ns:eppcom-1.0"
  47            schemaLocation="eppcom-1.0.xsd"/>
  48    <import namespace="urn:ietf:params:xml:ns:epp-1.0"
  49            schemaLocation="epp-1.0.xsd"/>
  50    <import namespace="urn:ietf:params:xml:ns:host-1.0"
  51            schemaLocation="host-1.0.xsd"/>
  52
  53    <annotation>
  54        <documentation>
  55            Extensible Provisioning Protocol v1.0
  56            domain provisioning schema.
  57        </documentation>
  58    </annotation>
  59
  60    <!--
  61    Child elements found in EPP commands.
  62    -->
  63    <element name="check" type="domain:mNameType"/>
  64    <element name="create" type="domain:createType"/>
  65    <element name="delete" type="domain:sNameType"/>
  66    <element name="info" type="domain:infoType"/>
  67    <element name="renew" type="domain:renewType"/>
  68    <element name="transfer" type="domain:transferType"/>
  69    <element name="update" type="domain:updateType"/>
  70
  71    <!--
  72    Child elements of the <create> command.
  73    -->
  74    <complexType name="createType">
  75        <sequence>
  76            <element name="name" type="eppcom:labelType"/>
  77            <element name="period" type="domain:periodType"
  78                     minOccurs="0"/>
  79            <element name="ns" type="domain:nsType"
  80                     minOccurs="0"/>
  81            <element name="registrant" type="eppcom:clIDType"
  82                     minOccurs="0"/>
  83            <element name="contact" type="domain:contactType"
  84                     minOccurs="0" maxOccurs="unbounded"/>
  85            <element name="authInfo" type="domain:authInfoType"/>
  86        </sequence>
  87    </complexType>
  88
  89    <complexType name="periodType">
  90        <simpleContent>
  91            <extension base="domain:pLimitType">
  92                <attribute name="unit" type="domain:pUnitType"
  93                           use="required"/>
  94            </extension>
  95        </simpleContent>
  96    </complexType>
  97
  98    <simpleType name="pLimitType">
  99        <restriction base="unsignedShort">
 100            <minInclusive value="1"/>
 101            <maxInclusive value="99"/>
 102        </restriction>
 103    </simpleType>
 104
 105    <simpleType name="pUnitType">
 106        <restriction base="token">
 107            <enumeration value="y"/>
 108            <enumeration value="m"/>
 109        </restriction>
 110    </simpleType>
 111
 112    <complexType name="nsType">
 113        <choice>
 114            <element name="hostObj" type="eppcom:labelType"
 115                     maxOccurs="unbounded"/>
 116            <element name="hostAttr" type="domain:hostAttrType"
 117                     maxOccurs="unbounded"/>
 118        </choice>
 119    </complexType>
 120    <!--
 121    Name servers are either host objects or attributes.
 122    -->
 123
 124    <complexType name="hostAttrType">
 125        <sequence>
 126            <element name="hostName" type="eppcom:labelType"/>
 127            <element name="hostAddr" type="host:addrType"
 128                     minOccurs="0" maxOccurs="unbounded"/>
 129        </sequence>
 130    </complexType>
 131    <!--
 132    If attributes, addresses are optional and follow the
 133    structure defined in the host mapping.
 134    -->
 135
 136    <complexType name="contactType">
 137        <simpleContent>
 138            <extension base="eppcom:clIDType">
 139                <attribute name="type" type="domain:contactAttrType"/>
 140            </extension>
 141        </simpleContent>
 142    </complexType>
 143
 144    <simpleType name="contactAttrType">
 145        <restriction base="token">
 146            <enumeration value="admin"/>
 147            <enumeration value="billing"/>
 148            <enumeration value="tech"/>
 149        </restriction>
 150    </simpleType>
 151
 152    <complexType name="authInfoType">
 153        <choice>
 154            <element name="pw" type="eppcom:pwAuthInfoType"/>
 155            <element name="ext" type="eppcom:extAuthInfoType"/>
 156        </choice>
 157    </complexType>
 158
 159    <!--
 160    Child element of commands that require a single name.
 161    -->
 162    <complexType name="sNameType">
 163        <sequence>
 164            <element name="name" type="eppcom:labelType"/>
 165        </sequence>
 166    </complexType>
 167    <!--
 168    Child element of commands that accept multiple names.
 169    -->
 170    <complexType name="mNameType">
 171        <sequence>
 172            <element name="name" type="eppcom:labelType"
 173                     maxOccurs="unbounded"/>
 174        </sequence>
 175    </complexType>
 176
 177    <!--
 178    Child elements of the <info> command.
 179    -->
 180    <complexType name="infoType">
 181        <sequence>
 182            <element name="name" type="domain:infoNameType"/>
 183            <element name="authInfo" type="domain:authInfoType"
 184                     minOccurs="0"/>
 185        </sequence>
 186    </complexType>
 187
 188    <complexType name="infoNameType">
 189        <simpleContent>
 190            <extension base = "eppcom:labelType">
 191                <attribute name="hosts" type="domain:hostsType"
 192                           default="all"/>
 193            </extension>
 194        </simpleContent>
 195    </complexType>
 196
 197    <simpleType name="hostsType">
 198        <restriction base="token">
 199            <enumeration value="all"/>
 200            <enumeration value="del"/>
 201            <enumeration value="none"/>
 202            <enumeration value="sub"/>
 203        </restriction>
 204    </simpleType>
 205
 206    <!--
 207    Child elements of the <renew> command.
 208    -->
 209    <complexType name="renewType">
 210        <sequence>
 211            <element name="name" type="eppcom:labelType"/>
 212            <element name="curExpDate" type="date"/>
 213            <element name="period" type="domain:periodType"
 214                     minOccurs="0"/>
 215        </sequence>
 216    </complexType>
 217
 218    <!--
 219    Child elements of the <transfer> command.
 220    -->
 221    <complexType name="transferType">
 222        <sequence>
 223            <element name="name" type="eppcom:labelType"/>
 224            <element name="period" type="domain:periodType"
 225                     minOccurs="0"/>
 226            <element name="authInfo" type="domain:authInfoType"
 227                     minOccurs="0"/>
 228        </sequence>
 229    </complexType>
 230
 231    <!--
 232    Child elements of the <update> command.
 233    -->
 234    <complexType name="updateType">
 235        <sequence>
 236            <element name="name" type="eppcom:labelType"/>
 237            <element name="add" type="domain:addRemType"
 238                     minOccurs="0"/>
 239            <element name="rem" type="domain:addRemType"
 240                     minOccurs="0"/>
 241            <element name="chg" type="domain:chgType"
 242                     minOccurs="0"/>
 243        </sequence>
 244    </complexType>
 245
 246    <!--
 247    Data elements that can be added or removed.
 248    -->
 249    <complexType name="addRemType">
 250        <sequence>
 251            <element name="ns" type="domain:nsType"
 252                     minOccurs="0"/>
 253            <element name="contact" type="domain:contactType"
 254                     minOccurs="0" maxOccurs="unbounded"/>
 255            <element name="status" type="domain:statusType"
 256                     minOccurs="0" maxOccurs="11"/>
 257        </sequence>
 258    </complexType>
 259
 260    <!--
 261    Data elements that can be changed.
 262    -->
 263
 264    <complexType name="chgType">
 265        <sequence>
 266            <element name="registrant" type="domain:clIDChgType"
 267                     minOccurs="0"/>
 268            <element name="authInfo" type="domain:authInfoChgType"
 269                     minOccurs="0"/>
 270        </sequence>
 271    </complexType>
 272
 273    <!--
 274    Allow the registrant value to be nullified by changing the
 275    minLength restriction to "0".
 276    -->
 277    <simpleType name="clIDChgType">
 278        <restriction base="token">
 279            <minLength value="0"/>
 280            <maxLength value="16"/>
 281        </restriction>
 282    </simpleType>
 283
 284    <!--
 285    Allow the authInfo value to be nullified by including an
 286    empty element within the choice.
 287    -->
 288    <complexType name="authInfoChgType">
 289        <choice>
 290            <element name="pw" type="eppcom:pwAuthInfoType"/>
 291            <element name="ext" type="eppcom:extAuthInfoType"/>
 292            <element name="null"/>
 293        </choice>
 294    </complexType>
 295
 296    <!--
 297    Child response elements.
 298    -->
 299    <element name="chkData" type="domain:chkDataType"/>
 300    <element name="creData" type="domain:creDataType"/>
 301    <element name="infData" type="domain:infDataType"/>
 302    <element name="panData" type="domain:panDataType"/>
 303    <element name="renData" type="domain:renDataType"/>
 304    <element name="trnData" type="domain:trnDataType"/>
 305
 306    <!--
 307    <check> response elements.
 308    -->
 309    <complexType name="chkDataType">
 310        <sequence>
 311            <element name="cd" type="domain:checkType"
 312                     maxOccurs="unbounded"/>
 313        </sequence>
 314    </complexType>
 315
 316    <complexType name="checkType">
 317        <sequence>
 318            <element name="name" type="domain:checkNameType"/>
 319            <element name="reason" type="eppcom:reasonType"
 320                     minOccurs="0"/>
 321        </sequence>
 322    </complexType>
 323
 324    <complexType name="checkNameType">
 325        <simpleContent>
 326            <extension base="eppcom:labelType">
 327                <attribute name="avail" type="boolean"
 328                           use="required"/>
 329            </extension>
 330        </simpleContent>
 331    </complexType>
 332
 333    <!--
 334    <create> response elements.
 335    -->
 336    <complexType name="creDataType">
 337        <sequence>
 338            <element name="name" type="eppcom:labelType"/>
 339            <element name="crDate" type="dateTime"/>
 340            <element name="exDate" type="dateTime"
 341                     minOccurs="0"/>
 342        </sequence>
 343    </complexType>
 344
 345    <!--
 346    <info> response elements.
 347    -->
 348    <complexType name="infDataType">
 349        <sequence>
 350            <element name="name" type="eppcom:labelType"/>
 351            <element name="roid" type="eppcom:roidType"/>
 352            <element name="status" type="domain:statusType"
 353                     minOccurs="0" maxOccurs="11"/>
 354            <element name="registrant" type="eppcom:clIDType"
 355                     minOccurs="0"/>
 356            <element name="contact" type="domain:contactType"
 357                     minOccurs="0" maxOccurs="unbounded"/>
 358            <element name="ns" type="domain:nsType"
 359                     minOccurs="0"/>
 360            <element name="host" type="eppcom:labelType" minOccurs="0" maxOccurs="unbounded"><annotation><documentation>NOT USED, all nameservers must be registered. Only "ns" element is used</documentation></annotation></element>
 361            <element name="clID" type="eppcom:clIDType"><annotation><documentation>NOT USED. Set to admin contact</documentation></annotation></element>
 362            <element name="crID" type="eppcom:clIDType"
 363                     minOccurs="0"/>
 364            <element name="crDate" type="dateTime"
 365                     minOccurs="0"/>
 366            <element name="upID" type="eppcom:clIDType"
 367                     minOccurs="0"/>
 368            <element name="upDate" type="dateTime"
 369                     minOccurs="0"/>
 370            <element name="exDate" type="dateTime"
 371                     minOccurs="0"/>
 372            <element name="trDate" type="dateTime" minOccurs="0"><annotation><documentation>NOT USED</documentation></annotation></element>
 373            <element name="authInfo" type="domain:authInfoType"
 374                     minOccurs="0"/>
 375        </sequence>
 376    </complexType>
 377
 378    <!--
 379    Status is a combination of attributes and an optional human-readable
 380    message that may be expressed in languages other than English.
 381    -->
 382    <complexType name="statusType">
 383        <simpleContent>
 384            <extension base="normalizedString">
 385                <attribute name="s" type="domain:statusValueType"
 386                           use="required"/>
 387                <attribute name="lang" type="language"
 388                           default="en"/>
 389            </extension>
 390        </simpleContent>
 391    </complexType>
 392
 393    <simpleType name="statusValueType">
 394        <restriction base="token">
 395            <enumeration value="clientDeleteProhibited"/>
 396            <enumeration value="clientHold"><annotation><documentation>DNSP (ISP) requested not to service domain</documentation></annotation></enumeration>
 397            <enumeration value="clientRenewProhibited"/>
 398            <enumeration value="clientTransferProhibited"/>
 399            <enumeration value="clientUpdateProhibited"/>
 400            <enumeration value="inactive"/>
 401            <enumeration value="ok"><annotation><documentation>No other status set, domain is delegated</documentation></annotation></enumeration>
 402            <enumeration value="pendingCreate"/>
 403            <enumeration value="pendingDelete"><annotation><documentation>Delete process ongoing</documentation></annotation></enumeration>
 404            <enumeration value="pendingRenew"/>
 405            <enumeration value="pendingTransfer"/>
 406            <enumeration value="pendingUpdate"><annotation><documentation>Name server update or registrant transfer ongoing</documentation></annotation></enumeration>
 407            <enumeration value="serverDeleteProhibited"><annotation><documentation>Dispute lock has been set</documentation></annotation></enumeration>
 408            <enumeration value="serverHold"><annotation><documentation>Payment missing, technical erros or registration information insufficient</documentation></annotation></enumeration>
 409            <enumeration value="serverRenewProhibited"/>
 410            <enumeration value="serverTransferProhibited"/>
 411            <enumeration value="serverUpdateProhibited"/>
 412        </restriction>
 413    </simpleType>
 414
 415    <!--
 416    Pending action notification response elements.
 417    -->
 418    <complexType name="panDataType">
 419        <sequence>
 420            <element name="name" type="domain:paNameType"/>
 421            <element name="paTRID" type="epp:trIDType"/>
 422            <element name="paDate" type="dateTime"/>
 423        </sequence>
 424    </complexType>
 425
 426    <complexType name="paNameType">
 427        <simpleContent>
 428            <extension base="eppcom:labelType">
 429                <attribute name="paResult" type="boolean"
 430                           use="required"/>
 431            </extension>
 432        </simpleContent>
 433    </complexType>
 434
 435    <!--
 436    <renew> response elements.
 437    -->
 438    <complexType name="renDataType">
 439        <sequence>
 440            <element name="name" type="eppcom:labelType"/>
 441            <element name="exDate" type="dateTime"
 442                     minOccurs="0"/>
 443        </sequence>
 444    </complexType>
 445
 446    <!--
 447    <transfer> response elements.
 448    -->
 449    <complexType name="trnDataType">
 450        <sequence>
 451            <element name="name" type="eppcom:labelType"/>
 452            <element name="trStatus" type="eppcom:trStatusType"/>
 453            <element name="reID" type="eppcom:clIDType"/>
 454            <element name="reDate" type="dateTime"/>
 455            <element name="acID" type="eppcom:clIDType"/>
 456            <element name="acDate" type="dateTime"/>
 457            <element name="exDate" type="dateTime"
 458                     minOccurs="0"/>
 459        </sequence>
 460    </complexType>
 461
 462    <!--
 463    End of schema.
 464    -->
 465</schema>
 466
 467
 468