Nicolas George wrote:
> I would like to simplify the namespaces declarations, something like that:
>
> <html xmlns="http://www.w3.org/1999/xhtml">
> <html:em xmlns:html="http://www.w3.org/1999/xhtml">foo</html:em>
> </html>
>
> must become:
>
> <html xmlns="http://www.w3.org/1999/xhtml">
> <em>foo</em>
> </html>
An XSLT stylesheet as the following could help:
<xsl:stylesheet
xmlns

sl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template match="*">
<xsl:element name="{local-name()}" namespace="{namespace-uri()}">
<xsl:apply-templates select="@* | node()"/>
</xsl:element>
</xsl:template>
<xsl:template match="/ | @* | text() | comment() |
processing-instruction()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
--
Martin Honnen
http://JavaScript.FAQTs.com/