I currently facing the well-known problem of "how to remove namespace declarations from my HTML files?". After testing a bit I found that the exclude-prefixes="..." approach works fine for me - even if the Wiki lists this under "Solutions, which do NOT work".
Exclude-result-prefixes prevents the output of *unused* namespaces. It won't remove namespaces which are referenced, and namespace declarations which have been copied from the input. If you want to be sure you don't copy otherwise unused namespace, use <xsl:template match="*" mode="copy"> <xsl:element name="{local-name()}" namespace="{namespace-uri()}"> <xsl:copy-of select="@*/> <xsl:apply-templates mode="copy"/> </xsl:element> </xsl:element> instead of xsl:copy-of, and modify usages of xsl:copy in a similar way.
You also can't use exclude-result-prefixes to transform XHTML (using the XHTML namespace) into HTML 4.x (no namespace). Use the "cleanxmlns" posted downthread for this task.
J.Pietschmann
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
