SAMPLE

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="text" omit-xml-declaration="no" />
	<xsl:template match="/">
<xsl:for-each select="EXAMPLE/ITEMS/Item">
<xsl:value-of select="'&quot;'"/>
    <xsl:call-template name="string-replace-all">
        <xsl:with-param name="text" select="FIRST COLNUM" />
        <xsl:with-param name="replace" select="'&quot;'" />
        <xsl:with-param name="by" select="'&quot;&quot;'" />
    </xsl:call-template>
<xsl:value-of select="'&quot;,'"/>

<xsl:value-of select="'&quot;'"/>
    <xsl:call-template name="string-replace-all">
        <xsl:with-param name="text" select="MIDDLE COLNUM" />
        <xsl:with-param name="replace" select="'&quot;'" />
        <xsl:with-param name="by" select="'&quot;&quot;'" />
    </xsl:call-template>
<xsl:value-of select="'&quot;,'"/>

<xsl:value-of select="'&quot;'"/>
    <xsl:call-template name="string-replace-all">
        <xsl:with-param name="text" select="FINAL COLNUM" />
        <xsl:with-param name="replace" select="'&quot;'" />
        <xsl:with-param name="by" select="'&quot;&quot;'" />
    </xsl:call-template>
<xsl:value-of select="'&quot;'"/>
<xsl:text disable-output-escaping="yes">
</xsl:text></xsl:for-each>
</xsl:template>

<xsl:template name="string-replace-all">
    <xsl:param name="text" />
    <xsl:param name="replace" />
    <xsl:param name="by" />
    <xsl:choose>
        <xsl:when test="$text = '' or $replace = ''or not($replace)" >
            <!-- Prevent this routine from hanging -->
            <xsl:value-of select="$text" />
        </xsl:when>
        <xsl:when test="contains($text, $replace)">
            <xsl:value-of select="substring-before($text,$replace)" />
            <xsl:value-of select="$by" />
            <xsl:call-template name="string-replace-all">
                <xsl:with-param name="text" select="substring-after($text,$replace)" />
                <xsl:with-param name="replace" select="$replace" />
                <xsl:with-param name="by" select="$by" />
            </xsl:call-template>
        </xsl:when>
        <xsl:otherwise>
            <xsl:value-of select="$text" />
        </xsl:otherwise>
    </xsl:choose>
</xsl:template>	
</xsl:stylesheet>