<xsl:template name="inner_xhtml"> <xsl:param name="p_class_name" select="''"/>
<xsl:for-each select="text()|*">
<xsl:choose>
<xsl:when test="local-name(.) = 'a'">
<a href="{./@href}"><xsl:call-template name="inner_xhtml" /></a>
</xsl:when>
<xsl:when test="local-name(.) = 'div'">
<xsl:if test="string-length(.) > 1">
<p>
<xsl:if test="string-length($p_class_name) > 0">
<xsl:attribute name="class"><xsl:value-of select="$p_class_name" /></xsl:attribute>
</xsl:if>
<xsl:call-template name="inner_xhtml" /><br/>
</p>
</xsl:if>
</xsl:when>
<xsl:when test="local-name(.) = 'em'">
<i><xsl:value-of select="." /></i>
</xsl:when>
<xsl:when test="local-name(.) = 'h1'">
<p class="Header1"><xsl:value-of select="." /></p>
</xsl:when>
<xsl:when test="local-name(.) = 'h2'">
<p class="Header2"><xsl:value-of select="." /></p>
</xsl:when>
<xsl:when test="local-name(.) = 'h3'">
<p class="Header3"><xsl:value-of select="." /></p>
</xsl:when>
<xsl:when test="local-name(.) = 'strong'">
<b><xsl:value-of select="." /></b>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="." />
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</xsl:template>