I am trying to SelectSingleNode based on three conditions. ID and Type apply only to the outer node. But Context could apply to either the outer node or an inner node. So these should be selected...
<Node id="SomeID" type="SomeType" context="UseThis"></Node>
<Node id="SomeID" type="SomeType">
<Section context="UseThis"></Section>
</Node>
<Node id="SomeID" type="SomeType">
<Section context="UseThis"></Section>
<Section context="DontUseThis"></Section>
</Node>
But neither of these would...
<Node id="SomeID" type="SomeType" context="DontUseThis"></Node>
<Node id="SomeID" type="SomeType">
<Section context="DontUseThis"></Section>
</Node>
I am doing this now with two IFs. The first selects for ID & Type, and the second has an OR and two SelectSingleNodes to look for Context in either possible place. I just wonder, is there a more graceful XPath construct that handles this in a single simple IF?
Gordon