Re: Replace Special Characters: return, blank and tab
2004-08-05 19:00:47
I changed the:<xsl:with-param name="pattern" select="' '" />
<xsl:with-param name="replacement" select="''" />
into : <xsl:with-param name="pattern" select="' '" />
<xsl:with-param name="replacement">
<p>hereIAm</p>
</xsl:with-param>
still only "hereIAm" is inserted.
I checked the faq, the replacement that only one layer: it only calls the
template once,
If I called the template only once in my code to only replace the #13, then
it works fine, the whole node is inserted instead of the text in it.
here is my input file, which is an output from an xml based servlet:
package milkway.mybean.rect;
import java.beans.PropertyChangeSupport;
import java.beans.PropertyChangeListener;
import java.awt.Font;
import java.io.Serializable;
import java.awt.Canvas;
public class MyButton extends Canvas
implements Serializable{
private PropertyChangeSupport changes=new
PropertyChangeSupport(this);
.....
thank you for your kind help anyway, have a good night!
----- Original Message -----
From: "David Carlisle" <davidc(_at_)nag(_dot_)co(_dot_)uk>
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Sent: Thursday, August 05, 2004 3:25 PM
Subject: Re: [xsl] Replace Special Characters: return, blank and tab
Otherwise, I don't know how to insert "<" and ">" without escaping them,
you don't want to insert those characters you want to insert a br node,
just put a br node as the content of with-param not using the select
attribute, as I showed.
It is a good idea to match the " " too, but now I cannot even make
the
" " working
It is _most_ unlikely that there are any #13 in the XML file, the XML
spec specifies that all line endings (dos/mac/unix format) are all
reported as #10 howeverthey are in the source.
If you are losing element markup then usual reasons are applying
xsl:value-of which gives the string value (or string ops such as
substring-before which also force a string value) or using the text
output method. Your replace template would get rid of any markup in its
input (as that passes through substring but I thought you had it nested
such that adding <br/> was the last thing you do.
Sorry its too late for debugging your code tonight, the faq for this
list has a replace template that does work, as does Jeni's site.
David
________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
--+------------------------------------------------------------------
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>
|
- How to add a new font, Narasingarao Kommireddi
- RE: How to add a new font, Michael Kay
- Re: How to add a new font, Deirdre Saoirse Moen
- Replace Special Characters: return, blank and tab, Christina
- Re: Replace Special Characters: return, blank and tab, David Carlisle
- Re: Replace Special Characters: return, blank and tab, Christina
- Re: Replace Special Characters: return, blank and tab, David Carlisle
- Re: Replace Special Characters: return, blank and tab,
Christina <=
- Re: Replace Special Characters: return, blank and tab, David Carlisle
- javascript, xsl and xml, Phillip Nicolson
- Re: javascript, xsl and xml, David Carlisle
- Re: javascript, xsl and xml, Phillip Nicolson
- RE: javascript, xsl and xml, Michael Kay
- Re: javascript, xsl and xml, David Carlisle
|
|
|