Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] Replacing default namespace

From: Abel Braaksma <abel.online@--------->
To:
Date: 7/2/2007 9:45:00 AM
Abel Braaksma wrote:
Scott Sauyet wrote:
One of the main things I need to do is change the xmlns:tns attribute.



One more thing, your subject-line says "Replacing default namespace". 
You don't mention that in your post elsewhere, but you can bind elements 
that are in the default namespace (the default namespace is the 
namespace not bound with a prefix) by matching as follows:



<xsl:template match="*[local-name() = name()]" >
  .... rest as in prev. post ....


If the default namespace is not specified, the default namespace becomes 
the null namespace. If you explicitly want to change the namespace for 
elements in the null namespace (instead of any possible default 
namespace), change the match as follows:



<xsl:template match="*[namespace-uri() = '']" >
  .... rest as in prev. post ....


Cheers,
-- Abel Braaksma


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent