Great idea. However better than mine.
I have just changed the if to choose like this:
<xsl:template match="node()">
<xsl:param name="cn" select="/.."/>
<xsl:choose>
<xsl:when test="descendant-or-self::node() intersect $cn">
<xsl:copy>
<xsl:apply-templates select="@*| node()">
<xsl:with-param name="cn" select="$cn"/>
</xsl:apply-templates>
</xsl:copy>
</xsl:when>
<xsl:otherwise>
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
--- On Wed, 10/21/09, Martin Honnen <Martin(_dot_)Honnen(_at_)gmx(_dot_)de>
wrote:
<xsl:template match="node()" mode="m1">
<xsl:param name="cn"/>
<xsl:if test="descendant-or-self::node()
intersect $cn">
<xsl:copy>
<xsl:apply-templates
select="@*"/>
<xsl:apply-templates
select="node()" mode="m1">
<xsl:with-param
name="cn" select="$cn"/>
</xsl:apply-templates>
</xsl:copy>
</xsl:if>
</xsl:template>
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--