You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Matt Watson <Ma...@rufusleonard.co.uk> on 2000/09/07 16:32:43 UTC

Cocoon XSL parameters

>Hi,
>
>I have a form that includes a textarea. When this form is submitted and the
>value from the query
>string is read. I find that for some reason if the value includes carrige
>returns it is not correctly
>being displayed. As additional blank lines have appeared.
>
>---------------------------------------------------------------------------
>>>  CAN SOMEBODY TRY THIS OUT AND SEE IF YOU GET THE SAME PROBLEM AS ME  <<
>---------------------------------------------------------------------------
>
><?xml version="1.0"?>
><xsl:stylesheet version="1.0"
>xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>
><xsl:param name="testing"/>
>
><xsl:template match="data">
>
><xsl:processing-instruction
>name="cocoon-format">type="text/html"</xsl:processing-instruction>
>
><html>
>
><p>
>Under Cocoon 1.7.4
></p>
>
><p>
>Type a few words, hit ENTER and type a couple more. Submit. Are you
>getting the same problem as me? <br/>i.e. extra lines have appeared.
>
>How can I solve this problem?
></p>
>
>
>
><form>
>  <xsl:element name="textarea">
>        <xsl:attribute name="name">testing</xsl:attribute>
>        <xsl:attribute name="rows">10</xsl:attribute>
>        <xsl:attribute name="cols">40</xsl:attribute>
>        <xsl:value-of select="$testing"/>
>  </xsl:element><br/>
>  <input type="submit"/>
></form>
></html>
>
></xsl:template>
></xsl:stylesheet>
>
>-------------------------------------------------------------------
>
>pretend this is the textarea defined above. If I enter say:
>
> ------------------------
> |ab				|
> |cd				|
> | 				|
> ------------------------
>
>then
> ----------
> | Submit |
> ----------
>
>which produces the query string ?test=ab%0D%0Acd
>
>when I re-display the value as in the above code.
>
> ------------------------
> |ab				|
> | 				|  <-- Suddenly there is an extra line here.
> |cd				|
> ------------------------
>
>Any ideas about what I am doing wrong? Do I need to run a function on $test
>before I display it?
>
>
>thanks in advance,
>Matt.

*********************************************************************************************************************
This email transmission is confidential and intended for the addressee only. If you are not the intended recipient,
please notify IT Support by telephoning +44 (0)20 7404 4490 before deleting this message from your computer.

The views and opinions expressed in this email message are the author's own and may not reflect the views and 
opinions of Rufus Leonard.
*********************************************************************************************************************