xsl-list
[Top] [All Lists]

Re: [xsl] removing crlf character with out white spaces

2010-11-10 22:27:28
Perhaps something like:

    <xsl:template match="text()">
        <xsl:value-of select="translate(., '&#10;&#13;', '')" />
    </xsl:template>

-Brandon :)


On Wed, Nov 10, 2010 at 11:09 PM, ram <ram_kurra(_at_)yahoo(_dot_)co(_dot_)in> 
wrote:
Hi,
        I am trying to write an xsl which will take read text which is in EDI 
format and crlf characters. My code is

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

   version="1.0" xmlns:xalan="http://xml.apache.org/xslt";>

   <xsl:template match="text()">
       <xsl:value-of select="normalize-space()" />
   </xsl:template>


   <xsl:template match="*">
       <xsl:copy>
           <xsl:copy-of select="@*" />
           <xsl:apply-templates />
       </xsl:copy>
   </xsl:template>
</xsl:stylesheet>

            The normalize-space() is removing all the crlf characters and 
also trimming white spaces trimming into single space which i dont want to do 
it.
i need only cr and line feeds needs to be removed. How can i do that.



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--