\section{XML Schema Definitions}
\label{sec:schema}

\begin{verbatim}
<?xml version="1.0" encoding="UTF-8"?>
   <xs:schema targetNamespace="urn:ietf:params:xml:ns:pidf:status"
      xmlns:tns="urn:ietf:params:xml:ns:pidf:status:rpid"
      xmlns:pidf="urn:ietf:params:xml:ns:cpim-pidf"
      xmlns:xs="http://www.w3.org/2001/XMLSchema"
      elementFormDefault="qualified"
      attributeFormDefault="unqualified">

  <!-- This import brings in the XML language attribute xml:lang-->
      <xs:import namespace="http://www.w3.org/XML/1998/namespace"
      schemaLocation="http://www.w3.org/2001/xml.xsd"/>

  <redefine
    schemaLocation="urn:ietf:params:xml:ns:cpim-pidf">

    <!-- redefinition of tuple -->
    <complexType name="tuple">
      <complexContent>
        <extension base="pidf:tuple">
          <xsd:attribute name="class" type="xsd:token"/>
        </extension>
      </complexContent>
    </complexType>
  </redefine>

          <xsd:attribute name="from" type="xsd:token"/>

  <xs:element name="placetype" type="xs:token"/>
  <xs:element name="privacy" type="tns:privacy"/>
  <xs:element name="activity" type="xs:token"/>
  <xs:element name="relationship" type="xs:token"/>
  <xs:element name="idle" type="xs:dateTime">
  <xs:element name="icon" type="xs:anyURI">
  <xs:element name="card" type="xs:anyURI">
  <xs:element name="info" type="xs:anyURI">

  <xs:element name="timed-status" type="tns:timed-status">

  <xs:simpleType name="privacy">
    <xs:restriction base="xs:string">
       <xs:enumeration value="private"/>
       <xs:enumeration value="public"/>
       <xs:enumeration value="quiet"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="fromuntil">
    <xs:simpleContent>
      <xs:extension base="xs:dateTime">
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:complexType name="timed-status">
    <xs:attribute name="from" type="tns:fromuntil">
    <xs:attribute name="until" type="tns:fromuntil">
    <xs:sequence>
      <xs:element name="basic" type="pidf:basic" minOccurs="0"/>
      <xs:element name="note" type="pidf:note">
      <xs:any namespace="##other" processContents="lax" minOccurs="0"
         maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>
\end{verbatim}
