<xsl:stylesheet extension-element-prefixes="saxon" version="1.0">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="//AAA">
<html>
<body>
<xsl:apply-templates select="BBB|//CCC">
<xsl:with-param name="par_a">ZZ</xsl:with-param>
</xsl:apply-templates>
</body>
</html>
</xsl:template>
<xsl:template match="BBB">
<xsl:param name="par_a"/>
<h2>
<xsl:value-of select="$par_a"/>
<xsl:value-of select="text()"/>
</h2>
</xsl:template>
<xsl:template match="CCC">
<p>
<xsl:value-of select="text()"/>
</p>
</xsl:template>
</xsl:stylesheet>