If I have the following XML:
<items>
<item>
<subItem>
<name>myName</name>
</subitem>
<subitem>
<val>Val1</val>
<val>Val2</val>
</subItem>
</item>
<item>
...more tags here
</item>
</items>
The item element repeats a number of times with different values. If I know the value in the val element I want to match, for instance Val1, what do I use for a template to select the name element value myName in the subItem above it?