-
"New Line" character
I want to create a variable with the content of new line, so that I can insert it to a string for example "This is a string!" that it becomes "This is \na string!". Does anybody can help with an idea?
I tried with
<xsl:variable name="new-line">
</xsl:variable>
but it doesnot work. The output is still:
This is a string!
If I write this way
<xsl:variable name="new-line">n
n</xsl:variable>
the output string becomes:
This is n
na string!
The new line works. But the problem is that I donot want the two 'n's
Thanks very much in advance!
-
Take a look here! perhaps something could help you with your problem...
-
-
some background info:
unix return: \n
c++ return: \n
DOS/windows return: \r\n
windows automatically parses \n to be \r\n. I think unix will choke on the \r.
what if you try this:
<xsl:variable name="new-line">
"This is some Text '\n' This is some More Text."
</xsl:variable>
haven't tested it, it's just a thought
-
the new line character for xml is & # x A ;
\r \n donot work