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

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

  <annotation>
    <documentation>
      Registry Data Escrow NNDN provisioning schema
    </documentation>
  </annotation>

  <element name="abstractNNDN" type="rdeNNDN:abstractContentType"
    substitutionGroup="rde:content" abstract="true"/>
  <element name="NNDN" substitutionGroup="rdeNNDN:abstractNNDN"/>
  <element name="delete" type="rdeNNDN:deleteType"
    substitutionGroup="rde:delete"/>

  <!-- Content Type -->
  <complexType name="abstractContentType">
    <complexContent>
      <extension base="rde:contentType">
        <sequence>
          <element name="aName"
            type="eppcom:labelType"/>
          <element name="uName"
            type="eppcom:labelType" minOccurs="0"/>
          <element name="idnTableId"
            type="rdeIDN:idType" minOccurs="0"/>
          <element name="originalName"
            type="eppcom:labelType" minOccurs="0"/>
          <element name="nameState"
            type="rdeNNDN:nameState"/>
          <element name="crDate"
            type="dateTime"/>
        </sequence>
      </extension>
    </complexContent>
  </complexType>

  <simpleType name="nameStateValue">
    <restriction base="token">
      <enumeration value="withheld" />
      <enumeration value="blocked" />
      <enumeration value="mirrored" />
    </restriction>
  </simpleType>

  <complexType name="nameState">
    <simpleContent>
      <extension base="rdeNNDN:nameStateValue">
        <attribute name="mirroringNS"
          type="boolean" default="true"/>
      </extension>
    </simpleContent>
  </complexType>

  <!-- Delete Type -->
  <complexType name="deleteType">
    <complexContent>
      <extension base="rde:deleteType">
        <sequence>
          <element name="aName"
            type="eppcom:labelType" minOccurs="0"
            maxOccurs="unbounded"/>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
</schema>
