You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Per Kreipke <pe...@onclave.com> on 2000/11/22 00:41:04 UTC

Building a query string with '&'....

How can you concatenate an & to some text inside an <xsp:expr>?

E.g. I can't get this to work:

<xsl:expr>
"http://localhost/query.xml?QueryType="
+ <request:get-parameter name="QueryType" default="freetext"/>
+ "&QueryText="
+ <request:get-parameter name="QueryText" default="onclave"/>
</xsp:expr>

It can't parse the XML because it thinks &QueryText is the beginning of an
entity.

This doesn't work either (replacing & with &amp;):

<xsl:expr>
"http://localhost/query.xml?QueryType="
+ <request:get-parameter name="QueryType" default="freetext"/>
+ "&amp;QueryText="
+ <request:get-parameter name="QueryText" default="onclave"/>
</xsp:expr>

The resulting URL is incorrect.

Per.