powered by Jive Software

Stanza Error conditionText


I was wondering why in smack-core-> Stanza Error the only conditions that can contain a contionText are “gone” and “redirect”, otherwise it throws an Illegal argument Exception. I can’t find any documentation about this in the XMPP specifications.
Is there some reason why?

Thanks a lot!

Because only those have XML character data defined with their element.

Thanks for your response.

Sorry to bother you, but I am reading Stanza errors in http://xmpp.org/rfcs/rfc6120.html#stanzas-error-syntax and it is true that either gone or redirect conditions have this condition text but I don’t see any closure where it says that the others must not have it.

Sorry, I am just trying to find some documentation about this issue.

Thanks in advance.

You are right, it is not explicitly spelled out. However, it is a best practice to not modify or extend elements you do not own. Hence if you find yourself in the situation where you want to shove things into elements you don’t “own”, then think again. You surely can put whatever it is you want to put in the condition, alongside the condition, where RFC 6120 explicitly mentions an “application-specific condition element”.

This topic was automatically closed 62 days after the last reply. New replies are no longer allowed.