git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@1971 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
Peter Saint-Andre 2008-06-13 03:55:42 +00:00
parent e9b376b310
commit 13aced6f05
1 changed files with 79 additions and 17 deletions

View File

@ -20,43 +20,49 @@
<supersededby/>
<shortname>vcard-temp</shortname>
&stpeter;
<revision>
<version>1.2pre1</version>
<date>2008-06-12</date>
<initials>psa</initials>
<remark><p>More fully specified error cases; added section on determining support.</p></remark>
</revision>
<revision>
<version>1.1</version>
<date>2003-03-26</date>
<initials>psa</initials>
<remark>Clarified certain historical inaccuracies and added links to archived versions of Frank Dawson's Internet-Drafts.</remark>
<remark><p>Clarified certain historical inaccuracies and added links to archived versions of Frank Dawson's Internet-Drafts.</p></remark>
</revision>
<revision>
<version>1.0</version>
<date>2003-01-09</date>
<initials>psa</initials>
<remark>Updated status to Active per vote of the Jabber Council.</remark>
<remark><p>Updated status to Active per vote of the Jabber Council.</p></remark>
</revision>
<revision>
<version>0.2</version>
<date>2002-11-06</date>
<initials>psa</initials>
<remark>Many small fixes; added implementation notes.</remark>
<remark><p>Many small fixes; added implementation notes.</p></remark>
</revision>
<revision>
<version>0.1</version>
<date>2002-10-31</date>
<initials>psa</initials>
<remark>Initial version.</remark>
<remark><p>Initial version.</p></remark>
</revision>
</header>
<section1 topic='Introduction'>
<section1 topic='Introduction' anchor='intro'>
<p>This specification documents the vCard-XML format currently in use within the Jabber community. A future specification will recommend a standards-track protocol to supersede this informational document.</p>
<p>The basic functionality is for a user to store and retrieve an XML representation of his or her vCard using the data storage capabilities native to all existing Jabber server implementations. This is done by by sending an &lt;iq/&gt; of type "set" (storage) or "get" (retrieval) to one's Jabber server containing a &lt;vCard/&gt; child scoped by the 'vcard-temp' namespace, with the &lt;vCard/&gt; element containing the actual vCard-XML elements as defined by the vCard-XML DTD. Other users may then view one's vCard information.</p>
</section1>
<section1 topic='History'>
<section1 topic='History' anchor='history'>
<p>vCards are an existing and widely-used standard for personal user information storage, somewhat like an electronic business card. The vCard format is defined in &rfc2426;.</p>
<p>In 1998 and 1999, Frank Dawson submitted four revisions of an Internet-Draft proposing to represent the standard vCard format in XML. When the Jabber project was originally looking for a method to store personal user information, the most recent revision was draft-dawson-vcard-xml-dtd-01 <note>This document is archived at &lt;<link url='http://www.watersprings.org/pub/id/draft-dawson-vcard-xml-dtd-01.txt'>http://www.watersprings.org/pub/id/draft-dawson-vcard-xml-dtd-01.txt</link>&gt;.</note>. He also submitted a -02 revision on November 15, 1998 <note>This document is archived at &lt;<link url='http://www.watersprings.org/pub/id/draft-dawson-vcard-xml-dtd-02.txt'>http://www.watersprings.org/pub/id/draft-dawson-vcard-xml-dtd-02.txt</link>&gt;.</note> and a -03 revision on June 22, 1999 <note>This document is archived at &lt;<link url='http://www.watersprings.org/pub/id/draft-dawson-vcard-xml-dtd-03.txt'>http://www.watersprings.org/pub/id/draft-dawson-vcard-xml-dtd-03.txt</link>&gt;.</note>.</p>
<p>Unfortunately, Dawson's proposal did not move forward within the IETF's standards process. For reasons now lost in the mists of time, the Jabber project continued to use the DTD from draft-dawson-vcard-xml-dtd-01, making two small modifications to adapt it for use within Jabber (adding the JABBERID and DESC elements) but also specifying element names in all caps rather than lowercase as defined in draft-dawson-vcard-xml-dtd-01. In addition, the Jabber community followed the usage (but not DTD) in that draft regarding version information, including it as an attribute of the vCard element rather than as a child element. This format was implemented within Jabber under the 'vcard-temp' namespace.</p>
<p>In 1998 and 1999, Frank Dawson submitted four revisions of an Internet-Draft proposing to represent the standard vCard format in XML. When the jabberd open-source project was originally looking for a method to store personal user information, the most recent revision consulted by the jabberd developers was draft-dawson-vcard-xml-dtd-01 <note>This document is archived at &lt;<link url='http://www.watersprings.org/pub/id/draft-dawson-vcard-xml-dtd-01.txt'>http://www.watersprings.org/pub/id/draft-dawson-vcard-xml-dtd-01.txt</link>&gt;.</note>. He also submitted a -02 revision on November 15, 1998 <note>This document is archived at &lt;<link url='http://www.watersprings.org/pub/id/draft-dawson-vcard-xml-dtd-02.txt'>http://www.watersprings.org/pub/id/draft-dawson-vcard-xml-dtd-02.txt</link>&gt;.</note> and a -03 revision on June 22, 1999 <note>This document is archived at &lt;<link url='http://www.watersprings.org/pub/id/draft-dawson-vcard-xml-dtd-03.txt'>http://www.watersprings.org/pub/id/draft-dawson-vcard-xml-dtd-03.txt</link>&gt;.</note>.</p>
<p>Unfortunately, Dawson's proposal did not move forward within the IETF's standards process. For reasons now lost in the mists of time, the Jabber project continued to use the DTD from draft-dawson-vcard-xml-dtd-01, making two small modifications to adapt it for use within the Jabber community (adding the JABBERID and DESC elements) but also specifying element names in all caps rather than lowercase as defined in draft-dawson-vcard-xml-dtd-01. In addition, the Jabber community followed the usage (but not DTD) in that draft regarding version information, including it as an attribute of the vCard element rather than as a child element. This format was implemented within the Jabber community under the 'vcard-temp' namespace.</p>
</section1>
<section1 topic='Use Cases'>
<section1 topic='Use Cases' anchor='usecases'>
<section2 topic="Retrieving One's vCard">
<p>A user may retrieve his or her own vCard by sending XML of the following form to his or her own JID (the 'to' attibute MUST NOT be included):</p>
<p>A user retrieves his or her own vCard by sending an IQ-get with no 'to' address and containing a &lt;vCard/&gt; child element qualified by the 'vcard-temp' namespace.</p>
<example caption="vCard Retrieval Request"><![CDATA[
<iq from='stpeter@jabber.org/roundabout'
id='v1'
@ -64,7 +70,7 @@
<vCard xmlns='vcard-temp'/>
</iq>
]]></example>
<p>The server should then return the vCard to the user:</p>
<p>If a vCard exists for the user, the server MUST return in an IQ-result:</p>
<example caption="Server Returns vCard"><![CDATA[
<iq id='v1'
to='stpeter@jabber.org/roundabout'
@ -116,6 +122,17 @@
personal website: http://www.saint-andre.com/
</DESC>
</vCard>
</iq>
]]></example>
<p>If no vCard exists, the server MUST return an &notfound; error.</p>
<example caption="No vCard"><![CDATA[
<iq id='v1'
to='stpeter@jabber.org/roundabout'
type='error'>
<vCard xmlns='vcard-temp'/>
<error type='cancel'>
<item-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
</iq>
]]></example>
</section2>
@ -178,7 +195,16 @@
type='result'/>
]]></example>
<p>Notice that the previous IQ-set included only one changed element (the &lt;DESC/&gt; element). Currently there is no method for partial updates of a vCard, and the entire vCard must be sent to the server in order to update any part of the vCard.</p>
<p>If a user attempts to perform an IQ set on another user's vCard (i.e., by setting a 'to' address to a JID other than the sending user's bare JID), the server MUST return a 403 "Forbidden" error.</p>
<p>If a user attempts to perform an IQ set on another user's vCard (i.e., by setting a 'to' address to a JID other than the sending user's bare JID), the server MUST return a &forbidden; error.</p>
<example caption="Entity Attempts to Modify Another Entity&apos;s vCard"><![CDATA[
<iq id='v2'
to='stpeter@jabber.org/roundabout'
type='error'>
<error type='auth'>
<forbidden xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
</iq>
]]></example>
</section2>
<section2 topic="Viewing Another User&apos;s vCard">
<p>A user may view another user's vCard by sending an IQ of type "get" to the other user's bare JID.</p>
@ -207,19 +233,55 @@
<EMAIL><INTERNET/><PREF/><USERID>jeremie@jabber.org</USERID></EMAIL>
<JABBERID>jer@jabber.org</JABBERID>
</vCard>
</iq>
]]></example>
<p>If no vCard exists or the user does not exist, the server MUST return a &unavailable; error.</p>
<example caption="No vCard"><![CDATA[
<iq id='v3'
to='stpeter@jabber.org/roundabout'
type='error'>
<vCard xmlns='vcard-temp'/>
<error type='cancel'>
<service-unavailable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
</iq>
]]></example>
<p>Note: The use of vCards is not limited to accounts associated with human users. For example, an XMPP server could itself have a vCard that defines the server's hosting organization, physical location, and relevant contact addresses.</p>
</section2>
</section1>
<section1 topic='Security Considerations'>
<section1 topic='Determining Support' anchor='support'>
<p>If an entity supports the vcard-temp protocol, it MUST report that by including a service discovery feature of "vcard-temp" &NSNOTE; in response to a &xep0030; information request:</p>
<example caption="Service Discovery Information Request"><![CDATA[
<iq type='get'
from='juliet@capulet.lit/balcony'
to='capulet.lit'
id='disco1'>
<query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>
]]></example>
<example caption="Service Discovery Information Response"><![CDATA[
<iq type='result'
from='capulet.lit'
to='juliet@capulet.lit/balcony'
id='disco1'>
<query xmlns='http://jabber.org/protocol/disco#info'>
...
<feature var='vcard-temp'/>
...
</query>
</iq>
]]></example>
<p>This information can also be encapsulated via &xep0115; for entities who share presence.</p>
</section1>
<section1 topic='Security Considerations' anchor='security'>
<p>The vCard information published to one's Jabber server is world-readable; therefore, users should exercise due caution when determining what information to include (e.g., street addresses, personal telephone numbers, or email addresses).</p>
</section1>
<section1 topic='IANA Considerations'>
<section1 topic='IANA Considerations' anchor='iana'>
<p>This document requires no interaction with &IANA;.</p>
</section1>
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
<section2 topic='Protocol Namespaces' anchor='registrar-protocol'>
<section2 topic='Protocol Namespaces' anchor='registrar-ns'>
<p>The &REGISTRAR; includes the 'vcard-temp' namespace in its registry of official namespaces (see &NAMESPACES;).</p>
</section2>
<section2 topic='URI Query Types' anchor='registrar-querytypes'>
@ -244,7 +306,7 @@ xmpp:romeo@montague.net?vcard
]]></code>
</section2>
</section1>
<section1 topic='Implementation Notes'>
<section1 topic='Implementation Notes' anchor='usecases'>
<p>Note the following:</p>
<ul>
<li>The correct capitalization of the wrapper element is &lt;vCard/&gt; (and XML element names are case-sensitive).</li>
@ -256,7 +318,7 @@ xmpp:romeo@montague.net?vcard
<li>Some Jabber implementations add a 'version' attribute to the &lt;vCard/&gt; element, with the value set at "2.0" or "3.0". The DTD is incorrect, and the examples in draft-dawson-vcard-xml-dtd-01 clearly show that version information is to be included by means of a 'version' attribute, not the &lt;VERSION/&gt; element as defined in the DTD. However, to conform to draft-dawson-vcard-xml-dtd-01, the value should be "3.0", not "2.0".</li>
</ul>
</section1>
<section1 topic='DTD'>
<section1 topic='DTD' anchor='dtd'>
<p>The following DTD is a slightly modified version of that contained in draft-dawson-vcard-xml-dtd-01. The only modifications were to add the JABBERID and DESC elements.</p>
<code><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>