Assuming your code is doing nothing with the other elements in the document, move the logic to the apply-templates level
<xsl:template match="/">
<xsl:apply-templates select="//page[@id=$param]"/>
</xsl:template>
If you are processing different elements in different ways, then you will need a template rule with match="page" containing an xsl:choose, xsl:when test="@id=$param".
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference