You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Echoes <ec...@free.fr> on 2001/02/06 15:07:48 UTC
WAP problem
Hello,
I'm not sure this is cocoon related, but since other users might have
encountered this
problem, i'm posting here. I want to build a URL from several fields and
use it in a
<a href="..."></a> but this doesn't really work; here is the relevant
part of the stylesheet :
<xsl:variable name="url">login.xml?login=<xsl:value-of
select="login"/>&passw=<xsl:value-of select="passw"/></xsl:variable>
<p align="center">
<xsl:value-of select="$url"/><br/>
<a href="{$url}">Come on in !</a>
</p>
The output is :
login.xml?login=guest&passw=guest
<a href="login.xml?login=guest&passwd=guest">Come on in !</a>
You can see that the & in the href will hurt.
Any idea ?
Eugène
RE: WAP problem
Posted by Paul Nock <pn...@medicineplanet.com>.
Something like:
<go sendreferer="false" method="get">
<xsl:attribute
name="href">blah.com/xxx.xml?param=1&card=2</xsl:attribute>
</go>
Works just fine for me. The & in the href doesn't hurt.
I also do something like this quite successfully, which is more specifically
like your example of using xsl:variable to build the URL:
<xsl:variable name="querystring">
<xsl:for-each select="input-parameter">
<xsl:value-of select="@name"/>
<xsl:text>=$(</xsl:text><xsl:value-of
select="@name"/><xsl:text>)</xsl:text><xsl:text>&</xsl:text>
</xsl:for-each>
</xsl:variable>
and then:
<go sendreferer="false" method="get">
<xsl:attribute name="href">
<xsl:text>blah.com?</xsl:text>
<xsl:value-of select="$querystring"/>
</xsl:attribute>
</go>
Cocoon and WAP is working just fine for me ;-)
Paul Nock
MedicinePlanet
-----Original Message-----
From: desrefa [mailto:desrefa]On Behalf Of Echoes
Sent: Tuesday, February 06, 2001 6:08 AM
To: cocoon-users@xml.apache.org
Subject: WAP problem
Hello,
I'm not sure this is cocoon related, but since other users might have
encountered this
problem, i'm posting here. I want to build a URL from several fields and
use it in a
<a href="..."></a> but this doesn't really work; here is the relevant
part of the stylesheet :
<xsl:variable name="url">login.xml?login=<xsl:value-of
select="login"/>&passw=<xsl:value-of select="passw"/></xsl:variable>
<p align="center">
<xsl:value-of select="$url"/><br/>
<a href="{$url}">Come on in !</a>
</p>
The output is :
login.xml?login=guest&passw=guest
<a href="login.xml?login=guest&passwd=guest">Come on in !</a>
You can see that the & in the href will hurt.
Any idea ?
Eugène
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>