xsl-list
[Top] [All Lists]

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

2006-11-08 11:02:25

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="http://www.xbrl.org/2003/iso4217";>
  ....
</myElement>

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
http://www.saxonica.com/
   


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.
xbrl.org/2003/iso4217"). 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


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>