Optimisation <xsl:apply-templates/> for a set of tags.

Posted by kalininew on Stack Overflow See other posts from Stack Overflow or by kalininew
Published on 2010-04-13T09:49:51Z Indexed on 2010/04/13 9:52 UTC
Read the original article Hit count: 951

Filed under:
|
|
|
|

How it is possible to reduce this record?

<xsl:template match="BR">
    <br/>
</xsl:template>

<xsl:template match="B">
    <strong><xsl:apply-templates /></strong>
</xsl:template>

<xsl:template match="STRONG">
    <strong><xsl:apply-templates /></strong>
</xsl:template>

<xsl:template match="I">
    <em><xsl:apply-templates /></em>
</xsl:template>

<xsl:template match="EM">
    <em><xsl:apply-templates /></em>
</xsl:template>

<xsl:template match="OL">
    <ol><xsl:apply-templates /></ol>
</xsl:template>

<xsl:template match="UL">
    <ul><xsl:apply-templates /></ul>
</xsl:template>

<xsl:template match="LI">
    <li><xsl:apply-templates /></li>
</xsl:template>

<xsl:template match="SUB">
    <sub><xsl:apply-templates /></sub>
</xsl:template>

<xsl:template match="SUP">
    <sup><xsl:apply-templates /></sup>
</xsl:template>

<xsl:template match="NOBR">
    <nobr><xsl:apply-templates /></nobr>
</xsl:template>

© Stack Overflow or respective owner

Related posts about xslt

Related posts about xsl