xsl-list
[Top] [All Lists]

Re: [xsl] codepoints-to-string for new line

2013-09-08 09:10:19
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

--~------------------------------------------------------------------
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>
--~--



--~------------------------------------------------------------------
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>