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

Re: codepoints-to-string for new line

Subject: Re: codepoints-to-string for new line
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Sun, 8 Sep 2013 15:10:10 +0100
Re:  codepoints-to-string for new line
There are places in the XQuery/XPath test suite where we use
codepoints-to-string(10) to generate a newline, for the reasons you cite: it's
less likely than other representations to be corrupted by operations on the
source file such as XSLT transformations. There's another reason in that case
as well, which is that XQuery expands entities in string literals, while XPath
does not.

Michael Kay
Saxonica

On 8 Sep 2013, at 00:04, Heiko Niemann wrote:

> Hello,
>
> whenever I searched for a way to insert a line break using the output text
> method I basically just found samples either with & #10; or a line break
> inside a xsl:text element. Those work as long as you don't do pretty print
> or your editor at some point transforms & #10; to space. Anyhow while
> flipping thru a well known XSLT/XPath reference codepoints-to-string()
> crossed my way - and solved the problem. So that makes me wonder:
>
> a) Is there a good reason/scenario why/when not to use this function for a
> line break?
>
> b) Are there just no (top-rated) samples around because
> codepoints-to-string() belongs to an extended set of functions that people
> (like me) rarely/never use?
>
>
> Thanks for hints,
> Heiko

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.