In XSLT 2.0, both xsl:copy and xsl:copy-of have an attribute copy-namespaces="no" which causes all "unused" namespaces to be dropped - that is, namespaces which are not used in the name of the element being copied, or in any of its attributes. This is probably sufficient to meet your requirement.
exclude-result-prefixes only affects namespaces declared in the stylesheet, not those copied from a source document.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
|