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

Detecting carriage return and newline feed in XML Data

Subject: Detecting carriage return and newline feed in XML Data
From: <michella@xxxxxxx>
Date: Wed, 27 Oct 2004 16:57:42 +0200
xml carriage return
> Hello,
>
> I have a XML Data where some carriage return and new line feed are
> contained. However, XSL only interprets them as spaces. How can I have
> XSL detecting eventual carriage return and consequently apply the
> right thing to do in the ouput?
>
> Exemple :
>
> <XML>
> 	<Text data="The is the sample text. Following come the carriage
> return :
> 	Here is the next text line."/>
> </XML>
>
> Then, in XSL :
>
> <xsl:value-of select="/XML/@data"/>
>
> Output is :
>
> "The is the sample text. Following come the carriage return : Here is
> the next text line."
>
> I would like it to normally be :
>
> "The is the sample text. Following come the carriage return :
> Here is the next text line."
>
I tried with a "<xsl:value-of select="contains(/XML/@data,'&#10;')"/> if
it might give a positive answer... and as well with '&#13;'... always
false!

I'm using Saxon8 processor

> Any hints would be greatful
>
> Lawrence Michel

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.