CMFQuestionnaire uses an XML string for representing the
questionnaire internally. This decision was made in order to
prevent cluttering Plone with many types.

There are two XML strings in the questionnaire: one is for
representing the empty questionnaire form (called 'body' in
the Archetypes schema) and the other for the filled forms
that were submitted (called 'answers' in the Archetypes
schema).

The XML hierarchy for the empty questionnaire form is structured
as follows (the elements marked with an asterisk can be
repeated, for example a questionnaire may contain more than
one group):

- element 'questionnaire'

  - element 'group' *

    - attribute 'id'

      when using the 'design' tab the identifier will be
      automatically assigned such that each identifier starts
      with a 'g' and groups are numbered incrementally

    - attribute 'scale'

      number of possible answers to the questions in this
      group, lower limit is always 1

    - element 'title'

      - content: group title 

    - element 'description'

      - content: group description

    - element 'legend'

      explanations of all options that can be selected as answers

      - element 'option' *

        there must be 1 'option' tag for each option

        - content: explanation of option

        - attribute 'value'

          number of option ('1' to 'scale')

    - element 'question' *

      - attribute 'id'

        when using the 'design' tab the identifier will be
        automatically assigned such that each identifier
        starts with a 'q' and questions are numbered
        incrementally among all groups (questions in
        different groups still can not have the same id)

      - element 'text'

        - content: the question text

The XML hierarchy for storing submitted forms is structured
as follows:

- element 'answers'

  - element 'form' *

    one for each filled questionnaire

    - attribute 'id'

      username or ticket used to fill out the questionnaire

    - element 'question' *

      - content: number of selected answer to this question

      - attribute 'id'

        id of question (same as in master form)

    - element 'comment'

      - content: the text which the person has written as
        comment when filling out

When the report is generated, the master (empty) form will be
used for storing the results. For this, each 'question' element
will get the following extra elements and attributes:

- attribute 'answered'

  number of people who answered this question

- attribute 'average'

  weighted average of answers

- element 'answer' *

  for each selected answer to this question

  - content: number of selected answer to the question

  - attribute 'count'

    how many people selected this answer

  - attribute 'percent'

    what is the percentage of this answer
