You can count the lines that contain your parameter like this:
<xsl:param name="searchString">
<xsl:template match="/">
<numberOfMatchingLines>
<xsl:value-of select="count(//LINE[contains(., $searchString)]"/>
</numberOfMatchingLines>
</xsl:template>
If you want the transformation to fail when this count is zero, you can do
<xsl:if test="count(//LINE[contains(., $searchString)] = 0">
<xsl:message terminate="yes">There are no matching lines</xsl:message>
</xsl:if>
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference