Re: [xsl] Replace Special Characters: return, blank and tab

Subject: Re: [xsl] Replace Special Characters: return, blank and tab
From: "Christina" <lechaelnah@xxxxxxxxxxx>
Date: Thu, 5 Aug 2004 17:57:24 -0700
> but your code had
>               <xsl:with-param name="pattern" select="'&#13;'"/>
>               <xsl:with-param name="replacement" select="'"/>
>
> ie replacing #13 by nothing.
>

This is why I use this test:
>                  <xsl:when test="$replacement != ''">
to insert a break: <br/>.
Otherwise, I don't know how to insert "<" and ">" without escaping them,
once i escaped them, theoutput html will escape them too. they lose their
function as a break.

It is a good idea to match the "&#10;" too, but now I cannot even make the
"&#13;" working, which I am sure is in the input file, because the content
from <p>hereIAm</p>  is inserted but the <p> and </p>tags are stripped out.

 here is what I get :

&nbsp;&nbsp;&nbsp;hereIAm
&nbsp;&nbsp;&nbsp;&nbsp;package&nbsp;milkway.mybean.rect;hereIAm
import&nbsp;java.beans.PropertyChangeSupport;hereIAm
import&nbsp;java.beans.PropertyChangeListener;hereIAm
import&nbsp;java.awt.Font;hereIAm
import&nbsp;java.io.Serializable;hereIAm
import&nbsp;java.awt.Canvas;hereIAm

but what I want to get is:

&nbsp;&nbsp;&nbsp;<p>hereIAm</p>
&nbsp;&nbsp;&nbsp;&nbsp;package&nbsp;milkway.mybean.rect;<p>hereIAm</p>
import&nbsp;java.beans.PropertyChangeSupport;<p>hereIAm</p>
import&nbsp;java.beans.PropertyChangeListener;<p>hereIAm</p>
import&nbsp;java.awt.Font;<p>hereIAm</p>
import&nbsp;java.io.Serializable;<p>hereIAm</p>
import&nbsp;java.awt.Canvas;<p>hereIAm</p>


Thanks!

Current Thread