1<?xml version="1.0"?>
2<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3  <xsl:output encoding="utf-8"/>
4  <xsl:template match="element[@needle=1]">
5    <found>
6      <xsl:apply-templates/>
7    </found>
8  </xsl:template>
9
10  <xsl:template match="element">
11    <element>
12      <xsl:apply-templates/>
13    </element>
14  </xsl:template>
15
16</xsl:stylesheet>