Re: [xsl] Need help with XSLT: adding new node btw existing elements

Subject: Re: [xsl] Need help with XSLT: adding new node btw existing elements
From: Abel Online <abel.online@xxxxxxxxx>
Date: Thu, 17 Aug 2006 01:21:24 +0200
Nishi Bhonsle wrote:

But what about the xmlns="" that gets added to the elements? How can I
remove that?

This sounds to me that you are using MSXML. Afaik, it is the only xslt processor that adds xmlns="" to nodes that do not belong to a namespace, when the original document did belong to a namespace. Depending on where you use this, there are different approaches in removing. When you tackle it in a programming environment or client-side xslt, I suggest a quick and dirty hack: serialize the result XML, remove all xmlns="" occurrences (use equivalent of this regexp in your favourite language: s/\s+xmlns\s*=\s*"\s*"\s+/ /g). Of course, this would mean no pure xslt approach.


Perhaps you can tell a bit more on what you are trying to achieve, what processor you are using and in what environment you use it. Give an example of what actually goes in, what goes out and what your xslt looks like, and what you expected as output.

Cheers,

Abel Braaksma,
http://www.nuntia.nl

Current Thread