mirror of
https://github.com/moparisthebest/xeps
synced 2024-11-21 08:45:04 -05:00
0.9
This commit is contained in:
parent
57fa0c2086
commit
04f2b7087e
511
xep-0292.xml
511
xep-0292.xml
@ -31,6 +31,12 @@
|
|||||||
<email>samizzi@cisco.com</email>
|
<email>samizzi@cisco.com</email>
|
||||||
<jid>samizzi@cisco.com</jid>
|
<jid>samizzi@cisco.com</jid>
|
||||||
</author>
|
</author>
|
||||||
|
<revision>
|
||||||
|
<version>0.9</version>
|
||||||
|
<date>2011-10-09</date>
|
||||||
|
<initials>psa</initials>
|
||||||
|
<remark><p>Described how to use the vCard format for storing private data about one's contacts; added XMPP Registrar considerations.</p></remark>
|
||||||
|
</revision>
|
||||||
<revision>
|
<revision>
|
||||||
<version>0.8</version>
|
<version>0.8</version>
|
||||||
<date>2011-08-31</date>
|
<date>2011-08-31</date>
|
||||||
@ -132,169 +138,337 @@
|
|||||||
<p>The vCard XML format defined at the IETF specifies that the root element is <vcards/>, where the only defined child element is <vcard/>. For use in XMPP, we specify that the root element shall be <vcard/>, not <vcards/>.</p>
|
<p>The vCard XML format defined at the IETF specifies that the root element is <vcards/>, where the only defined child element is <vcard/>. For use in XMPP, we specify that the root element shall be <vcard/>, not <vcards/>.</p>
|
||||||
</section1>
|
</section1>
|
||||||
|
|
||||||
<section1 topic='IQ-Based Publication and Retrieval' anchor='iq'>
|
<section1 topic='Self vCards' anchor='public'>
|
||||||
<p>As in <cite>XEP-0054</cite>, the primary method for publishing and retrieving vCards is the XMPP &IQ; stanza.</p>
|
|
||||||
<section2 topic='Retrieval' anchor='iq-retrieval'>
|
<p>This section describes the use of the vCard format for self-publication and retrieval of publicly-accessible information about any entity on an XMPP network, thus fulfilling all the use cases of the old vcard-temp format.</p>
|
||||||
<p>An XMPP entity retrieves the vCard of another entity (or itself) by sending an IQ-get to the target entity containing a <vcard/> child element (note the lowercase "c"!) qualified by the 'urn:ietf:params:xml:ns:vcard-4.0' namespace.</p>
|
|
||||||
<example caption="vCard Retrieval Request"><![CDATA[
|
<section2 topic='IQ-Based Publication and Retrieval' anchor='self-iq'>
|
||||||
<iq from='samizzi@cisco.com/foo'
|
<p>As in <cite>XEP-0054</cite>, the primary method for publishing and retrieving vCards is the XMPP &IQ; stanza. (Although it would have been possible to use &xep0222; for public storage and retrieval, community consensus is that storage via IQ is more backward-compatible with <cite>XEP-0054</cite>, and that publish-subscribe is more appropriate only for event notifications.)</p>
|
||||||
id='bx81v356'
|
<section3 topic='Retrieval' anchor='self-iq-retrieval'>
|
||||||
to='stpeter@jabber.org'
|
<p>An XMPP entity retrieves the vCard of another entity (or itself) by sending an IQ-get to the target entity containing a <vcard/> child element (note the lowercase "c"!) qualified by the 'urn:ietf:params:xml:ns:vcard-4.0' namespace.</p>
|
||||||
type='get'>
|
<example caption="vCard Retrieval Request"><![CDATA[
|
||||||
<vcard xmlns='urn:ietf:params:xml:ns:vcard-4.0'/>
|
<iq from='samizzi@cisco.com/foo'
|
||||||
</iq>
|
id='bx81v356'
|
||||||
]]></example>
|
to='stpeter@jabber.org'
|
||||||
<p>If a vCard exists for the target entity, the responsible entity (e.g., the XMPP server that hosts the account for a bare JID) MUST return the data in an IQ-result:</p>
|
type='get'>
|
||||||
<example caption="Server Returns vCard"><![CDATA[
|
<vcard xmlns='urn:ietf:params:xml:ns:vcard-4.0'/>
|
||||||
<iq from='stpeter@jabber.org'
|
</iq>
|
||||||
id='bx81v356'
|
]]></example>
|
||||||
to='samizzi@cisco.com/foo'
|
<p>If a vCard exists for the target entity, the responsible entity (e.g., the XMPP server that hosts the account for a bare JID) MUST return the data in an IQ-result:</p>
|
||||||
type='result'>
|
<example caption="Server Returns vCard"><![CDATA[
|
||||||
<vcard xmlns="urn:ietf:params:xml:ns:vcard-4.0">
|
<iq from='stpeter@jabber.org'
|
||||||
<fn><text>Peter Saint-Andre</text></fn>
|
id='bx81v356'
|
||||||
<n><surname>Saint-Andre</surname><given>Peter</given><middle></middle></n>
|
to='samizzi@cisco.com/foo'
|
||||||
<nickname><text>stpeter</text></nickname>
|
type='result'>
|
||||||
<nickname><text>psa</text></nickname>
|
<vcard xmlns="urn:ietf:params:xml:ns:vcard-4.0">
|
||||||
<photo><uri>http://me.stpeter.im/images/stpeter_oscon.jpg</uri></photo>
|
<fn><text>Peter Saint-Andre</text></fn>
|
||||||
<bday><date>1966-08-06</date></bday>
|
<n><surname>Saint-Andre</surname><given>Peter</given><middle></middle></n>
|
||||||
<adr>
|
<nickname><text>stpeter</text></nickname>
|
||||||
<parameters>
|
<nickname><text>psa</text></nickname>
|
||||||
<type><text>work</text><text>voice</text></type>
|
<photo><uri>http://me.stpeter.im/images/stpeter_oscon.jpg</uri></photo>
|
||||||
<pref><integer>1</integer></pref>
|
<bday><date>1966-08-06</date></bday>
|
||||||
</parameters>
|
<adr>
|
||||||
<ext>Suite 600</ext>
|
<parameters>
|
||||||
<street>1899 Wynkoop Street</street>
|
<type><text>work</text><text>voice</text></type>
|
||||||
<locality>Denver</locality>
|
<pref><integer>1</integer></pref>
|
||||||
<region>CO</region>
|
</parameters>
|
||||||
<code>80202</code>
|
<ext>Suite 600</ext>
|
||||||
<country>USA</country>
|
<street>1899 Wynkoop Street</street>
|
||||||
</adr>
|
<locality>Denver</locality>
|
||||||
<adr>
|
<region>CO</region>
|
||||||
<parameters><type><text>home</text></type></parameters>
|
<code>80202</code>
|
||||||
<ext></ext>
|
<country>USA</country>
|
||||||
<street></street>
|
</adr>
|
||||||
<locality>Denver</locality>
|
<adr>
|
||||||
<region>CO</region>
|
<parameters><type><text>home</text></type></parameters>
|
||||||
<code>80210</code>
|
<ext></ext>
|
||||||
<country>USA</country>
|
<street></street>
|
||||||
</adr>
|
<locality>Denver</locality>
|
||||||
<tel>
|
<region>CO</region>
|
||||||
<parameters>
|
<code>80210</code>
|
||||||
<type><text>work</text><text>voice</text></type>
|
<country>USA</country>
|
||||||
<pref><integer>1</integer></pref>
|
</adr>
|
||||||
</parameters>
|
<tel>
|
||||||
<uri>tel:+1-303-308-3282</uri>
|
<parameters>
|
||||||
</tel>
|
<type><text>work</text><text>voice</text></type>
|
||||||
<tel>
|
<pref><integer>1</integer></pref>
|
||||||
<parameters><type><text>work</text><text>fax</text></type></parameters>
|
</parameters>
|
||||||
<uri>tel:+1-303-308-3219</uri>
|
<uri>tel:+1-303-308-3282</uri>
|
||||||
</tel>
|
</tel>
|
||||||
<tel>
|
<tel>
|
||||||
<parameters><type><text>home</text><text>voice</text></type></parameters>
|
<parameters><type><text>work</text><text>fax</text></type></parameters>
|
||||||
<uri>tel:+1-303-555-1212</uri>
|
<uri>tel:+1-303-308-3219</uri>
|
||||||
</tel>
|
</tel>
|
||||||
<geo><uri>geo:39.59,-105.01</uri></geo>
|
<tel>
|
||||||
<title><text>Executive Director</text></title>
|
<parameters><type><text>home</text><text>voice</text></type></parameters>
|
||||||
<role><text>Patron Saint</text></role>
|
<uri>tel:+1-303-555-1212</uri>
|
||||||
<org>
|
</tel>
|
||||||
<parameters><type><text>work</text></type></parameters>
|
<geo><uri>geo:39.59,-105.01</uri></geo>
|
||||||
<text>XMPP Standards Foundation</text>
|
<title><text>Executive Director</text></title>
|
||||||
</org>
|
<role><text>Patron Saint</text></role>
|
||||||
<url><uri>https://stpeter.im/</uri></url>
|
<org>
|
||||||
<note>
|
<parameters><type><text>work</text></type></parameters>
|
||||||
<text>
|
<text>XMPP Standards Foundation</text>
|
||||||
More information about me is located on my
|
</org>
|
||||||
personal website: https://stpeter.im/
|
<url><uri>https://stpeter.im/</uri></url>
|
||||||
</text>
|
<note>
|
||||||
</note>
|
<text>
|
||||||
<gender><sex><text>M</text></sex></gender>
|
More information about me is located on my
|
||||||
<lang>
|
personal website: https://stpeter.im/
|
||||||
<parameters><pref>1</pref></parameters>
|
</text>
|
||||||
<language-tag>en</language-tag>
|
</note>
|
||||||
</lang>
|
<gender><sex><text>M</text></sex></gender>
|
||||||
<email>
|
<lang>
|
||||||
<parameters><type><text>work</text></type></parameters>
|
<parameters><pref>1</pref></parameters>
|
||||||
<text>psaintan@cisco.com</text>
|
<language-tag>en</language-tag>
|
||||||
</email>
|
</lang>
|
||||||
<email>
|
<email>
|
||||||
<parameters><type><text>home</text></type></parameters>
|
<parameters><type><text>work</text></type></parameters>
|
||||||
<text>stpeter@jabber.org</text>
|
<text>psaintan@cisco.com</text>
|
||||||
</email>
|
</email>
|
||||||
<impp>
|
<email>
|
||||||
<parameters><type><text>work</text></type></parameters>
|
<parameters><type><text>home</text></type></parameters>
|
||||||
<uri>xmpp:psaintan@cisco.com</uri>
|
<text>stpeter@jabber.org</text>
|
||||||
</impp>
|
</email>
|
||||||
<impp>
|
<impp>
|
||||||
<parameters><type><text>home</text></type></parameters>
|
<parameters><type><text>work</text></type></parameters>
|
||||||
<uri>xmpp:stpeter@jabber.org</uri>
|
<uri>xmpp:psaintan@cisco.com</uri>
|
||||||
</impp>
|
</impp>
|
||||||
<key>
|
<impp>
|
||||||
<uri>https://stpeter.im/stpeter.asc</uri>
|
<parameters><type><text>home</text></type></parameters>
|
||||||
</key>
|
<uri>xmpp:stpeter@jabber.org</uri>
|
||||||
</vcard>
|
</impp>
|
||||||
</iq>
|
<key>
|
||||||
]]></example>
|
<uri>https://stpeter.im/stpeter.asc</uri>
|
||||||
<p>If no vCard exists, the server MUST return an IQ-result containing an empty <vcard/> element.</p>
|
</key>
|
||||||
<example caption="No vCard (empty element)"><![CDATA[
|
</vcard>
|
||||||
<iq from='stpeter@jabber.org'
|
</iq>
|
||||||
id='bx81v356'
|
]]></example>
|
||||||
to='samizzi@cisco.com/foo'
|
<p>If no vCard exists, the server MUST return an IQ-result containing an empty <vcard/> element.</p>
|
||||||
type='result'>
|
<example caption="No vCard (empty element)"><![CDATA[
|
||||||
<vcard xmlns='urn:ietf:params:xml:ns:vcard-4.0'/>
|
<iq from='stpeter@jabber.org'
|
||||||
</iq>
|
id='bx81v356'
|
||||||
]]></example>
|
to='samizzi@cisco.com/foo'
|
||||||
|
type='result'>
|
||||||
|
<vcard xmlns='urn:ietf:params:xml:ns:vcard-4.0'/>
|
||||||
|
</iq>
|
||||||
|
]]></example>
|
||||||
|
</section3>
|
||||||
|
<section3 topic='Publication' anchor='self-iq-publication'>
|
||||||
|
<p>An XMPP entity publishes or updates its vCard by sending an IQ-set to itself, containing a <vcard/> child element qualified by the 'urn:ietf:params:xml:ns:vcard-4.0' namespace. The publication request needs to include the entire vCard, not a "diff" against the prior data (if any).</p>
|
||||||
|
<example caption="vCard Publication Request"><![CDATA[
|
||||||
|
<iq from='stpeter@jabber.org/squire
|
||||||
|
id='h3vz319m'
|
||||||
|
to='stpeter@jabber.org'
|
||||||
|
type='set'>
|
||||||
|
<vcard xmlns='urn:ietf:params:xml:ns:vcard-4.0'>
|
||||||
|
[...]
|
||||||
|
</vcard>
|
||||||
|
</iq>
|
||||||
|
]]></example>
|
||||||
|
<p>If no error occurs, the responsible entity returns an IQ-result.</p>
|
||||||
|
<example caption="Server Acknowledges Publication"><![CDATA[
|
||||||
|
<iq from='stpeter@jabber.org'
|
||||||
|
id='bx81v356'
|
||||||
|
to='stpeter@jabber.org/squire'
|
||||||
|
type='result'/>
|
||||||
|
]]></example>
|
||||||
|
<p>Note: An entity MAY have authorization to update the vCard of another entity (e.g., a server administrator might have authorization to modify the server's vCard).</p>
|
||||||
|
</section3>
|
||||||
|
|
||||||
</section2>
|
</section2>
|
||||||
<section2 topic='Publication' anchor='iq-publication'>
|
|
||||||
<p>An XMPP entity publishes or updates its vCard by sending an IQ-set to itself, containing a <vcard/> child element qualified by the 'urn:ietf:params:xml:ns:vcard-4.0' namespace. The publication request needs to include the entire vCard, not a "diff" against the prior data (if any).</p>
|
<section2 topic='Event Notifications' anchor='self-pubsub'>
|
||||||
<example caption="vCard Publication Request"><![CDATA[
|
<p>&xep0060; provides a way to subscribe to events, and &xep0163; defines a pubsub profile for events associated with instant messaging (IM) accounts. If PEP is supported by an IM server, it can be used to automatically generate event notifications when a user's vCard is modified.</p>
|
||||||
<iq from='stpeter@jabber.org/squire
|
<section3 topic='Location' anchor='self-pubsub-location'>
|
||||||
id='h3vz319m'
|
<p>The canonical location for notifications regarding a user's vCard is a pubsub node whose name is "urn:xmpp:vcard4".</p>
|
||||||
to='stpeter@jabber.org'
|
</section3>
|
||||||
type='set'>
|
<section3 topic='Subscribing to vCard Notifications' anchor='self-pubsub-subscribe'>
|
||||||
<vcard xmlns='urn:ietf:params:xml:ns:vcard-4.0'>
|
<p>Let us imagine that Juliet wishes to receive the updates that Romeo publishes to his vCard. She has two options:
|
||||||
[...]
|
<ol>
|
||||||
</vcard>
|
<li>Implicitly subscribe by advertising support for "urn:xmpp:vcard4+notify" in her &xep0115; data. Romeo's PEP service then automatically sends vCard updates to her when it receives presence from her, until and unless she sends presence of type unavailable or stops advertising an interest in vCard updates. This is in accordance with XEP-0060, section 6.1.</li>
|
||||||
</iq>
|
<li>Explicitly subscribe by sending a formal subscription request to the "urn:xmpp:vcard4" node at Romeo's JabberID. Romeo's PEP service may send her all vCard updates even if she is offline at the time (depending on service policies regarding presence integration).</li>
|
||||||
]]></example>
|
</ol>
|
||||||
<p>If no error occurs, the responsible entity returns an IQ-result.</p>
|
</p>
|
||||||
<example caption="Server Acknowledges Publication"><![CDATA[
|
</section3>
|
||||||
<iq from='stpeter@jabber.org'
|
<section3 topic='Receiving a vCard Notification'>
|
||||||
id='bx81v356'
|
<p>Because Juliet has sent presence to Romeo including Entity Capabilities data that includes the "urn:xmpp:vcard4+notify" feature, Romeo's XMPP server will send a PEP notification to Juliet. The notification can include an XMPP message body for backwards-compatibility with XMPP clients that are not pubsub-capable (see Message Body). This is in accordance with XEP-0060, second 6.1.7.</p>
|
||||||
to='stpeter@jabber.org/squire'
|
<example caption="Receiving a vCard publication/update"><![CDATA[
|
||||||
type='result'/>
|
<message from='romeo@montague.lit'
|
||||||
]]></example>
|
to='juliet@capulet.lit'
|
||||||
<p>Note: An entity MAY have authorization to update the vCard of another entity (e.g., a server administrator might have authorization to modify the server's vCard).</p>
|
type='headline'>
|
||||||
|
<event xmlns='http://jabber.org/protocol/pubsub#event'>
|
||||||
|
<items node='urn:xmpp:vcard4'>
|
||||||
|
<item id='current'/>
|
||||||
|
</items>
|
||||||
|
</event>
|
||||||
|
</message>
|
||||||
|
]]></example>
|
||||||
|
<p>Note: There is no payload, because this is a pure notification (the receiver needs to retrieve the vCard using an IQ-get as described earlier.</p>
|
||||||
|
</section3>
|
||||||
</section2>
|
</section2>
|
||||||
|
|
||||||
</section1>
|
</section1>
|
||||||
|
|
||||||
<section1 topic='Event Notifications' anchor='pep'>
|
<section1 topic='Contact vCards' anchor='contacts'>
|
||||||
<p>&xep0060; provides a way to subscribe to events, and &xep0163; defines a pubsub profile for events associated with instant messaging (IM) accounts. If PEP is supported by an IM server, it can be used to automatically generate event notifications when a user's vCard is modified.</p>
|
|
||||||
<section2 topic='Location' anchor='pubsub-location'>
|
<p>In addition to enabling the publication and retrieval of vCards about any entity on an XMPP network, the vCard format can also be used to store information about an entity's contacts.</p>
|
||||||
<p>The canonical location for notifications regarding a user's vCard is a pubsub node whose name is "urn:xmpp:vcard4".</p>
|
|
||||||
|
<section2 topic='Format' anchor='contacts-format'>
|
||||||
|
<p>A contact is simply a vCard about someone else (or something else, in the case of automated entities). If the other person or entity is in the user's roster &rfc6121;, the vCard SHOULD contain the Jabber ID of the person or entity. This enables a user to store information about the contact outside of the roster, thus obviating the need for changes or extensions to the roster namespace itself (as in &xep0145;).</p>
|
||||||
|
<example caption="Contact"><![CDATA[
|
||||||
|
<vcard xmlns="urn:ietf:params:xml:ns:vcard-4.0">
|
||||||
|
<fn><text>Samantha Mizzi</text></fn>
|
||||||
|
<n>
|
||||||
|
<surname>Mizzi</surname>
|
||||||
|
<given>Samantha</given>
|
||||||
|
<middle></middle>
|
||||||
|
</n>
|
||||||
|
<nickname><text>Sam</text></nickname>
|
||||||
|
<nickname><text>samizzi</text></nickname>
|
||||||
|
<geo><uri>geo:39.59,-105.01</uri></geo>
|
||||||
|
<org>
|
||||||
|
<parameters><type><text>work</text></type></parameters>
|
||||||
|
<text>Cisco</text>
|
||||||
|
</org>
|
||||||
|
<note>
|
||||||
|
<text>
|
||||||
|
My co-author on XEP-0292. She's cool!
|
||||||
|
</text>
|
||||||
|
</note>
|
||||||
|
<impp>
|
||||||
|
<parameters><type><text>work</text></type></parameters>
|
||||||
|
<uri>xmpp:samizzi@cisco.com</uri>
|
||||||
|
</impp>
|
||||||
|
</vcard>
|
||||||
|
]]></example>
|
||||||
</section2>
|
</section2>
|
||||||
<section2 topic='Subscribing to vCard Notifications' anchor='pubsub-subscribe'>
|
|
||||||
<p>Let us imagine that Juliet wishes to receive the updates that Romeo publishes to his vCard. She has two options:
|
<section2 topic='Storage' anchor='contacts-storage'>
|
||||||
<ol>
|
<p>Because contact vCards are private information, they are best stored using &xep0223;. The canonical location is a well-known pubsub node "urn:xmpp:contacts". In accordance with <cite>XEP-0223</cite>, this node MUST have an access type of "whitelist" by default. When a client stores items at this node, it SHOULD NOT include an ItemID, so that the pubsub service can assign those identifiers.</p>
|
||||||
<li>Implicitly subscribe by advertising support for "urn:xmpp:vcard4+notify" in her &xep0115; data. Romeo's PEP service then automatically sends vCard updates to her when it receives presence from her, until and unless she sends presence of type unavailable or stops advertising an interest in vCard updates. This is in accordance with XEP-0060, section 6.1.</li>
|
<example caption='Storing a Contact vCard'><![CDATA[
|
||||||
<li>Explicitly subscribe by sending a formal subscription request to the "urn:xmpp:vcard4" node at Romeo's JabberID. Romeo's PEP service may send her all vCard updates even if she is offline at the time (depending on service policies regarding presence integration).</li>
|
<iq from='stpeter@stpeter.im/squire' type='set' id='h3vs7163'>
|
||||||
</ol>
|
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
|
||||||
</p>
|
<publish node='urn:xmpp:contacts'>
|
||||||
</section2>
|
<item>
|
||||||
<section2 topic='Receiving a vCard Notification'>
|
<vcard xmlns="urn:ietf:params:xml:ns:vcard-4.0">
|
||||||
<p>Because Juliet has sent presence to Romeo including Entity Capabilities data that includes the "urn:xmpp:vcard4+notify" feature, Romeo's XMPP server will send a PEP notification to Juliet. The notification can include an XMPP message body for backwards-compatibility with XMPP clients that are not pubsub-capable (see Message Body). This is in accordance with XEP-0060, second 6.1.7.</p>
|
<fn><text>Samantha Mizzi</text></fn>
|
||||||
<example caption="Receiving a vCard publication/update"><![CDATA[
|
<n>
|
||||||
<message from='romeo@montague.lit'
|
<surname>Mizzi</surname>
|
||||||
to='juliet@capulet.lit'
|
<given>Samantha</given>
|
||||||
type='headline'>
|
<middle></middle>
|
||||||
|
</n>
|
||||||
|
<nickname><text>Sam</text></nickname>
|
||||||
|
<nickname><text>samizzi</text></nickname>
|
||||||
|
<geo><uri>geo:39.59,-105.01</uri></geo>
|
||||||
|
<org>
|
||||||
|
<parameters><type><text>work</text></type></parameters>
|
||||||
|
<text>Cisco</text>
|
||||||
|
</org>
|
||||||
|
<note>
|
||||||
|
<text>
|
||||||
|
My co-author on XEP-0292. She's cool!
|
||||||
|
</text>
|
||||||
|
</note>
|
||||||
|
<impp>
|
||||||
|
<parameters><type><text>work</text></type></parameters>
|
||||||
|
<uri>xmpp:samizzi@cisco.com</uri>
|
||||||
|
</impp>
|
||||||
|
</vcard>
|
||||||
|
</item>
|
||||||
|
</publish>
|
||||||
|
<publish-options>
|
||||||
|
<x xmlns='jabber:x:data' type='submit'>
|
||||||
|
<field var='FORM_TYPE' type='hidden'>
|
||||||
|
<value>http://jabber.org/protocol/pubsub#publish-options</value>
|
||||||
|
</field>
|
||||||
|
<field var='pubsub#persist_items'>
|
||||||
|
<value>true</value>
|
||||||
|
</field>
|
||||||
|
<field var='pubsub#access_model'>
|
||||||
|
<value>whitelist</value>
|
||||||
|
</field>
|
||||||
|
</x>
|
||||||
|
</publish-options>
|
||||||
|
</pubsub>
|
||||||
|
</iq>
|
||||||
|
]]></example>
|
||||||
|
<p>When a contact's vCard is stored in a private node, it is pushed out to all of the user's resources that have included in their entity capabilities (XEP-0115) data a service discovery feature of "urn:xmpp:contacts+notify" (in the following example those resources are "squire" and "roundabout").</p>
|
||||||
|
<example caption='Publisher resources receive event notification'><![CDATA[
|
||||||
|
<message from='stpeter@stpeter.im'
|
||||||
|
to='stpeter@stpeter.im/squire'
|
||||||
|
type='headline'
|
||||||
|
id='ka92g1b5'>
|
||||||
<event xmlns='http://jabber.org/protocol/pubsub#event'>
|
<event xmlns='http://jabber.org/protocol/pubsub#event'>
|
||||||
<items node='urn:xmpp:vcard4'>
|
<items node='urn:xmpp:contacts'>
|
||||||
<item id='current'/>
|
<item id='9703CC4E-CF7E-4A86-9E61-2C670235F9CB'>
|
||||||
|
<vcard xmlns="urn:ietf:params:xml:ns:vcard-4.0">
|
||||||
|
<fn><text>Samantha Mizzi</text></fn>
|
||||||
|
<n>
|
||||||
|
<surname>Mizzi</surname>
|
||||||
|
<given>Samantha</given>
|
||||||
|
<middle></middle>
|
||||||
|
</n>
|
||||||
|
<nickname><text>Sam</text></nickname>
|
||||||
|
<nickname><text>samizzi</text></nickname>
|
||||||
|
<geo><uri>geo:39.59,-105.01</uri></geo>
|
||||||
|
<org>
|
||||||
|
<parameters><type><text>work</text></type></parameters>
|
||||||
|
<text>Cisco</text>
|
||||||
|
</org>
|
||||||
|
<note>
|
||||||
|
<text>
|
||||||
|
My co-author on XEP-0292. She's cool!
|
||||||
|
</text>
|
||||||
|
</note>
|
||||||
|
<impp>
|
||||||
|
<parameters><type><text>work</text></type></parameters>
|
||||||
|
<uri>xmpp:samizzi@cisco.com</uri>
|
||||||
|
</impp>
|
||||||
|
</vcard>
|
||||||
|
</item>
|
||||||
|
</items>
|
||||||
|
</event>
|
||||||
|
</message>
|
||||||
|
|
||||||
|
<message from='stpeter@stpeter.im'
|
||||||
|
to='stpeter@stpeter.im/roundabout'
|
||||||
|
type='headline'
|
||||||
|
id='pty14x69'>
|
||||||
|
<event xmlns='http://jabber.org/protocol/pubsub#event'>
|
||||||
|
<items node='urn:xmpp:contacts'>
|
||||||
|
<item id='9703CC4E-CF7E-4A86-9E61-2C670235F9CB'>
|
||||||
|
<vcard xmlns="urn:ietf:params:xml:ns:vcard-4.0">
|
||||||
|
<fn><text>Samantha Mizzi</text></fn>
|
||||||
|
<n>
|
||||||
|
<surname>Mizzi</surname>
|
||||||
|
<given>Samantha</given>
|
||||||
|
<middle></middle>
|
||||||
|
</n>
|
||||||
|
<nickname><text>Sam</text></nickname>
|
||||||
|
<nickname><text>samizzi</text></nickname>
|
||||||
|
<geo><uri>geo:39.59,-105.01</uri></geo>
|
||||||
|
<org>
|
||||||
|
<parameters><type><text>work</text></type></parameters>
|
||||||
|
<text>Cisco</text>
|
||||||
|
</org>
|
||||||
|
<note>
|
||||||
|
<text>
|
||||||
|
My co-author on XEP-0292. She's cool!
|
||||||
|
</text>
|
||||||
|
</note>
|
||||||
|
<impp>
|
||||||
|
<parameters><type><text>work</text></type></parameters>
|
||||||
|
<uri>xmpp:samizzi@cisco.com</uri>
|
||||||
|
</impp>
|
||||||
|
</vcard>
|
||||||
|
</item>
|
||||||
</items>
|
</items>
|
||||||
</event>
|
</event>
|
||||||
</message>
|
</message>
|
||||||
]]></example>
|
]]></example>
|
||||||
<p>Note: There is no payload, because this is a pure notification (the receiver needs to retrieve the vCard using an IQ-get as described earlier.</p>
|
|
||||||
</section2>
|
</section2>
|
||||||
|
|
||||||
</section1>
|
</section1>
|
||||||
|
|
||||||
<section1 topic='vCards of Automated Entities' anchor='apps'>
|
<section1 topic='vCards of Automated Entities' anchor='apps'>
|
||||||
@ -330,6 +504,12 @@
|
|||||||
<p>This document does not require interaction with &IANA;.</p>
|
<p>This document does not require interaction with &IANA;.</p>
|
||||||
</section1>
|
</section1>
|
||||||
|
|
||||||
|
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
|
||||||
|
<section2 topic='Well-Known Service Discovery Nodes' anchor='registrar-nodes'>
|
||||||
|
<p>The ®ISTRAR; shall include 'urn:xmpp:contact' in its registry of Nodes for Service Discovery and Publish-Subscribe at &NODES;.</p>
|
||||||
|
</section2>
|
||||||
|
</section1>
|
||||||
|
|
||||||
<section1 topic='Mapping from vcard-temp to vCard4' anchor='mapping'>
|
<section1 topic='Mapping from vcard-temp to vCard4' anchor='mapping'>
|
||||||
<p>This section provides a more detailed description of mapping vcard-temp properties to vcard4 properties.</p>
|
<p>This section provides a more detailed description of mapping vcard-temp properties to vcard4 properties.</p>
|
||||||
<section2 topic='Properties Defined in vcard-temp but not in vCard3 or vCard4' anchor='mapping-temponly'>
|
<section2 topic='Properties Defined in vcard-temp but not in vCard3 or vCard4' anchor='mapping-temponly'>
|
||||||
@ -589,7 +769,11 @@ OR OTHER DEALINGS IN THE SOFTWARE.
|
|||||||
<photo><uri><xsl:value-of select='EXTVAL'/></uri></photo>
|
<photo><uri><xsl:value-of select='EXTVAL'/></uri></photo>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<photo><uri><xsl:text>data:</xsl:text><xsl:value-of select='TYPE'/><xsl:text>;</xsl:text><xsl:value-of select='BINVAL'/></uri></photo>
|
<photo>
|
||||||
|
<uri>
|
||||||
|
<xsl:text>data:</xsl:text><xsl:value-of select='TYPE'/><xsl:text>;</xsl:text><xsl:value-of select='BINVAL'/>
|
||||||
|
</uri>
|
||||||
|
</photo>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
@ -658,7 +842,10 @@ OR OTHER DEALINGS IN THE SOFTWARE.
|
|||||||
<logo><uri><xsl:value-of select='EXTVAL'/></uri></logo>
|
<logo><uri><xsl:value-of select='EXTVAL'/></uri></logo>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<logo><uri><xsl:text>data:</xsl:text><xsl:value-of select='TYPE'/><xsl:text>;</xsl:text><xsl:value-of select='BINVAL'/></uri></logo>
|
<logo>
|
||||||
|
<uri><xsl:text>data:</xsl:text><xsl:value-of select='TYPE'/><xsl:text>;</xsl:text><xsl:value-of select='BINVAL'/>
|
||||||
|
</uri>
|
||||||
|
</logo>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
@ -735,7 +922,10 @@ OR OTHER DEALINGS IN THE SOFTWARE.
|
|||||||
<sound><uri><xsl:value-of select='EXTVAL'/></uri></sound>
|
<sound><uri><xsl:value-of select='EXTVAL'/></uri></sound>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test='$SOUND.ext=1'>
|
<xsl:when test='$SOUND.ext=1'>
|
||||||
<sound><uri><xsl:text>data:audio/basic;base64,</xsl:text><xsl:value-of select='BINVAL'/></uri></sound>
|
<sound>
|
||||||
|
<uri><xsl:text>data:audio/basic;base64,</xsl:text><xsl:value-of select='BINVAL'/>
|
||||||
|
</uri>
|
||||||
|
</sound>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
@ -873,7 +1063,16 @@ OR OTHER DEALINGS IN THE SOFTWARE.
|
|||||||
<xsl:variable name='PREF.count' select='count(PREF)'/>
|
<xsl:variable name='PREF.count' select='count(PREF)'/>
|
||||||
<xsl:variable name='NUMBER.count' select='count(NUMBER)'/>
|
<xsl:variable name='NUMBER.count' select='count(NUMBER)'/>
|
||||||
<!-- first we count the number of vCard TYPE parameters -->
|
<!-- first we count the number of vCard TYPE parameters -->
|
||||||
<xsl:variable name='TYPE.count' select='$HOME.count + $WORK.count + $TEXT.count + $VOICE.count + $FAX.count + $CELL.count + $VIDEO.count + $PAGER.count + $TEXTPHONE.count'/>
|
<xsl:variable name='TYPE.count'
|
||||||
|
select='$HOME.count
|
||||||
|
+ $WORK.count
|
||||||
|
+ $TEXT.count
|
||||||
|
+ $VOICE.count
|
||||||
|
+ $FAX.count
|
||||||
|
+ $CELL.count
|
||||||
|
+ $VIDEO.count
|
||||||
|
+ $PAGER.count
|
||||||
|
+ $TEXTPHONE.count'/>
|
||||||
<!-- now we output all the parameters -->
|
<!-- now we output all the parameters -->
|
||||||
<xsl:if test='$TYPE.count > 0'>
|
<xsl:if test='$TYPE.count > 0'>
|
||||||
<parameters>
|
<parameters>
|
||||||
|
Loading…
Reference in New Issue
Block a user