To check if the specific node exists in the tree or not in the xsl:
<xsl:choose>
<xsl:while test="path/to/node/to/check !=''">
<xsl:value-of select = "path/to/node/to/check" />
</xsl:while>
</xsl:choose>