The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
<schema
  xmlns="http://www.w3.org/2001/XMLSchema"
  xmlns:whois="http://rxsd.domain-registry.nl/sidn-whois-drs50"
  targetNamespace="http://rxsd.domain-registry.nl/sidn-whois-drs50"
  elementFormDefault="qualified"
  version="2010-08-25"
>

<!-- please read the document which explains this schema, available from
     http://rxsd.domain-registry.nl/
  -->

  <complexType name="addressType">
    <sequence>
      <element name="organization" type="string" minOccurs="0" />
      <element name="department"   type="string" minOccurs="0" />
      <element name="street"       type="string" maxOccurs="3" />
      <element name="postal-code"  type="string" minOccurs="0" />
      <element name="city"         type="string" minOccurs="0" />
      <element name="country-code" type="whois:countryCodeType"/>
      <element name="country"      type="whois:userTextType"   />
    </sequence>
    <attribute name="format"       type="whois:textFormatType"
       fixed="plain" />
  </complexType>

  <complexType name="anyQueryType">
    <sequence>
      <element name="lang" type="language" default="en-UK" />
      <element name="output-format"   type="whois:outputFormatType"
         default="xml" />
      <element name="usertext-format" type="whois:textFormatType"
         default="plain" />
    </sequence>
  </complexType>

  <simpleType name="businessClassType">
    <restriction base="token">
      <enumeration value="ANDERS"      />
      <enumeration value="BGG"         />
      <enumeration value="BRO"         />
      <enumeration value="BV"          />
      <enumeration value="BVI/O"       />
      <enumeration value="COOP"        />
      <enumeration value="CV"          />
      <enumeration value="EENMANSZAAK" />
      <enumeration value="EESV"        />
      <enumeration value="KERK"        />
      <enumeration value="MAATSCHAP"   />
      <enumeration value="NV"          />
      <enumeration value="OWM"         />
      <enumeration value="PERSOON"     />
      <enumeration value="REDR"        />
      <enumeration value="STICHTING"   />
      <enumeration value="VERENIGING"  />
      <enumeration value="VOF"         />
    </restriction>
  </simpleType>

  <complexType name="businessTypeType">
    <simpleContent>
      <extension base="string">
        <attribute name="class"  type="whois:businessClassType" />
        <attribute name="lang"   type="language" />
        <attribute name="format" type="whois:textFormatType"
           fixed="plain" />
      </extension>
    </simpleContent>
  </complexType>

  <complexType name="companyType">
    <sequence>
      <element name="type-of-business"
         type="whois:businessTypeType" />
      <element name="trade-register-number" type="string" />
    </sequence>
  </complexType>

  <element name="contact" type="whois:contactType" />
  
  <complexType name="contactType">
    <complexContent>
      <extension base="whois:whoisObjectType">
        <sequence>
          <element name="name"    type="string" />
          <element name="email"   type="string"
             minOccurs="0" />
          <element name="voice"   type="whois:phoneNumberType"
             minOccurs="0" />
          <element name="address" type="whois:addressType"
             minOccurs="0" />
          <element name="company" type="whois:companyType"
             minOccurs="0" />
          <element name="domicile-sidn" type="whois:userTextType"
             minOccurs="0" />
        </sequence>
        <attribute name="id"      type="whois:contactLabelType"
           use="required"  />
        <attribute name="view"    type="whois:contactViewType"
           default="no"    />
      </extension>
    </complexContent>
  </complexType>

  <complexType name="contactDetailsType">
    <complexContent>
      <extension base="whois:userTextType">
        <attribute name="restriction"
           type="whois:contactViewType" />
      </extension>
    </complexContent>
  </complexType>

  <simpleType name="contactLabelType">
    <restriction base="token">
      <pattern value="[A-Z]{3}[0-9]{6}-[A-Z0-9]{5}" />
    </restriction>
  </simpleType>

  <complexType name="contactRefType">
    <simpleContent>
      <extension base="whois:contactLabelType">
        <attribute name="role" type="whois:contactRoleType"
           use="required" />
      </extension>
    </simpleContent>
  </complexType>

  <simpleType name="contactRoleType">
    <restriction base="token">
      <enumeration value="registrant" />
      <enumeration value="admin" />
      <enumeration value="tech"  />
    </restriction>
  </simpleType>

  <simpleType name="contactViewType">
    <restriction base="token">
      <enumeration value="no"     />
      <enumeration value="all"    />
      <enumeration value="csi"    />
      <enumeration value="public" />
      <enumeration value="optout" />
    </restriction>
  </simpleType>

  <simpleType name="countryCodeType">
    <restriction base="token">
      <pattern value="[A-Z]{2}" />
    </restriction>
  </simpleType>

  <element name="domain" type="whois:domainType" />
  
  <complexType name="domainType">
    <complexContent>
      <extension base="whois:whoisObjectType">
        <sequence>
          <element ref="whois:status" />
    
          <element name="registrar"
             type="whois:registrarRefType"
             minOccurs="0" />
    
          <element name="contact"
             type="whois:contactRefType"
             minOccurs="0" maxOccurs="unbounded" />
    
          <element name="nameserver"
             type="whois:nameserverRefType"
             minOccurs="0" maxOccurs="unbounded" />
    
          <element name="contact-details"
             type="whois:contactDetailsType"
             minOccurs="0" />
          <element name="registered"  type="date"
             minOccurs="0" />
          <element name="last-change" type="date"
             minOccurs="0" />
        </sequence>
  
        <attribute name="name" type="whois:domainRefType"
           use="required" />
  
        <attribute name="view" type="whois:domainViewType"
           use="required" />
  
      </extension>
    </complexContent>
  </complexType>

  <simpleType name="domainRefType">
    <restriction base="token">
      <pattern value="[a-zA-Z0-9-]{2,63}\.nl" />
    </restriction>
  </simpleType>

  <simpleType name="domainViewType">
    <restriction base="token">
      <enumeration value="ca"     />
      <enumeration value="csi"    />
      <enumeration value="public" />
      <enumeration value="isp"    />
    </restriction>
  </simpleType>

  <element name="fault" type="whois:faultType" />
  
  <complexType name="faultType">
    <complexContent>
      <extension base="whois:whoisObjectType">
        <sequence>
          <element name="code" type="unsignedShort" />
          <element name="explain"
             type="whois:userTextType" />
        </sequence>
      </extension>
    </complexContent>
  </complexType>

  <simpleType name="hostRefType">
    <restriction base="token">
      <pattern value="[a-z0-9.-]+\.[a-z]{2,}" />
    </restriction>
  </simpleType>

  <simpleType name="ipv4AddressType">
    <restriction base="token">
      <pattern value="[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}" />
    </restriction>
  </simpleType>

  <simpleType name="ipv6AddressType">
    <restriction base="token">
      <pattern value="[0-9a-f:]{3,39}" />
    </restriction>
  </simpleType>

  <element name="is-query" type="whois:isQueryType" />
  
  <complexType name="isQueryType">
    <complexContent>
      <extension base="whois:anyQueryType">
        <sequence>
          <element name="domain" type="whois:domainRefType" />
        </sequence>
      </extension>
    </complexContent>
  </complexType>

  <element name="is-response" type="whois:isResponseType" />
  
  <complexType name="isResponseType">
    <choice>
      <element ref="whois:fault"     />
      <element ref="whois:is-status" /> 
    </choice>
  </complexType>

  <element name="is-status" type="whois:isStatusType" />
  
  <complexType name="isStatusType">
    <complexContent>
      <extension base="whois:whoisObjectType">
        <sequence>
          <element name="available" type="boolean" />
          <element name="code"    type="whois:statusCodeType"/>
          <element name="explain" type="whois:userTextType"  />
        </sequence>
        <attribute name="domain"  type="whois:domainRefType" />
      </extension>
    </complexContent>
  </complexType>

  <element name="nameserver" type="whois:nameserverType" />
  
  <complexType name="nameserverType">
    <complexContent>
      <extension base="whois:whoisObjectType">
        <choice minOccurs="1" maxOccurs="13">
          <element name="ipv4-address"
             type="whois:ipv4AddressType" />
          <element name="ipv6-address"
             type="whois:ipv6AddressType" />
        </choice>
        <attribute name="host" type="whois:hostRefType"
           use="required" />
      </extension>
    </complexContent>
  </complexType>

  <complexType name="nameserverRefType">
    <simpleContent>
      <extension base="whois:hostRefType">
        <attribute name="in-zone" type="boolean" use="required" />
      </extension>
    </simpleContent>
  </complexType>

  <simpleType name="outputFormatType">
    <restriction base="token">
      <enumeration value="plain" />
      <enumeration value="html"  />
      <enumeration value="xml"   />
    </restriction>
  </simpleType>

  <simpleType name="phoneNumberType">
    <restriction base="token">
      <pattern value="\+[0-9]{1,3}\.[0-9]{1,14}" />
    </restriction>
  </simpleType>

  <element name="registrar" type="whois:registrarType" />
  
  <complexType name="registrarType">
    <complexContent>
      <extension base="whois:whoisObjectType">
        <sequence>
          <element name="name"    type="string" />
          <element name="address" type="whois:addressType" />
        </sequence>
      </extension>
    </complexContent>
  </complexType>

  <simpleType name="registrarRefType">
    <restriction base="token" />
  </simpleType>

  <element name="signature" type="whois:signatureType" />
  
  <complexType name="signatureType">
    <sequence>
      <element name="maintainer" type="whois:userTextType" />
      <element name="copyright"  type="whois:userTextType" />
    </sequence>
  </complexType>

  <element name="status" type="whois:statusType" />
  
  <complexType name="statusType">
    <sequence>
      <element name="code"    type="whois:statusCodeType" />
      <element name="explain" type="whois:userTextType"   />
      <choice minOccurs="0">
        <element name="domain-release-date" type="date"   />
      </choice>
    </sequence>
  </complexType>

  <simpleType name="statusCodeType">
    <restriction base="token">
      <enumeration value="active"    />
      <enumeration value="requested" />
      <enumeration value="inactive"  />
      <enumeration value="withdrawn" />
      <enumeration value="quarantine"/>
      <enumeration value="excluded"  />
      <enumeration value="free"      />
    </restriction>
  </simpleType>

  <simpleType name="textFormatType">
    <restriction base="token">
      <enumeration value="plain" />
      <enumeration value="html"  />
    </restriction>
  </simpleType>

  <complexType name="userTextType">
    <simpleContent>
      <extension base="string">
  
        <attribute name="lang" type="language"
           use="required" />
  
        <attribute name="format" type="whois:textFormatType"
           default="plain" />
  
      </extension>
    </simpleContent>
  </complexType>

  <element name="whois-query" type="whois:whoisQueryType" />
  
  <complexType name="whoisQueryType">
    <complexContent>
      <extension base="whois:anyQueryType">
        <sequence>
          <element name="domain" type="whois:domainRefType" />
        </sequence>
      </extension>
    </complexContent>
  </complexType>

  <element name="whois-response" type="whois:whoisResponseType" />
  
  <complexType name="whoisResponseType">
    <choice>
      <element ref="whois:fault" />
      <sequence>
        <element ref="whois:domain" />
        <element ref="whois:registrar"
           minOccurs="0" />
        <element ref="whois:contact"
           minOccurs="0" maxOccurs="unbounded" />
        <element ref="whois:nameserver"
           minOccurs="0" maxOccurs="unbounded" />
        <element ref="whois:signature" />
      </sequence>
    </choice>
  </complexType>

  <complexType name="whoisObjectType" abstract="true">
    <sequence>
      <element name="date" type="dateTime" />
    </sequence>
  </complexType>

</schema>