pidf.xsd 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Extracted from RFC 3863
  4. http://www.rfc-editor.org/rfc/rfc3863.txt
  5. -->
  6. <xs:schema targetNamespace="urn:ietf:params:xml:ns:pidf"
  7. xmlns:tns="urn:ietf:params:xml:ns:pidf"
  8. xmlns:xs="http://www.w3.org/2001/XMLSchema"
  9. elementFormDefault="qualified"
  10. attributeFormDefault="unqualified">
  11. <!-- This import brings in the XML language attribute xml:lang-->
  12. <xs:import namespace="http://www.w3.org/XML/1998/namespace"
  13. schemaLocation="http://www.w3.org/2001/xml.xsd"/>
  14. <xs:element name="presence" type="tns:presence"/>
  15. <xs:complexType name="presence">
  16. <xs:sequence>
  17. <xs:element name="tuple" type="tns:tuple" minOccurs="0"
  18. maxOccurs="unbounded"/>
  19. <xs:element name="note" type="tns:note" minOccurs="0"
  20. maxOccurs="unbounded"/>
  21. <xs:any namespace="##other" processContents="lax" minOccurs="0"
  22. maxOccurs="unbounded"/>
  23. </xs:sequence>
  24. <xs:attribute name="entity" type="xs:anyURI" use="required"/>
  25. </xs:complexType>
  26. <xs:complexType name="tuple">
  27. <xs:sequence>
  28. <xs:element name="status" type="tns:status"/>
  29. <xs:any namespace="##other" processContents="lax" minOccurs="0"
  30. maxOccurs="unbounded"/>
  31. <xs:element name="contact" type="tns:contact" minOccurs="0"/>
  32. <xs:element name="note" type="tns:note" minOccurs="0"
  33. maxOccurs="unbounded"/>
  34. <xs:element name="timestamp" type="xs:dateTime" minOccurs="0"/>
  35. </xs:sequence>
  36. <xs:attribute name="id" type="xs:ID" use="required"/>
  37. </xs:complexType>
  38. <xs:complexType name="status">
  39. <xs:sequence>
  40. <xs:element name="basic" type="tns:basic" minOccurs="0"/>
  41. <xs:any namespace="##other" processContents="lax" minOccurs="0"
  42. maxOccurs="unbounded"/>
  43. </xs:sequence>
  44. </xs:complexType>
  45. <xs:simpleType name="basic">
  46. <xs:restriction base="xs:string">
  47. <xs:enumeration value="open"/>
  48. <xs:enumeration value="closed"/>
  49. </xs:restriction>
  50. </xs:simpleType>
  51. <xs:complexType name="contact">
  52. <xs:simpleContent>
  53. <xs:extension base="xs:anyURI">
  54. <xs:attribute name="priority" type="tns:qvalue"/>
  55. </xs:extension>
  56. </xs:simpleContent>
  57. </xs:complexType>
  58. <xs:complexType name="note">
  59. <xs:simpleContent>
  60. <xs:extension base="xs:string">
  61. <xs:attribute ref="xml:lang"/>
  62. </xs:extension>
  63. </xs:simpleContent>
  64. </xs:complexType>
  65. <xs:simpleType name="qvalue">
  66. <xs:restriction base="xs:decimal">
  67. <xs:pattern value="0(.[0-9]{0,3})?"/>
  68. <xs:pattern value="1(.0{0,3})?"/>
  69. </xs:restriction>
  70. </xs:simpleType>
  71. <!-- Global Attributes -->
  72. <xs:attribute name="mustUnderstand" type="xs:boolean" default="0">
  73. <xs:annotation>
  74. <xs:documentation>
  75. This attribute may be used on any element within an optional
  76. PIDF extension to indicate that the corresponding element must
  77. be understood by the PIDF processor if the enclosing optional
  78. element is to be handled.
  79. </xs:documentation>
  80. </xs:annotation>
  81. </xs:attribute>
  82. </xs:schema>