[xsl] Copy an XML file as it is while modifing few specific tags

Subject: [xsl] Copy an XML file as it is while modifing few specific tags
From: "Khorasani, Houman" <houman_khorasani@xxxxxxxxxxxxxx>
Date: Thu, 25 Aug 2005 15:04:11 +0100

I have an interesting situation I can't solve on my own.

Story so far:

An input file is generated and sent to the main XSLT template. This
template imports about 7 other templates and generates an XML output
depending on the conditions given in the input file.

Thereafter a second template called Header generates some text and wraps
the content of the output before into a new TEXT output file.

This is done by a plain

Text bla bla

<xsl:copy-of select="*"/>.


I can't copy the entire document 1:1 like before. I have to copy
everything but 6 specific tags, which need an adjustment.

The problem is now, since the header template should be generic. It will
never now what kind of document it is actually wrapping. So the
structure of the input is unknown to this template.

But then how do I copy everything 1:1 but those 6 tags to modify them as

Let's try to summarize the whole situation above into one sentence:
How do I copy an XML document of unknown depth as it is but modify few
specific tags in it?

Any ideas?

Current Thread