[Standards-JIG] JEP-0079 (AMP): conditions reversed?

Ralph Meijer jabber.org at ralphm.ik.nu
Tue May 31 21:09:47 UTC 2005


On Tue, May 31, 2005 at 03:50:31PM -0500, Peter Saint-Andre wrote:
> On Tue, May 31, 2005 at 12:57:16PM +0200, Ralph Meijer wrote:
> > [..]
>
> We probably need more narrative text to explain these examples.
> 
> In Example 10, the sender specified two rules:
> 
>   1. Deliver the message by 2004-09-10T08:33:14Z, but if you can't then
>      send me an error report:
> 
>      <rule condition='expire-at' 
>            value='2004-09-10T08:33:14Z'
>            action='error'/>
> 
>   2. Deliver the message only to <francisco at hamlet.lit/pda>, but if you
>      can't then send me an error report:
> 
>      <rule condition='match-resource' 
>            value='exact' 
>            action='error'/>
> 
> Example 11 is intended to illustrate what would happen if rule 2 were
> matched (e.g., the "pda" resource went offline) -- the server would send
> a message error to the sender.
> 
> I see what you mean about this seeming to be counter-intuitive -- you'd
> prefer the rule to be "send me an error if the resource is other" rather
> than "deliver to that exact resource, otherwise send me an error". But
> the two work out to be the same thing, no?

Well, yes. I understand that that is what was intended, but the
prose on what the 'match-resource' and 'deliver' conditions mean state
the exact reverse. This is the text for 'match-resource':

    The "match-resource" condition is used to restrict delivery based on the
    resource identifier of the recipient JID.

    The possible contents for this condition are:

    [table 2]

    The condition is met if the resource for the actual destination JID
    matches the specified destination JID using the above rules. For
    instance, if a message is intended for "romeo at montague.net/work" with
    the "match-resource" condition of "other", the condition is met if the
    message can be immediately delivered only to "romeo at montague.net/home".

So your example above does not comply with this text. It states that
'exact' means that if the message *can* be delivered to the intended
resource, the action is performed!

Please note that I prefer how the example works, not the explaining
prose.

> > Also, what happens in the case when the default action is offline
> > storage? Does the resource still match?
> 
> Let's say that the sender in Example 10 wanted the message to be
> delivered only to that exact resource, otherwise the message is to be
> dropped. The rule would specify a condition of "deliver", a value of
> "direct", and an action of "drop":
> 
>      <rule condition='deliver' 
>            value='direct' 
>            action='drop'/>
> 
> Which means: deliver the message directly to the 'to' address, otherwise
> drop it. It doesn't mean "if you can deliver the message directly to
> that address, then drop the message" -- that wouldn't make any sense.
> ;-)

Ah, but I meant: what happens in (all) the match-resource conditions for
messages that will be stored offline...

> > I think only the expire-at condition is correctly defined, and that the
> > others should be reversed in their meaning.
> 
> I think these are two ways of looking at the same thing. But I might be 
> wrong. Perhaps the primary author could shed some light on the matter...

That would help, too.

-- 
Groetjes,

ralphm



More information about the Standards mailing list