XPath 1.0 does not support conditional expressions, at least not with the syntactic sugar one can expect.

With XPath 1.0 it is easy to extract content and use it as part of a string, but what if the actual content must depend on some condition? For example: if some condition is true I want to generate the string 'FOO', otherwise I want to generate the string 'BAZZ'.

In this case we can use the Oliver Becker's XPath method.