xslt template low priority , copy remove namespace and special char

 <?xml version="1.0" encoding="UTF-8"?>

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

<xsl:output encoding="ISO-8859-1" method="xml"  omit-xml-declaration="yes" />

<xsl:strip-space elements="*" />

<!-- Copy elements -->

<xsl:template match="*" priority="-1">

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

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

</xsl:element>

</xsl:template>


<!-- Copy all other nodes -->

<xsl:template match="node()|@*" priority="-2">

<xsl:copy />

</xsl:template>

<xsl:template match="text()">

<xsl:value-of select="translate(.,'&#xA;','')"/>

</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