Re: [xsl] Is it possible to set the default namespace with a dynamically-generated namespace uri?

Subject: Re: [xsl] Is it possible to set the default namespace with a dynamically-generated namespace uri?
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 12 Mar 2010 18:51:14 +0000
On 12/03/2010 18:25, Dimitre Novatchev wrote:
I know this seems like an absurd scenario, but some people are asking
this question...

It seems that<xsl:namespace> was not intended for this purpose.

Any suggestions for a solution?


http://www.w3.org/TR/xslt20/#element-namespace


If the effective value of the name attribute is a zero-length string, a namespace node is added for the default namespace.


so


<foo>
<xsl:namespace name="" select="$x"/>

sets the default namespace to the uri in the variable x.

David

Current Thread