Dynamically updating label text

I'm wondering if this is possible with ODK. I would like to dynamically update labels/hints based on the answers to previous questions. I understand it is possible to include the value of a previous answer using but I want the value to be different.

Here is a very simplified version of what I'm trying to do:

Question 1: Is the person male or female? 
Question 2: How old is [IF Question 1 = 'male' THEN 'he' IF Question 1 = 'female' THEN 'she']?

I originally wanted to pull these values from a csv file but I am okay if it can be done completely within the xform.

Hi @jmoody

I prepared an example for you: label.xlsx (9.8 KB)


Thanks, @Grzesiek2010, that put me on the right path. My form does this in a repeat group so it was necessary to play with the xpath to get the right value returned. I also discovered in another forum post that it is possible to conduct the calculation with the tag, so it's not necessary to create the extra field.