Here is the revision of the microblogging XEP update proposition after *Waqas
Hussain* suggestion for <jid /> element replacement (XML changes are set in
bold):

----------------------------------------------------------------------------------------------------------------------------------------------------------------

*1/ Add "2.6 Repeating a Post" part*

When Benvolio wants to repeat a Romeo's post, his client basically publishes
the same post under a different name. But to be able to track the repeated
post original author and comments feed, Benvolio's client MAY use two
specific <author /> child nodes, <name /> and <uri />, containing,
respectively, the name of the original post author, and his XMPP URI (JID).

If a comments link is present (see 2.8), the client SHOULD repeat it to keep
the same discussion about the post.

*Example 4. Repeating a Post*

<iq from='benvo...@montague.lit/mobile'

    id='pub2'
    to='benvo...@montague.lit'

    type='set'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>

    <publish node='urn:xmpp:microblog:0'>

      <item id='1re57d3c-1q46-11dd-748r-024943d2d5rt'>

        <entry xmlns='http://www.w3.org/2005/Atom'>

          <source>
            <title>Benvolio&amp;apos;s Microblog</title>

            <link href='http://montague.lit/benvolio'/>

            <id>tag:montague.lit,2008:home</id>
            <updated>2008-05-08T18:30:02Z</updated>

            <author>
              <name>Romeo Montague</name>
*
              <uri>xmpp:ro...@montague.lit</uri>*

            </author>
          </source>
          <title>hanging out at the Caf&amp;#233; Napolitano</title>

          <link rel='alternate'

                type='text/html'
                href='
http://montague.lit/benvolio/posts/1re57d3c-1q46-11dd-748r-024943d2d5rt'/>

          <link rel='alternate'
                href='xmpp:benvo...@montague.lit?;

                      node=urn%3Axmpp%3Amicroblog%3A0;
                      item=1re57d3c-1q46-11dd-748r-024943d2d5rt'/>


<id>tag:montague.lit,2008-05-08T18:31:21Z:posts-1re57d3c-1q46-11dd-748r-024943d2d5rt'</id>

          <published>2008-05-08T18:30:02Z</published>
          <updated>2008-05-08T18:32:02Z</updated>

        </entry>
      </item>
    </publish>

  </pubsub>
</iq>

In this way, a different author JID lets the client know the microblog owner
is not the original post author.

*2/ Add a "2.7 Attaching files to a Post" part*

Romeo might want to attach some files, such as pictures of his last
vacations, or documents he wants to share. For each file to publish, Romeo's
client MUST add a <link /> element. The href and rel attributes MUST be
added ; the title, type and length ones MIGHT be added.

*Example 5. Attaching some files to a Post*

<iq from='ro...@montague.lit/pda'

    id='pub3'
    to='ro...@montague.lit'

    type='set'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>

    <publish node='urn:xmpp:microblog:0'>

      <item id='1df87v1q-2d12-43se-761w-318790d3g1sq'>

        <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:35:02Z</updated>

            <author>
              <name>Romeo Montague</name>

            </author>
          </source>
          <title>Beautiful Eiffel Tower!</title>

          <link rel='alternate'
                type='text/html'

                href='
http://montague.lit/romeo/posts/1df87v1q-2d12-43se-761w-318790d3g1sq'/>

          <link rel='alternate'
                href='xmpp:ro...@montague.lit
?;node=urn%3Axmpp%3Amicroblog%3A0;item=1df87v1q-2d12-43se-761w-318790d3g1sq'/>

          <link rel='enclosure'

                title='Head in the clouds'
                type='image/jpeg'

                length='156732'
                href='http://montague.lit/romeo/files/uei8327hdz12.jpg'>

*                <link rel='self'
                     title='thumb'
                     type='image/jpeg'
                     length='31723'
                     href='
http://montague.lit/romeo/files/uei8327hdz12_thumb.jpg'/>*

          </link>

          <link rel='enclosure'

                title='Trip report'
                type='application/pdf'

                length='67123'
                href='http://montague.lit/romeo/files/82he1oh2084s.pdf'/>


<id>tag:montague.lit,2008-05-08T18:35:02Z:posts-1df87v1q-2d12-43se-761w-318790d3g1sq</id>

          <published>2008-05-08T18:35:02Z</published>
          <updated>2008-05-08T18:35:02Z</updated>

        </entry>
      </item>
    </publish>

  </pubsub>
</iq>

If client can generate some thumbnails images of the attached file (for
pictures, videos or documents), it MAY create one or more <link />
sub-elements to the parent file <link /> element. It MUST set *rel*attribute to
*self* ; *title* attribute to *thumb* ; *href* to the path of the thumbnail
image. It SHOULD also have a *type* attribute specifying the thumbnail file
MIME type.

*3/ Add a "2.8 Commenting a Post" part*

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 be related ; title MUST
be comments (to let the client know about the comments element) ; href MUST
be an XMPP URI.

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 open pubsub#access_model and pubsub#publish_model (see
http://xmpp.org/extensions/xep-0060.html#owner-create-and-configure).

*Example 6. Adding a comments link to a Post*

<iq from='ro...@montague.lit/pda'

    id='pub4'
    to='ro...@montague.lit'

    type='set'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>

    <publish node='urn:xmpp:microblog:0'>

      <item id='2ze57d9c-1c46-21df-830c-002143d3d2qgf'>

        <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:30:02Z</updated>

            <author>
              <name>Romeo Montague</name>

            </author>
          </source>
          <title>hanging out at the Caf&amp;#233; Napolitano</title>

          <link rel='alternate'
                type='text/html'

                href='
http://montague.lit/romeo/posts/2ze57d9c-1c46-21df-830c-002143d3d2qgf'/>

          <link rel='alternate'
                href='xmpp:ro...@montague.lit
?;node=urn%3Axmpp%3Amicroblog%3A0;item=2ze57d9c-1c46-21df-830c-002143d3d2qgf'/>

          <link rel='related'
                title='comments'

                href='xmpp:ro...@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>

          <published>2008-05-08T18:38:02Z</published>
          <updated>2008-05-08T18:38:02Z</updated>

        </entry>
      </item>
    </publish>

  </pubsub>
</iq>

If Juliet wants to comment Romeo's latest post, her client MUST then send a
new Atom entry to the defined PubSub node.

*Example 7. Adding a comment to a comments node*


<iq from='jul...@capulet.lit/pc'

    id='comment1'
    to='jul...@capulet.lit'

    type='set'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>

    <publish
node='urn:xmpp:microblog:0:comments:dd88c9bc58886fce0049ed050df0c5f2'>

      <item id='b2106a80de39ef5ec6b8f7b69cb610c2'>

        <entry xmlns='http://www.w3.org/2005/Atom'>

          <source>
            <author>
              <name>Juliet Capulet</name>

*              <uri>xmpp:jul...@capulet.lit</uri>*
            </author>

          </source>
          <title>She is so pretty!</title>

          <published>2008-05-08T18:39:02Z</published>
        </entry>

      </item>
    </publish>
  </pubsub>
</iq>


If Benvolio wants to retrieve the comments node, his client will send a
standard PubSub stanza to request all items (see:
http://xmpp.org/extensions/xep-0060.html#subscriber-retrieve-requestall).

----------------------------------------------------------------------------------------------------------------------------------------------------------------

Hope it is better now,


*Valérian Saliou, the Jappix project founder.*

Reply via email to