Re: Polls

Stephen Paul Weber <[email protected]>
Newsgroups gmane.network.jabber.standards-jig
Message-ID <[email protected]>
I have also been thinking about implementing polls for some time. For polls 
in the context of a chat (1:1 or MUC) this is my proposal:

XEP-0004 says the following:

> The <x/> element qualified by the 'jabber:x:data' namespace SHOULD be 
> included either directly as a first-level child of a <message/> stanza or 
> ...

> The full context for the data is provided by three things ... the place of 
> the form within ... structured conversation (e.g., a message <thread/>)

> For <message/> stanzas, the <thread/> SHOULD be copied in the reply if 
> provided. The <x/> element qualified by the 'jabber:x:data' namespace MUST 
> be a child of the <message/> stanza.

This gives us a very natural poll transport mechanism, as follows:

	<message id="poll1" type="groupchat" from="romeo">
		<x xmlns="jabber:x:data" type="form">
			<field var="FORM_TYPE" type="hidden"><value>urn:...polls</value></field>
			<field var="q" label="A or B?" type="list-single">
				<option><value>A</value></option>
				<option><value>B</value></option>
			</field>
		</x>
		<thread>poll-uuid</thread>
	</message>

	<message id="pollresponse1" type="groupchat" from="juliet">
		<x xmlns="jabber:x:data" type="submit">
			<field var="FORM_TYPE" type="hidden"><value>urn:...polls</value></field>
			<field var="q" label="A or B?" type="list-single">
				<value>A</value>
			</field>
		</x>
		<thread>poll-uuid</thread>
	</message>

_______________________________________________
Standards mailing list -- [email protected]
To unsubscribe send an email to [email protected]
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEWeaCw+rzmiEMpzU00RwpEc5RnN4FAmktqu4ACgkQ0RwpEc5R
nN67aA//cL3OkRdDN5cKRGRvA0WCgjNTn8mNsMwRwTC43rpc0VQm95Ln9gLcfXBt
mPIscKySJ6PPBvAi8/ARazZSk73TIJ5x4lg3N/eTsPTmc7emR0l62XUGHE7qulon
nm42aQ3EES990a4Es8K+g0z7vgP1/KwvWFkw0XKOwRDlDoMLLJDNp5LC/g3Jn35i
K+J0pEXiS7DXs23beRPG3OkSdr7Cix3HqdUiRqktS1vDM/tYYwYHTRjYoYLvf1Gx
0pvYr2fjjI8l0gm036F8Dq/pSKcvSTf0jfGProb5vrnDyiwzj3T4wJ1QzZ7gziE2
ea2MN0p05Q40cKrbzwam67jVGOZ6uOLW3dwWRfsBQR1JScdUYb/zSL0E20M5f1yJ
JGUbmjB4ODuGy0foEMXAwb7hIxUZwxGWXLvrcVhD5nvAAKezPAjep1DgXpONM9z7
qBXIoD6QDx0PZzwvjsjlIWsb8DziLIGP982SMBNjINMOePGa3ea5XXzfzLk51Rm4
+Z9ZiAxv73utcTA2I/bR4/0WjtKMkEW8sDZqVUtQG0Gg2BeTnb7lsUB2UBNIchpA
LPD4M+U0suBRraabFob5DwIaXkjCTnpvcHrmeLOcpbjE5DNR3Tws3wPqFFqwFjiZ
ISB2GaITJpOReFoRoUpIutM1jpfSgbHbLHRy8/gUfKI47qorAjo=
=5BoB
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.