xsl-list
[Top] [All Lists]

RE: [xsl] Replace new lines by <br> and double quote with special char: Problem retaining HTML tags

2006-09-11 06:57:54
Hi David,

It works now. Thanks. 

I want to replace the double quotes (") in the XSL by double double
quotes (""). This is to ensure CSV compliance. I am using the following
code for replacing double quote.

<xsl:when test="contains($StringToTransform,'&#x22;')">
               <xsl:value-of
select="substring-before($StringToTransform,'&#x22;')"/>""<xsl:call-temp
late name="transformXMLString">
                  <xsl:with-param name="StringToTransform">
                     <xsl:value-of
select="substring-after($StringToTransform,'&#x22;')"/>
                  </xsl:with-param>
               </xsl:call-template>
</xsl:when>

But the double quotes are not getting replaced with double double
quotes. This leads to non compliance in CSV format. Again the same
double quote is coming. Please let me know if the above information is
sufficient.

Thanks & Regards,
Ambika Prasad Das


-----Original Message-----
From: David Carlisle [mailto:davidc(_at_)nag(_dot_)co(_dot_)uk] 
Sent: Monday, September 11, 2006 1:40 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] Replace new lines by <br> and double quote with
special char: Problem retaining HTML tags


That was not the code I posted, which also had this


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


The code you posted had no templates that generated or copied element
nodes, so you get no nodes in the output.





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

<Prev in Thread] Current Thread [Next in Thread>