[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Replace Special Characters: return, blank and tab

Subject: Re: Replace Special Characters: return, blank and tab
From: "Christina" <lechaelnah@xxxxxxxxxxx>
Date: Thu, 5 Aug 2004 17:57:24 -0700
java replace
> 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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.