On Mon, May 19, 2008 at 5:25 AM, Jehan wrote:
> I was thinking about a real estate website where I
> subscribe to receive emails when they got a
> garage close to my apartment and under
> a given price.
If you were using XEP-0060 wouldn't you just do this by adding something
like a "query-string" field to the node configuration form? See possible
stanza below:

<iq type="set" to="xmpp.example.com" id="sub1">
  <pubsub xmlns="http://jabber.org/protocol/pubsub";>
    <subscribe
        node="real-estate"
        jid="[EMAIL PROTECTED]">
    <options>
      <x xmlns="jabber:x:data" type="submit">
        <field var="FORM_TYPE" type="hidden">
          <value>http://jabber.org/protocol/pubsub#subscribe_options</value>
        </field>
*        <field var="title">
          <value>Possible Garage</value>
        </field>
        <field var="query-string">
          <value><![CDATA[ (price .lt. $500) & (size .eq. large)]></value>
        </field>
** *     </x>
      </options>
    </subscribe>
  </pubsub>
</iq>

bob wyman

On Mon, May 19, 2008 at 5:25 AM, JabberForum <[EMAIL PROTECTED]>
wrote:

>
> I think this kind of feature has already been discussed mixed with other
> topics. But I wanted to discuss it here.
>
> Currently you can configure your subscription (theoritically in the XEP
> at least) very basically. Like "I want to receive the whole items,
> nothing, the whole body or only an excerpt, etc.). But if you want to
> have advanced configuration, you could "play" with subnodes, but this is
> very limited. A tag and category system would be advantageous.
>
> Let me give the examples I was dealing with when I thought about this
> all. First a blog with pubsub as I am writing a Wordpress plugin:
> currently my plugin enables only to subscribe to all the posts, or all
> the comments, or the comments of a given post (or absolutely everything
> of course). For this, I made a global container node (let's call it G).
> In this one, I have 2 subnodes:
> - a leaf node with all the posts (P);
> - a container node for comments (C), with inside leaf nodes for each
> posts (P1, P2, etc.).
>
> So if I want to subscribe to everything, I subscribe to G, G/P for only
> posts, G/C for all comments, and for instance G/C/P3 for all comments of
> post 3 (these are not really the node names I chose of course).
>
> Imagine you want to provide a way to subscribe only to some categories.
> For instance I like the blog posts of a guy about philosophy, but I
> don't care when he speaks about nuclear physics because I don't
> understand at all what he writes. Of course you could "emulate"
> categories with subnodes once again; but then when a post belongs to
> several categories, it will be copied to several nodes (and when
> modified, don't forget to sync all "copies"); moreover if you subscribe
> to both categories, you will receive the same publication several
> times.
> So the (or at least one) solution would be that all posts are in the
> same nodes, but they can be categorized. So a subscriber subscribes to
> the P node, then configure which categories interest him. And then the
> "decision" to notify a subscriber will be done at server side. Each time
> a new publication is done, the server will send it to any person whose
> configuration agrees.
>
> This can be done with categories, with tags, but also with authors (on
> multi-author blogs), etc. In fact the better system would allow
> flexibility.
>
> You will do such configuration through your Jabber client, but also my
> blog can generate such link:
> xmpp:
> pubsub.zemarmot.net?action=subscribe;node=home/zemarmot.net/jehan/blog/posts;categories=Jabber,Linux;tag=en
>
> If I click this link, my Jabber client will propose me to subscribe to
> the given node and configure it to receive only posts categorized under
> "Jabber" and "Linux", and tagged as "en" (because I would not speak any
> other language).
>
> Another instance: I was thinking about a real estate website where I
> subscribe to receive emails when they got a garage close to my
> appartment and under a given price. Why couldn't such configuration be
> available on a pubsub node which contains items to sell. And you
> configure your subscription to be notified only about items which
> interest you (under some price for instance, and in some category).
>
> What do you think of it?
>
>
> --
> Jehan
> ------------------------------------------------------------------------
> Jehan's Profile: http://www.jabberforum.org/member.php?userid=16911
> View this thread: http://www.jabberforum.org/showthread.php?t=95
>
>

Reply via email to