remove all namespaces from input xml file

 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    <!-- Strip all namespace prefixes -->

    <xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>


    <xsl:template match="*">

        <xsl:element name="{local-name()}">

            <xsl:apply-templates select="@* | node()"/>

        </xsl:element>

    </xsl:template>


    <xsl:template match="@*">

        <xsl:attribute name="{local-name()}">

            <xsl:value-of select="."/>

        </xsl:attribute>

    </xsl:template>

</xsl:stylesheet>

Popular posts from this blog

pss book : శ్రీకృష్ణుడు దేవుడా, భగవంతుడా completed , second review needed. 26th April 2024

pss book: గురు ప్రార్థనామంజరి . completed 21st july 2024

pss book: కధల జ్ఞానము read review pending. 25th june 2024