No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

xep-0164.xml 7.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <!DOCTYPE xep SYSTEM 'xep.dtd' [
  3. <!ENTITY % ents SYSTEM 'xep.ent'>
  4. %ents;
  5. ]>
  6. <?xml-stylesheet type='text/xsl' href='xep.xsl'?>
  7. <xep>
  8. <header>
  9. <title>vCard Filtering</title>
  10. <abstract>This document specifies a mechanism for requesting specific sections of a vCard.</abstract>
  11. &LEGALNOTICE;
  12. <number>0164</number>
  13. <status>Deferred</status>
  14. <type>Standards Track</type>
  15. <sig>Standards</sig>
  16. <approver>Council</approver>
  17. <dependencies>
  18. <spec>XMPP Core</spec>
  19. <spec>XEP-0054</spec>
  20. </dependencies>
  21. <supersedes/>
  22. <supersededby/>
  23. <shortname>vcard-temp-filter</shortname>
  24. <author>
  25. <firstname>Daniel</firstname>
  26. <surname>Henninger</surname>
  27. <email>jadestorm@nc.rr.com</email>
  28. <jid>daniel@jabber.vorpalcloud.org</jid>
  29. </author>
  30. <revision>
  31. <version>0.1</version>
  32. <date>2005-11-16</date>
  33. <initials>psa</initials>
  34. <remark>Initial version.</remark>
  35. </revision>
  36. <revision>
  37. <version>0.0.2</version>
  38. <date>2005-11-05</date>
  39. <initials>dah</initials>
  40. <remark>Switched to filter out, instead of filter in.</remark>
  41. </revision>
  42. <revision>
  43. <version>0.0.1</version>
  44. <date>2005-10-22</date>
  45. <initials>dah</initials>
  46. <remark>First draft.</remark>
  47. </revision>
  48. </header>
  49. <section1 topic='Introduction' anchor='intro'>
  50. <p>Because XML vCards (see &xep0054;) are now actively used for storing avatars (see &xep0153;), the ability to retrieve only portions of a vCard has become desirable. This protocol can eliminate unnecessary bandwidth usage when larger elements of a vCard are not needed.</p>
  51. </section1>
  52. <section1 topic='Requirements' anchor='reqs'>
  53. <p>Any entity supporting this extension MUST be prepared to accept more fields than were requested, in case the target does not support this extension. A compliant target SHOULD exclude any fields listed in the filter element. In the event that the filter element does not exist or is empty, the target MUST return the entire vCard as it would without this extension.</p>
  54. </section1>
  55. <section1 topic='Use Cases' anchor='usecases'>
  56. <section2 topic="Retrieving Another User's vCard Without The JABBERID Element">
  57. <p>To illustrate the functionality of this protocol, we will first request a standard vCard. As shown in <cite>XEP-0054</cite>, a user may view another user's vCard by sending an IQ of type "get" to the other user's bare JID. A compliant server MUST return the vCard to the requestor and not forward the IQ to the requestee's connected resource.</p>
  58. <example caption="Requesting Another User's vCard"><![CDATA[
  59. <iq to='jer@jabber.org'
  60. from='stpeter@jabber.org/home'
  61. type='get'
  62. id='v1'>
  63. <vCard xmlns='vcard-temp'/>
  64. </iq>
  65. ]]></example>
  66. <p>The server should then return the other user's vCard to the requestor:</p>
  67. <example caption="Receiving Another User's vCard"><![CDATA[
  68. <iq from='jer@jabber.org'
  69. to='stpeter@jabber.org/home'
  70. type='result'
  71. id='v1'>
  72. <vCard xmlns='vcard-temp'>
  73. <FN>Jeremie Miller</FN>
  74. <N>
  75. <GIVEN>Jeremie</GIVEN>
  76. <FAMILY>Miller</FAMILY>
  77. <MIDDLE/>
  78. </N>
  79. <NICKNAME>jer</NICKNAME>
  80. <EMAIL><INTERNET/><PREF/><USERID>jeremie@jabber.org</USERID></EMAIL>
  81. <JABBERID>jer@jabber.org</JABBERID>
  82. </vCard>
  83. </iq>
  84. ]]></example>
  85. <p>A user may request that specific portions of another user's vCard be excluded by including the requested field(s) inside a filter element qualified by the 'vcard-temp-filter' namespace, inside the vCard element.</p>
  86. <example caption="Requesting Another User's vCard Without the JABBERID Element"><![CDATA[
  87. <iq to='jer@jabber.org'
  88. from='stpeter@jabber.org/home'
  89. type='get'
  90. id='v2'>
  91. <vCard xmlns='vcard-temp'>
  92. <filter xmlns='vcard-temp-filter'>
  93. <JABBERID/>
  94. </filter>
  95. </vCard>
  96. </iq>
  97. ]]></example>
  98. <p>The server should then return all available fields from the other user's vCard except for those listed in the filter stanza:</p>
  99. <example caption="Receiving Fields From Another User's vCard"><![CDATA[
  100. <iq from='jer@jabber.org'
  101. to='stpeter@jabber.org/home'
  102. type='result'
  103. id='v2'>
  104. <vCard xmlns='vcard-temp'>
  105. <FN>JeremieMiller</FN>
  106. <N>
  107. <GIVEN>Jeremie</GIVEN>
  108. <FAMILY>Miller</FAMILY>
  109. <MIDDLE/>
  110. </N>
  111. <NICKNAME>jer</NICKNAME>
  112. <EMAIL><INTERNET/><PREF/><USERID>jeremie@jabber.org</USERID></EMAIL>
  113. </vCard>
  114. </iq>
  115. ]]></example>
  116. </section2>
  117. </section1>
  118. <section1 topic='Security Considerations' anchor='security'>
  119. <p>This document introduces no new security concerns beyond those already involved in implementation and deployment of the 'vcard-temp' protocol.</p>
  120. </section1>
  121. <section1 topic='IANA Considerations' anchor='iana'>
  122. <p>This document requires no interaction with &IANA;.</p>
  123. </section1>
  124. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  125. <p>The &REGISTRAR; shall add 'vcard-temp-filter' to its registry of official namespaces.</p>
  126. </section1>
  127. <section1 topic='XML Schema' anchor='schema'>
  128. <p>The schema for the 'vcard-temp-filter' namespace re-uses the element names from the DTD described in <cite>XEP-0054</cite>.</p>
  129. <code><![CDATA[
  130. <?xml version='1.0' encoding='UTF-8'?>
  131. <xs:schema
  132. xmlns:xs='http://www.w3.org/2001/XMLSchema'
  133. targetNamespace='vcard-temp-filter'
  134. xmlns='vcard-temp-filter'
  135. elementFormDefault='qualified'>
  136. <xs:element name='filter'>
  137. <xs:complexType>
  138. <xs:sequence>
  139. <xs:element name='VERSION' type='empty'/>
  140. <xs:element name='FN' type='empty'/>
  141. <xs:element name='N' type='empty'/>
  142. <xs:element name='NICKNAME' type='empty'/>
  143. <xs:element name='PHOTO' type='empty'/>
  144. <xs:element name='BDAY' type='empty'/>
  145. <xs:element name='ADR' type='empty'/>
  146. <xs:element name='LABEL' type='empty'/>
  147. <xs:element name='TEL' type='empty'/>
  148. <xs:element name='EMAIL' type='empty'/>
  149. <xs:element name='JABBERID' type='empty'/>
  150. <xs:element name='MAILER' type='empty'/>
  151. <xs:element name='TZ' type='empty'/>
  152. <xs:element name='GEO' type='empty'/>
  153. <xs:element name='TITLE' type='empty'/>
  154. <xs:element name='ROLE' type='empty'/>
  155. <xs:element name='LOGO' type='empty'/>
  156. <xs:element name='AGENT' type='empty'/>
  157. <xs:element name='ORG' type='empty'/>
  158. <xs:element name='CATEGORIES' type='empty'/>
  159. <xs:element name='NOTE' type='empty'/>
  160. <xs:element name='PRODID' type='empty'/>
  161. <xs:element name='REV' type='empty'/>
  162. <xs:element name='SORT-STRING' type='empty'/>
  163. <xs:element name='SOUND' type='empty'/>
  164. <xs:element name='UID' type='empty'/>
  165. <xs:element name='URL' type='empty'/>
  166. <xs:element name='CLASS' type='empty'/>
  167. <xs:element name='KEY' type='empty'/>
  168. <xs:element name='DESC' type='empty'/>
  169. </xs:sequence>
  170. </xs:complexType>
  171. </xs:element>
  172. <xs:simpleType name='empty'>
  173. <xs:restriction base='xs:string'>
  174. <xs:enumeration value=''/>
  175. </xs:restriction>
  176. </xs:simpleType>
  177. </xs:schema>
  178. ]]></code>
  179. </section1>
  180. </xep>