You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "M. Amin" <am...@imkenberg.net> on 2000/11/28 00:54:34 UTC

XSL Question

Dear All,
 I encountered a problem related to xsl but i hope i can find any one can
help me.
The problem as follows :
 In xsp, i encoded the url of my xml file to include the session id and
stored it in a variable,
and in xsl i referenced this value by using <xsl:varable> tag.
but when i use this variable in a form tag like :
<form action="{$a variable containing my stored encoded url}".......>
i surprised that url appears as follows :
----->>>>    .../cocoon/       my encoded url        ?qty=2
with a space characters inserted to the begining and to the end of my
encoded url.
The question is : how can i remove this space characters from the url ???.

M. Amin


Re: XSL Question

Posted by "Piroumian, Konstantin" <KP...@flagship.ru>.
One of the solutions is to use the translate() function:
<xsl:variable name="url_without_spaces" select="translate($url_with_spaces,
' ', '')" />

The other is to use the normalize-space() function when you generate the
url.


----- Original Message -----
From: "M. Amin" <am...@imkenberg.net>
To: <co...@xml.apache.org>
Sent: 28 ?????? 2000 ?., ??????? 02:54
Subject: XSL Question


> Dear All,
>  I encountered a problem related to xsl but i hope i can find any one can
> help me.
> The problem as follows :
>  In xsp, i encoded the url of my xml file to include the session id and
> stored it in a variable,
> and in xsl i referenced this value by using <xsl:varable> tag.
> but when i use this variable in a form tag like :
> <form action="{$a variable containing my stored encoded url}".......>
> i surprised that url appears as follows :
> ----->>>>    .../cocoon/       my encoded url        ?qty=2
> with a space characters inserted to the begining and to the end of my
> encoded url.
> The question is : how can i remove this space characters from the url ???.
>
> M. Amin
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>