Revision History | ||
---|---|---|
Revision $Revision: 1.3 $ | $Date: 2003/10/16 21:55:02 $ | $Author: wyldebeast $ |
Initial draft |
Table of Contents
!ELEMENT questionnaire (description, author?, rendering?, questionnaire-flow, answer-set?, section*) !ATTLIST questionnaire id ID #REQUIRED name CDATA #REQUIRED version CDATA #IMPLIED
!ELEMENT rendering EMPTY !ATTLIST rendering class (Item|Section|Questionnaire) "Section" number CDATA #IMPLIED timeout CDATA #IMPLIED timed (true|false) "false" section-random-order (true|false) "false" item-random-order (true|false) "false" answer-random-order (true|false) "false" random-select CDATA #IMPLIEDAlthough you might wonder what rendering information is doing in then XML definition, we need to define at least _some_ rendering information. Again, it is up to the implementing application to decide what to do with this info.
What constitutes a page: item, section or questionnaire.
How many of them per page
Should timing info be kept? This would maintain time information per page. See the section on timing for more details
Should the page time out?
Should sections be randomly ordered?
Should items be randomly ordered?
Should answers be randomly ordered?
Select a number of 'things' from the rendering class; if class is Section, this means a number of items, if class is Questionnaire, it is a number of sections. The value for this attribute is the number of 'things' to select.
!ELEMENT questionnaire-flow ( flow-choice* ) !ATTLIST questionnaire-flowThe questionnaire flow holds all the flow choices. This means information on skipping certain items. The element is a container for flow choices.
!ELEMENT answer-set (answer*)The answer-set is a container of predefined answer sets.
!ELEMENT section (description, author?, item*) !ATTLIST section id ID #REQUIRED name CDATA #IMPLIEDThe section element is the second organizational unit, next to the questionnaire. The use is very simple: if you need sections, here's your tag. If you don't, you'll have to specify at least one section, to contain your questions.
!ELEMENT item (question, description, answer, item*, client-side-action*) !ATTLIST item id ID #REQUIRED label CDATA #REQUIRED type ( multiple-select | single-select | open | custom ) "open" custom-type CDATA #IMPLIED render-type (radio | select | check | text | textbox ) #REQUIRED category CDATA #IMPLIED weigth CDATA #IMPLIED required (true|false) "false" semi-close (true|false) "false" semi-close-prefix CDATA #IMPLIEDThe item may well be the core element of the questionnaire: it contains the actual question and it's possible answers (or references to them).
Unique id within the questionnaire
Must be unique within the scope of a questionnaire. This can be used as a variable name in the naming of elements and in javascript code.
What kind of question is this? In case of custom, it's up to the the user to define the required action in this case. The custom-type can than be used to provide a user specified type.
User defined type.
One of: radio, select, check, text, textbox. We couldn't think of any other, but let us know.
Assign a category to this question. This can be used for example to measures scores over a full questionnaire per category.
Assign a weight to this question. Can be used to calculate overall score for a questionnaire. See the section on scores.
Is the question required
Can be used to tell the renderer to render an extra text field.
What to ask with the open text field.
!ELEMENT question (#PCDATA) !ATTLIST questionThis element holds the text for the actual question.
!ELEMENT answer (label?, description?, option*) !ATTLIST answer id ID #IMPLIED ref-id CDATA #IMPLIED tooltip CDATA #IMPLIED default CDATA #IMPLIED size CDATA #IMPLIED mask CDATA #IMPLIEDThe answer holds either a list of possible answers to a question (options), or a reference to a pre-defined answer set.
!ELEMENT option (#PCDATA) !ATTLIST option value CDATA #REQUIRED score CDATA #IMPLIEDThe option is a possible answer to a question. The value is in fact an id to this option, used in data storage. The score attribute can be used to assign a score (numeric) to an answer, and to calculate overall score for a questionnaire.
!ELEMENT flow-choice (description) !ATTLIST flow-choice id ID #REQUIRED from IDREF #REQUIRED to IDREF #IMPLIED condition CDATA #IMPLIED left CDATA #IMPLIED operator CDATA #IMPLIED right CDATA #IMPLIEDFlow choice elements define information on what path should be followed through the questionnaire. Without any flow control, the items are beeing displayed in the order they are defined in the XML file. A single flow-choice tells a questionnaire when to go from one item to another item. Suppose there are a set of items defined, in a single section. They are named (id and label are identical for ease and convieniance) s1i1 to s1i10. Here are some examples on flow-choice flow-choice id=fc1 from=s1i2 to=s1i4 left=s1i1 operator="==" right=2 descriptionthis will skip s1i3 if the answer given at s1i1 equals to 2/description/flow-choice flow-choice id=fc2 from=s1i3 to=s1i6 left= operator="true" right= descriptionthis will always skip from s1i3 to s1i6. something like an unconditional jump/description/flow-choice flow-choice id=fc3 from=s1i6 to=s1i10 left=s1i6 operator="IN" right="1,3,5,7,9" descriptionthis will allow a jump from s1i6 to s1i10 if s1i6 equals 1,3,5,7 or 9/description/flow-choice More examples can (eventually) be found in the test questionnaire 'test-flowchoice.xml'
The unique id of this element
The id of the item for which this flow-choice defines whether it should jump (or not)
The id of the item where the questionnaire should jump to if the conditions of this flow-choice are met.
Obsolete, as in not used right now. If we decide to build a parser, this attribute will hold a single string representing the condition for wich the flow-choice must be activated.
The left part of the condition for this flow-choice. usually the label of an item.
The operator part of the condition for this flow-chioce ( , , ==, !=, =, =, IN, true )
The right part of the condition for this flow choice. Usually the value of an option.