Subject: Re: Detecting a linefeed in input text, how? From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx> Date: Wed, 09 Aug 2000 19:35:41 +0100 |
Steve, >I'm processing a node that has embedded line feed characters. I'm >trying to output the original lines, but with spaces added to the front. >I wrote the following template, but it doesn't detect the line feeds: [snip] >Any ideas? A couple. First is that '#0A' is, in XML, literally the string '#0A'. To get a linefeed character, try using the character entity reference '
' instead. The other thing that immediately springs to mind is to make sure that whitespace is being preserved in the 'indenter' element within your XML source. If it isn't, then any line feeds are going to be interpreted as spaces. To prevent this happening, set xml:space="preserve" on that element (or in the DTD). Your template scans OK otherwise. I hope that helps, Jeni Dr Jeni Tennison Epistemics Ltd * Strelley Hall * Nottingham * NG8 6PE tel: 0115 906 1301 * fax: 0115 906 1304 * email: jeni.tennison@xxxxxxxxxxxxxxxx XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Detecting a linefeed in input text,, Steve Carton | Thread | RE: Detecting a linefeed in input t, Kay Michael |
Re: ?MSXML transformNode, Jeni Tennison | Date | Re: RegExp as an extension function, Imran Rashid |
Month |