1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-22 01:02:17 -05:00

Updated XEP-0277 to 0.2.1 version.

This commit is contained in:
Vanaryon 2011-04-24 15:53:12 +02:00 committed by stpeter
parent 10cf759404
commit a0acb7c6c9

View File

@ -27,6 +27,12 @@
<jid>vanaryon@jappix.com</jid>
<uri>http://vanaryon.eu/</uri>
</author>
<revision>
<version>0.2.1</version>
<date>2011-04-24</date>
<initials>vs</initials>
<remark><p>Comments link "link[rel=related]" is now "link[rel=replies]", "title" is now "content[type=text]" or "content[type=xhtml]", added geolocation feature.</p></remark>
</revision>
<revision>
<version>0.2</version>
<date>2011-04-20</date>
@ -76,6 +82,7 @@ xmpp:romeo@montague.lit?;node=urn%3Axmpp%3Amicroblog%3A0
</section2>
<section2 topic='Publishing a Post' anchor='publish'>
<p>Romeo can publish a post via any interface provided by his service, such as a website, the Atom Publishing Protocol (see &rfc5023;), SMS, an IM bot, or XMPP pubsub. Here we assume that the post is provided via XMPP pubsub.</p>
<p>The post content itself can be either text ("content" element "type" attribute with "text" value) or XHTML ("content" element "type" attribute with "xhtml" value). If Romeo publishes XHTML content, the post's "body" element MUST be plain text encoded. For XHTML publishing, see &xep0060;.</p>
<p>Note: Publishing via HTTP, AtomPub, SMS, or IM bot is simpler for the client (e.g., because the client does not need to generate an Item ID).</p>
<example caption="Publishing a post"><![CDATA[
<iq from='romeo@montague.lit/pda'
@ -96,7 +103,7 @@ xmpp:romeo@montague.lit?;node=urn%3Axmpp%3Amicroblog%3A0
<uri>xmpp:romeo@montague.lit</uri>
</author>
</source>
<title>hanging out at the Caf&amp;#233; Napolitano</title>
<content type='text'>hanging out at the Caf&amp;#233; Napolitano</content>
<link rel='alternate'
type='text/html'
href='http://montague.lit/romeo/posts/1cb57d9c-1c46-11dd-838c-001143d5d5db'/>
@ -133,7 +140,7 @@ xmpp:romeo@montague.lit?;node=urn%3Axmpp%3Amicroblog%3A0
<uri>xmpp:romeo@montague.lit</uri>
</author>
</source>
<title>hanging out at the Caf&amp;#233; Napolitano</title>
<content type='text'>hanging out at the Caf&amp;#233; Napolitano</content>
<link rel='alternate'
type='text/html'
href='http://montague.lit/romeo/posts/1cb57d9c-1c46-11dd-838c-001143d5d5db'/>
@ -172,7 +179,7 @@ xmpp:romeo@montague.lit?;node=urn%3Axmpp%3Amicroblog%3A0
<uri>xmpp:romeo@montague.lit</uri>
</author>
</source>
<title>@romeo cappuccino this late in the day?</title>
<content type='text'>@romeo cappuccino this late in the day?</content>
<link rel='alternate'
type='text/html'
href='http://montague.lit/benvolio/posts/c4145006-1c53-11dd-b2d5-000bcd82471e'/>
@ -220,7 +227,7 @@ xmpp:romeo@montague.lit?;node=urn%3Axmpp%3Amicroblog%3A0
<uri>xmpp:romeo@montague.lit</uri>
</author>
</source>
<title>hanging out at the Caf&amp;#233; Napolitano</title>
<content type='text'>hanging out at the Caf&amp;#233; Napolitano</content>
<link rel='alternate'
type='text/html'
href='http://montague.lit/benvolio/posts/1re57d3c-1q46-11dd-748r-024943d2d5rt'/>
@ -258,7 +265,7 @@ xmpp:romeo@montague.lit?;node=urn%3Axmpp%3Amicroblog%3A0
<uri>xmpp:romeo@montague.lit</uri>
</author>
</source>
<title>Beautiful Eiffel Tower!</title>
<content type='text'>Beautiful Eiffel Tower!</content>
<link rel='alternate'
type='text/html'
href='http://montague.lit/romeo/posts/1df87v1q-2d12-43se-761w-318790d3g1sq'/>
@ -295,7 +302,7 @@ xmpp:romeo@montague.lit?;node=urn%3Axmpp%3Amicroblog%3A0
</section1>
<section1 topic='Comments' anchor='comments'>
<p>Juliet and Benvolio may want to discuss about latest Romeo's post. Romeo's client MIGHT add a <link /> element to the PubSub item. The element MUST have "rel", "title" and "href" attributes, where "rel" MUST have the "related" value; "title" MUST have the "comments" value; "href" MUST be an XMPP URI (see &rfc5122; and &rfc3986;).</p>
<p>Juliet and Benvolio may want to discuss about latest Romeo's post. Romeo's client MIGHT add a <link /> element to the PubSub item. The element MUST have "rel", "title" and "href" attributes, where "rel" MUST have the "replies" value; "title" MUST have the "comments" value; "href" MUST be an XMPP URI (see &rfc5122; and &rfc3986;).</p>
<section2 topic='Comments node' anchor='comments_node'>
<p>We assume Romeo's client first created a comments node (named "urn:xmpp:microblog:0:comments:hash", where "hash" is a client-side generated random hash), with defaults "pubsub#access_model" and "pubsub#publish_model" privacy settings (see &xep0060; for node creation and configuration).</p>
<example caption="Adding a comments link to a Post"><![CDATA[
@ -317,13 +324,13 @@ xmpp:romeo@montague.lit?;node=urn%3Axmpp%3Amicroblog%3A0
<uri>xmpp:romeo@montague.lit</uri>
</author>
</source>
<title>hanging out at the Caf&amp;#233; Napolitano</title>
<content type='text'>hanging out at the Caf&amp;#233; Napolitano</content>
<link rel='alternate'
type='text/html'
href='http://montague.lit/romeo/posts/2ze57d9c-1c46-21df-830c-002143d3d2qgf'/>
<link rel='alternate'
href='xmpp:romeo@montague.lit?;node=urn%3Axmpp%3Amicroblog%3A0;item=2ze57d9c-1c46-21df-830c-002143d3d2qgf'/>
<link rel='related'
<link rel='replies'
title='comments'
href='xmpp:romeo@montague.lit?;node=urn%3Axmpp%3Amicroblog%3A0%3Acomments%3Add88c9bc58886fce0049ed050df0c5f2'/>
<id>tag:montague.lit,2008-05-08T18:38:02Z:posts-2ze57d9c-1c46-21df-830c-002143d3d2qgf</id>
@ -353,7 +360,7 @@ xmpp:romeo@montague.lit?;node=urn%3Axmpp%3Amicroblog%3A0
<uri>xmpp:juliet@capulet.lit</uri>
</author>
</source>
<title>She is so pretty!</title>
<content type='text'>She is so pretty!</content>
<published>2008-05-08T18:39:02Z</published>
</entry>
</item>
@ -365,8 +372,57 @@ xmpp:romeo@montague.lit?;node=urn%3Axmpp%3Amicroblog%3A0
</section2>
</section1>
<section1 topic='Geotagging' anchor='geotagging'>
<p>Juliet may want to know which places are Romeo's notices related to. That's why Romeo's client MIGHT geotag microblog entries, using the &xep0080; protocol for storing geolocation informations.</p>
<p>Romeo's client MUST create a "geoloc" element, with the &xep0080; reference namespace: "http://jabber.org/protocol/geoloc".</p>
<example caption="Geotagging a Post"><![CDATA[
<iq from='romeo@montague.lit/mobile'
id='pub5'
to='romeo@montague.lit'
type='set'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<publish node='urn:xmpp:microblog:0'>
<item id='1zr23z8a-3g12-34fh-750b-120867gjc1sqh'>
<entry xmlns='http://www.w3.org/2005/Atom'>
<source>
<title>Romeo&amp;apos;s Microblog</title>
<link href='http://montague.lit/romeo'/>
<id>tag:montague.lit,2008:home</id>
<updated>2008-05-08T18:43:01Z</updated>
<author>
<name>Romeo Montague</name>
<uri>xmpp:romeo@montague.lit</uri>
</author>
</source>
<content type='text'>Is lost in the forest. Need help!</content>
<link rel='alternate'
type='text/html'
href='http://montague.lit/romeo/posts/1zr23z8a-3g12-34fh-750b-120867gjc1sqh'/>
<link rel='alternate'
href='xmpp:romeo@montague.lit?;node=urn%3Axmpp%3Amicroblog%3A0;item=1zr23z8a-3g12-34fh-750b-120867gjc1sqh'/>
<link rel='replies'
title='comments'
href='xmpp:romeo@montague.lit?;node=urn%3Axmpp%3Amicroblog%3A0%3Acomments%3A36ec6dfe61e52b1e2cdb248823520233'/>
<id>tag:montague.lit,2008-05-08T18:43:01Z:posts-1zr23z8a-3g12-34fh-750b-120867gjc1sqh</id>
<published>2008-05-08T18:43:01Z</published>
<updated>2008-05-08T18:43:01Z</updated>
<geoloc xmlns="http://jabber.org/protocol/geoloc">
<lat>48.171761</lat>
<lon>-3.3667986</lon>
<country>France</country>
<countrycode>FR</countrycode>
<region>Brittany</region>
</geoloc>
</entry>
</item>
</publish>
</pubsub>
</iq>
]]></example>
</section1>
<section1 topic='Message Body' anchor='body'>
<p>Depending on service policies and the value of the "pubsub#include_body" node configuration option, microblogging notifications SHOULD include a message &lt;body/&gt; element for backwards-compatibility with Jabber clients that are not pubsub-capable. It is RECOMMENDED for the XML character value of the &lt;body/&gt; element to be the same as that of the &lt;title/&gt; child of the Atom &lt;entry/&gt;.</p>
<p>Depending on service policies and the value of the "pubsub#include_body" node configuration option, microblogging notifications SHOULD include a message &lt;body/&gt; element for backwards-compatibility with Jabber clients that are not pubsub-capable. It is RECOMMENDED for the XML character value of the &lt;body/&gt; element to be the same as that of the &lt;content/&gt; child of the Atom &lt;entry/&gt;.</p>
</section1>
<section1 topic='Security Considerations' anchor='security'>