Re: [xsl] XSLT pass through

Subject: Re: [xsl] XSLT pass through
From: Evan Lenz <evan@xxxxxxxxxxxx>
Date: Mon, 20 Feb 2006 22:54:35 -0800
Hi Wong,

You'd use a modified identity transform.

First, you'd have the identity transform rule:

 <xsl:template match="@*|node()">
     <xsl:apply-templates select="@*|node()"/>

Then, you'd override it for nodes that you want to treat differently:

 <xsl:template match="targetNS:goodbye">
   <!-- do something different -->

See this page on the XSLT FAQ for further discussion:

Hope this helps,

Evan Lenz

publicreg@xxxxxxxxxxxxxxxx wrote:

Assuming a XML document like this:

<myRoot xmlns:targetNS="";>

How would I get an XSLT result that reproduces all tags that are not of
namespace "targetNS" exactly as it was input? I only want to manipulate
the elements that are of namespace "targetNS", all the rest are to be
reproduced as-is.

Thank you!

Current Thread