wrote:
> How can I write the XSLT to transform:
>
> <Root>
> <Element attribute="value"/>
> <Element2>
> <Element3/>
> </Element2>
> </Root>
>
> into:
>
> <Root>
> <Element attribute="value"/>
> <Element2>
> <Element3/>
> </Element2>
> <New element>
> ....
> </New element>
> </Root>
>
> The output is the same as the input with a new element at the end.
Start with the identity transformation template
<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
then add
<xsl:template match="Root">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
<New-Element>
....
</New-Element>
</xsl:copy>
</xsl:template>
--
Martin Honnen
http://JavaScript.FAQTs.com/