A
Andy Fish
Hi,
Now I have an xsl that generates an html page that allows the user to edit a
<textarea>. If he types in this:
frog[cr]toad
(i.e. presses the enter key between the two words) and posts it to the
server (ie 6 on winxp) the request value comes out as frog[cr][lf]toad,
which seems fair enough.
Next time round I want to display the value so he can edit it. my stylesheet
looks like this:
<textarea><xsl:value-of select="@value" /><textarea>
After processing it with xalan 2.4.1, the html looks like this
<textarea>frog
[cr][lf]toad</textarea>
so it's as if xalan has replaced the [cr] with an entity reference, and then
converted the [lf] to [cr][lf].
The browser now displays this with a blank line between the two words. Of
course, every time the form is posted, the number of blank lines is doubled.
I just need to preserve any newlines entered by the user. Any clues about
where I'm going wrong?
TIA
Andy
Now I have an xsl that generates an html page that allows the user to edit a
<textarea>. If he types in this:
frog[cr]toad
(i.e. presses the enter key between the two words) and posts it to the
server (ie 6 on winxp) the request value comes out as frog[cr][lf]toad,
which seems fair enough.
Next time round I want to display the value so he can edit it. my stylesheet
looks like this:
<textarea><xsl:value-of select="@value" /><textarea>
After processing it with xalan 2.4.1, the html looks like this
<textarea>frog
[cr][lf]toad</textarea>
so it's as if xalan has replaced the [cr] with an entity reference, and then
converted the [lf] to [cr][lf].
The browser now displays this with a blank line between the two words. Of
course, every time the form is posted, the number of blank lines is doubled.
I just need to preserve any newlines entered by the user. Any clues about
where I'm going wrong?
TIA
Andy