forked from xsf/xeps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxep-0164.xml
184 lines (180 loc) · 6.97 KB
/
xep-0164.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE xep SYSTEM 'xep.dtd' [
<!ENTITY % ents SYSTEM 'xep.ent'>
%ents;
]>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep>
<header>
<title>vCard Filtering</title>
<abstract>This document specifies a mechanism for requesting specific sections of a vCard.</abstract>
&LEGALNOTICE;
<number>0164</number>
<status>Deferred</status>
<type>Standards Track</type>
<sig>Standards</sig>
<approver>Council</approver>
<dependencies>
<spec>XMPP Core</spec>
<spec>XEP-0054</spec>
</dependencies>
<supersedes/>
<supersededby/>
<shortname>vcard-temp-filter</shortname>
<author>
<firstname>Daniel</firstname>
<surname>Henninger</surname>
<email>[email protected]</email>
<jid>[email protected]</jid>
</author>
<revision>
<version>0.1</version>
<date>2005-11-16</date>
<initials>psa</initials>
<remark>Initial version.</remark>
</revision>
<revision>
<version>0.0.2</version>
<date>2005-11-05</date>
<initials>dah</initials>
<remark>Switched to filter out, instead of filter in.</remark>
</revision>
<revision>
<version>0.0.1</version>
<date>2005-10-22</date>
<initials>dah</initials>
<remark>First draft.</remark>
</revision>
</header>
<section1 topic='Introduction' anchor='intro'>
<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>
</section1>
<section1 topic='Requirements' anchor='reqs'>
<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>
</section1>
<section1 topic='Use Cases' anchor='usecases'>
<section2 topic="Retrieving Another User's vCard Without The JABBERID Element">
<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>
<example caption="Requesting Another User's vCard"><![CDATA[
<iq to='[email protected]'
from='[email protected]/home'
type='get'
id='v1'>
<vCard xmlns='vcard-temp'/>
</iq>
]]></example>
<p>The server should then return the other user's vCard to the requestor:</p>
<example caption="Receiving Another User's vCard"><![CDATA[
<iq from='[email protected]'
to='[email protected]/home'
type='result'
id='v1'>
<vCard xmlns='vcard-temp'>
<FN>Jeremie Miller</FN>
<N>
<GIVEN>Jeremie</GIVEN>
<FAMILY>Miller</FAMILY>
<MIDDLE/>
</N>
<NICKNAME>jer</NICKNAME>
<EMAIL><INTERNET/><PREF/><USERID>[email protected]</USERID></EMAIL>
<JABBERID>[email protected]</JABBERID>
</vCard>
</iq>
]]></example>
<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>
<example caption="Requesting Another User's vCard Without the JABBERID Element"><![CDATA[
<iq to='[email protected]'
from='[email protected]/home'
type='get'
id='v2'>
<vCard xmlns='vcard-temp'>
<filter xmlns='vcard-temp-filter'>
<JABBERID/>
</filter>
</vCard>
</iq>
]]></example>
<p>The server should then return all available fields from the other user's vCard except for those listed in the filter stanza:</p>
<example caption="Receiving Fields From Another User's vCard"><![CDATA[
<iq from='[email protected]'
to='[email protected]/home'
type='result'
id='v2'>
<vCard xmlns='vcard-temp'>
<FN>JeremieMiller</FN>
<N>
<GIVEN>Jeremie</GIVEN>
<FAMILY>Miller</FAMILY>
<MIDDLE/>
</N>
<NICKNAME>jer</NICKNAME>
<EMAIL><INTERNET/><PREF/><USERID>[email protected]</USERID></EMAIL>
</vCard>
</iq>
]]></example>
</section2>
</section1>
<section1 topic='Security Considerations' anchor='security'>
<p>This document introduces no new security concerns beyond those already involved in implementation and deployment of the 'vcard-temp' protocol.</p>
</section1>
<section1 topic='IANA Considerations' anchor='iana'>
<p>This document requires no interaction with &IANA;.</p>
</section1>
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
<p>The ®ISTRAR; shall add 'vcard-temp-filter' to its registry of official namespaces.</p>
</section1>
<section1 topic='XML Schema' anchor='schema'>
<p>The schema for the 'vcard-temp-filter' namespace re-uses the element names from the DTD described in <cite>XEP-0054</cite>.</p>
<code><![CDATA[
<?xml version='1.0' encoding='UTF-8'?>
<xs:schema
xmlns:xs='http://www.w3.org/2001/XMLSchema'
targetNamespace='vcard-temp-filter'
xmlns='vcard-temp-filter'
elementFormDefault='qualified'>
<xs:element name='filter'>
<xs:complexType>
<xs:sequence>
<xs:element name='VERSION' type='empty'/>
<xs:element name='FN' type='empty'/>
<xs:element name='N' type='empty'/>
<xs:element name='NICKNAME' type='empty'/>
<xs:element name='PHOTO' type='empty'/>
<xs:element name='BDAY' type='empty'/>
<xs:element name='ADR' type='empty'/>
<xs:element name='LABEL' type='empty'/>
<xs:element name='TEL' type='empty'/>
<xs:element name='EMAIL' type='empty'/>
<xs:element name='JABBERID' type='empty'/>
<xs:element name='MAILER' type='empty'/>
<xs:element name='TZ' type='empty'/>
<xs:element name='GEO' type='empty'/>
<xs:element name='TITLE' type='empty'/>
<xs:element name='ROLE' type='empty'/>
<xs:element name='LOGO' type='empty'/>
<xs:element name='AGENT' type='empty'/>
<xs:element name='ORG' type='empty'/>
<xs:element name='CATEGORIES' type='empty'/>
<xs:element name='NOTE' type='empty'/>
<xs:element name='PRODID' type='empty'/>
<xs:element name='REV' type='empty'/>
<xs:element name='SORT-STRING' type='empty'/>
<xs:element name='SOUND' type='empty'/>
<xs:element name='UID' type='empty'/>
<xs:element name='URL' type='empty'/>
<xs:element name='CLASS' type='empty'/>
<xs:element name='KEY' type='empty'/>
<xs:element name='DESC' type='empty'/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:simpleType name='empty'>
<xs:restriction base='xs:string'>
<xs:enumeration value=''/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
]]></code>
</section1>
</xep>