[xsl] hard/soft return problem with form in xml/xsl

Subject: [xsl] hard/soft return problem with form in xml/xsl
From: "Keddy, Paul" <Paul.Keddy@xxxxxxxxxxxxx>
Date: Wed, 25 Apr 2001 10:45:57 -0300
Hi,

I'm having trouble letting the xml/xsl display hard and soft returns in a
textarea.  If one works the other doesn't and
vice versa.  Wrap = off/on doesn't seem to fix the problem.  I'd like it to:
1. allow the user when entering text into the text area, that it will wrap
and not continue on
(with attribute wrap="on" set...this works but it prevents hard returns by
the user when displayed.
2. allow it to be display correctly when a user puts in hard returns
(with attribute wrap="off" set...this works but now wordwrap of soft returns
does not work
3. allow the text to be "resized/wordwrap" within the text area if the
browser window is changed in size.
Sometimes the user will print the screen and having half the text there is
no good. (even if i could have it a default of 800x600
screen)

Right now I have to pick the lesser of the 2 evils...do I want someone to
enter a long piece of text so that hard returns will 
work or do I allow it to wordwrap but hard returns then don't work.

Any suggestions...code is below..


Filename: abc.xsl

<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
version='1.0'>
<xsl:template match="/">
<html>
<head></head>
<body>
<form name="eform" action="abcdefg.asp" method="post">

         <textarea id="txtReason" name="txtReason" style="WIDTH: 100%"
wrap="off">
            <xsl:value-of
select="eform/content/txtotherrequest"/></textarea>
</form>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
=====================
Filename: abc.xml

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="abc.xsl"?>
<eform>
   <content>
      <txtotherrequest>this should wrap into the text box for both hard and
soft returns if someone wants 
          to make changes etc. etc test of wrap djfldjfkdj fdj ldjfld fldj
dlkjfldkjf dlfjd flj ljf ldfjkldjf dlfjl  end of text</txtotherrequest>
   </content>
</eform>






 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread