>I would like to get a warning when processing a
> <xsl:template match="xpath_expression">
>that doesn't match with anything.
I think that the best you can do is to wrap around the sending side:
<xsl:choose>
<xsl:when test="count(xpath_expression)=0">
<xsl:message>...</xsl:message>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="xpath_expression"/>
</xsl:otherwise>
</xsl:choose>
The notion of "no nodes matching" is only relevant at the moment
when you try to match, and so it should be associated with the
apply-templates instruction, which is what causes that moment to
happen.
.................David Marston