application/iim-poll content type

 

Definition

Poll is a iIM feature by which an iIM user can select a set of iIM users and ask them their opinion about a subject.  The question is generally accompanied by a set of possible answers.  The polster may also leave polled users the ability to enter a custom answer.  Each targeted user receives the poll question and possible answers, and is prompted for an aswer.  Once the answer selected, a reply message containing the answer is sent back to the polster.  The polster's UI usually summarizes the answers.

The application/x-iim-poll content type is used by iPlanet Instant Messaging to describe poll messages.  The application/x-iim-poll-reply content type is used by iPlanet Instant Messaging to describe poll response messages.  Poll and poll response messages contain a single body part of type text/xml.  The DTD describing the xml follows.

The question element contains the text of the question

<!ELEMENT question (#PCDATA) >
The answer element contains one possible answer.  It as a single mandatory attribute called id.  id allows the response not to include the text of the answer, by having the response only include the idendifier.
<!ELEMENT answer (#PCDATA) >
<!ATTLIST answer id CDATA #REQUIRED >
The poll element contains the question and possible answers.  It allows 2 attributes:
<!ELEMENT poll (answer+) (question) >
<!ATTLIST poll
           custom CDATA
           quote ( true | false ) >


The pollr element contains the chosen answer.  It actually does not have to contain any data if the chosen answer is not a custom answer and if "quote" was not used in the poll.  There is one required attribute: answerid, which specifies the answer id.

<!ELEMENT pollr (#PCDATA*) >
<!ATTLIST pollr
           answerid CDATA #REQUIRED >

 

Examples

Example 1

Poll question
<poll>
    <question>what is your favorite color?</question>
    <answer id='001'>blue</answer>
    <answer id='002'>green</answer>
    <answer id='003'>orange</answer>
</poll>
Some valid responses to this poll
<pollr answerid='001' />

<pollr answerid='003' />

Example 2 : with custom answer

Poll question
<poll custom='abcd' >
    <question>what is your favorite color?</question>
    <answer id='001'>blue</answer>
    <answer id='002'>green</answer>
    <answer id='003'>orange</answer>
</poll>
Some valid responses to this poll
<pollr answerid='001' />

<pollr answerid='abcd'>black</pollr>

Example 3 : with quote

Poll question
<poll custom='abcd' quote='true' >
    <question>what is your favorite color?</question>
    <answer id='001'>blue</answer>
    <answer id='002'>green</answer>
    <answer id='003'>orange</answer>
</poll>
Some valid responses to this poll
<pollr answerid='002'>green</pollr>

<pollr answerid='abcd'>black</pollr>