Last Updated: February 25, 2016
·
1.496K
· koendewaele

Getting rid of unwanted namespace declarations with XSLT

Use the exclude-result prefix to get rid of unwanted declarations

xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

xmlns:mc="http://www.airwings.org/register/"
xmlns:informatii="http://www.airwings.org/info/"
xmlns:FR="myPrefix://just.for.fun/java.io.FileReader"
xmlns:BR="xalan://java.io.BufferedReader"
exclude-result-prefixes="FR BR">
In the above example, the myPrefix://just.for.fun/java.io.FileReader and xalan://java.io.BufferedReader declarations will not be copied.

source: http://www.oreillynet.com/pub/au/3140