<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version = "1.0" > 
          
<xsl:output  method="xml" /> 
          <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:element name="tat">test</xsl:element>
			   
          </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 = "position()" />
               </XXX> 
          </xsl:template> 

          <xsl:template match = "BBB" mode = "yyy" > 
               <YYY>
                    <xsl:value-of select = "." />
               </YYY> 
          </xsl:template> 
     </xsl:stylesheet> <!-- Stylus Studio meta-information - (c) 2004-2007. Progress Software Corporation. All rights reserved.
<metaInformation>
<scenarios/><MapperMetaTag><MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/><MapperBlockPosition></MapperBlockPosition><TemplateContext></TemplateContext><MapperFilter side="source"></MapperFilter></MapperMetaTag>
</metaInformation>
-->