<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version =
"1.0" >
<xsl:output method =
"xml" indent =
"yes" />
<xsl:template match =
"/" >
<AAA >
<xsl:apply-templates select =
"//BBB" />
<xsl:apply-templates select =
"//BBB" mode =
"xxx" />
<xsl:apply-templates select =
"//BBB" mode =
"yyy" />
</AAA>
</xsl:template>
<xsl:template match =
"BBB" >
<OOO >
<xsl:value-of select =
"." />
</OOO>
</xsl:template>
<xsl:template match =
"BBB" mode =
"xxx" >
<XXX >
<xsl:value-of select =
"." />
</XXX>
</xsl:template>
<xsl:template match =
"BBB" mode =
"yyy" >
<YYY >
<xsl:value-of select =
"." />
</YYY>
</xsl:template>
</xsl:stylesheet>
Author: Miloslav Nic [nicmila@idoox.com]