Need Help with An XPath Expression


(Monique) #1

This is what the expression currently says for weighted_malnutrition: if(#form/question2/RISC_Score_Calculation/z-score_table_look_up_standard_deviation = -3, 6, if(#form/question2/RISC_Score_Calculation/z-score_table_look_up_standard_deviation = -2, 3, 0))

This is what we are trying to say (Refer to attached picture for reference of parameters): if(#form/question2/RISC_Score_Calculation/z-score_table_look_up_standard_deviation < -3, 6, if(#form/question2/RISC_Score_Calculation/z-score_table_look_up_standard_deviation > = -3 and #form/question2/RISC_Score_Calculation/z-score_table_look_up_standard_deviation < -2, 3, if(#form/question2/RISC_Score_Calculation/z-score_table_look_up_standard_deviation > = -2, 0, 0)))

I am not sure if what is described in the table can be translated to an XPath Expression. If so, would the above stated expression be correct?