<xsl:message>This throws "XPTY0020: Leading '/' cannot select the root node of the tree containing the context item: the context item is an atomic value"</xsl:message>
</xsl:if>
<xsl:iftest="$test/foo[@bar = 'baz']">
<xsl:message>This also throws "XPTY0020: Leading '/' cannot select the root node of the tree containing the context item: the context item is an atomic value"</xsl:message>