RE: [xsl] adding namespaces to result [XSLT 1.0]

Subject: RE: [xsl] adding namespaces to result [XSLT 1.0]
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 8 Nov 2006 18:02:01 -0000
If the element name, the namespace prefix, and the namespace URI are all
known to you at the time you write the stylesheet, then all you need to do
is to use a literal result element:

<myElement xmlns:iso4217="";>

If any of these are not known in advance, then you have to use the technique
you refer to, of copying a namespace node from another document. You've
clearly misunderstood how this technique works, but it would be useful to
see your code so that we can see which part of it you didn't understand.

Michael Kay

> Im trying to create a XML document from another using XSLT. 
> The problem comes when I try to add a namespace to the result 
> (e.g. xmlns:iso4217="http://www.
>"). I have read in post http://www.stylusstudio.
> com/xsllist/200504/post00350.html that it is not possible to 
> add a namespace with a xsl:attribute, so I tried to use 
> xsl:copy-of with the axe "namespace".
> This doesnt work fine since it does not add "xmlns:" to the 
> namespace and if I try to add "xmlns:" by hand it does not 
> work because it stops from being an attribute. What can I do?
> Thanks in advance

Current Thread