Given this simple XML document,
<root>
<mode value="foo" icon="billing.png" />
<mode value="bar" />
</root>
How do I select @value and @icon but only if @icon is present? I know that I can do
/root/mode/@value | /root/mode/@icon
But that still selects foo.
Use: