[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Detecting a linefeed in input text, how?
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|