Example Branching XML

Below is an example of Branching XML rules, all the item IDs in here are samples. Below are the instructions on what is required in the XML and a sample of how the XML should appear.

1. The <group> element is mandatory and is equivalent to a section in Surpass (Test Creation). The sectionID attribute is mandatory and must contain the ID of the section it is linked with in Surpass (Test Creation).
2. <presentation> represents a single item or a group of items to be presented. For a single item, the item attribute is a must and should be the ID of one of the items in the corresponding section. For grouped items, the parent <presentation> node won't have an item attribute.
3. <selection> is a mandatory plugin attribute and should always be set to selectionSequential, no other value is supported. selectionSequential attribute is interpreted as top to bottom.
4. <condition> is an optional element. The first <presentation> element shouldn't have a condition element. For grouped items the <condition> is only at parent level.    


<?xml version="1.0"?>
<xxl version="1.30">
<group template="tmpSurvey" name="groupSurveyPHR" sectionID="1">
<selection plugin="selectionSequential"/>
<presentation item="334P1200"/>
<presentation item="334P1201">
<condition>(getResponse("334P1200") = "A") OR (getResponse("334P1200") = "B")</condition>
</presentation>
<presentation item="334P1203">
<condition>(getResponse("334P1200") = "A" OR (getResponse("334P1200") = "B")</condition>
</presentation>
<presentation template="tmpSurveyff_5items_4lines">
<condition>(getResponse("334P1200") = "A") or (getResponse("334P1200") = "B")</condition>
<presentation item="2214P1201" area="item1"/>
<presentation item="2214P1202" area="item2"/>
<presentation item="2214P1203" area="item3"/>
<presentation item="2214P1204" area="item4"/>
<presentation item="2214P1205" area="item5"/>
</presentation>
<presentation template="tmpSurveyff_6items_6lines">
<condition>(getResponse("334P1200") = "A") or (getResponse("334P1200") = "B")</condition>
<presentation item="2214P1301" area="item1"/>
<presentation item="2214P1302" area="item2"/>
<presentation item="2214P1303" area="item3"/>
<presentation item="2214P1304" area="item4"/>
<presentation item="2214P1305" area="item5"/>
<presentation item="2214P1306" area="item6"/>
</presentation>
<presentation item="6454P006">
<condition>(getResponse("334P1200") = "A" OR (getResponse("334P1200") = "B")</condition>
</presentation>
<presentation item="6454P007">
<condition>(getResponse("334P1200") = "A" OR (getResponse("334P1200") = "B")</condition>
</presentation>
<presentation item="6454P008">
<condition>(getResponse("334P1200") = "A" OR (getResponse("334P1200") = "B") AND (getResponse("6454P007") = "B")</condition>
</presentation>
<presentation item="6454P009">
<condition>(getResponse("334P1200") = "A" OR (getResponse("334P1200") = "B") AND (getResponse("64564P007") = "A")</condition>
</presentation>
<presentation item="6454P100">
<condition>(getResponse("334P1200") = "A" OR (getResponse("334P1200") = "B") AND (getResponse("64564P007") = "A") OR (getResponse("6454P007") = "B")</condition>
</presentation>
<presentation item="6454P101">
<condition>(getResponse("334P1200") = "A" OR (getResponse("334P1200") = "B") AND (getResponse("64564P007") = "C")</condition>
</presentation>
<presentation template="tmpSurvey2012end_ff" item="6454P102">
<condition>(getResponse("334P1200") = "A") OR (getResponse("334P1200") = "B")</condition>
</presentation>
</group>



Feedback and Knowledge Base