mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niklas Gustavsson <nik...@protocol7.com>
Subject Re: [Vysper] Random thoughts on message stanza handling
Date Thu, 03 Sep 2009 08:20:24 GMT
On Thu, Sep 3, 2009 at 10:07 AM, Bernd Fondermann<bf_jak@brainlounge.de> wrote:
>> * How about making MessageStanza.getSubjects() and
>> MessageStanza.getBodies() return a Map<String, String> rather than
>> Map<String, XMLElement>? Looking at the XML schema for <message>, it
>> seems that body and subject elements can only contain text.
>
> the XML schemas are not normative.

The text also states the same thing, see for subject:
http://tools.ietf.org/html/draft-saintandre-rfc3921bis-08#section-5.2.4

"The <subject/> element MUST NOT contain mixed content".

For body, the text is probably the same, but is cut of in the document.

> rather, body elements can actually contain XML, see
> http://xmpp.org/extensions/xep-0071.html

Interesting, that means my suggestion would not work. Retracting my
suggestion :-)

>> * Should we add a StanzaBuilder.createMessageStanza() that takes
>> Map<String, String> for subjects and bodies?
>
> we could. but where do we actually create pristine message stanzas?

Right, might not be all that common.

>> * Also, how about adding a StanzaBuilder.createMessageStanza() that
>> takes a Delay object for adding a delay element?
>
> What would be the use case, MUC history?

Yes, exactly. In this case the delayed delivery is quite simple since
it just a matter of adding on the delay element from the discussion
history.

/niklas

Mime
View raw message