Using a xpath query how do you find if a node (tag) exists at all?
For example if I needed to make sure a website page has the correct basic structure like /html/bod
Patrick is correct, both in the use of the xsl:if, and in the syntax for checking for the existence of a node. However, as Patrick's response implies, there is no xsl equivalent to if-then-else, so if you are looking for something more like an if-then-else, you're normally better off using xsl:choose and xsl:otherwise. So, Patrick's example syntax will work, but this is an alternative:
body node exists
body node missing