<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://services.mobile.de/schema/resource" xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:ref="http://services.mobile.de/schema/resource" elementFormDefault="qualified">


  <xs:complexType name="LocalizedDescription" mixed="true" >
    <xs:attribute name="xml-lang" type="xs:language" />
  </xs:complexType>
    
  <!-- Type definition for reference date, which are able to request as a REST service. -->
  <xs:complexType name="resourceDataType">

      <xs:annotation>
          <xs:documentation>
              Represent a resource. A resource can be reference data or business entities.
          </xs:documentation>
      </xs:annotation>
      <xs:sequence>
          <xs:element name="local-description" type="ref:LocalizedDescription" maxOccurs="1" minOccurs="0" />
      </xs:sequence>
      <xs:attribute name="key" use="optional" type="xs:token">
          <xs:annotation>
              <xs:documentation>
                  The key identifies the resource on the resource path. The key is the leaf of url of this resource.
              </xs:documentation>
          </xs:annotation>
      </xs:attribute>
      <xs:attribute name="url" use="optional" type="xs:anyURI">
          <xs:annotation>
              <xs:documentation>The url points to the resource.</xs:documentation>
          </xs:annotation>
      </xs:attribute>
      <xs:attribute name="deprecated" use="optional" type="xs:boolean">
          <xs:annotation>
              <xs:documentation>This attribute marks reference data as deprecated.</xs:documentation>
          </xs:annotation>
      </xs:attribute>
  </xs:complexType>

  <xs:complexType name="resourceRef">
      <xs:attribute name="key" use="required" type="xs:token" />
  </xs:complexType>
  
</xs:schema>
