xsl-list
[Top] [All Lists]

Re: [xsl] Shallow (in-place) parent-child swap

2006-12-11 03:09:44

copy most stuff:

<xsl:template match="*">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>

don't copy w that contain (one or more) phr

<xsl:template match="w[phr]">
<phr>
<xsl:for-each select="phr">
<w>
<xsl:copy-of select="node()"/>
</w>
</xsl:for-each>
</phr>
</xsl:template>


David

--~------------------------------------------------------------------
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>
--~--