Re: [xsl] Problem Dynamically Building Query String In XSLT 1.0

Subject: Re: [xsl] Problem Dynamically Building Query String In XSLT 1.0
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 31 Jul 2007 17:47:46 +0100
> but the value of the parameter is lost when I go back to queryBuilder:

which is of course the essence of functional programming. When you call
a function f(x,y,z) a result is returned, and the values of x y and z
are used, but x y and z don't change. 

You haven't really shown enough information to offer any code changes,
as I can't guess what the input can be.
You say
>  (the variable names used are the
> possible values for the query string elements and are defined
> elsewhere).

they would need to be global parameters as they are not declared in this
template.

unrelated (most likely) to your problem, it's rarely necessary to test
strings like this:
="paramQueryMark" select="'false'" />
...
	<xsl:if test="$paramQueryMark = 'true'">

xpath has a boolean type which is what you want here:

="paramQueryMark" select="false()" />
...
	<xsl:if test="$paramQueryMark">


Usually for this sort of thing you just want something like

<xsl:for-each select="something">
<xsl:choose>
<xsl:when test="position()=1">?</xsl:when>
<xsl:otherwise>&amp;</xsl:otherwise>
</xsl:choose>
generate param=value
</xsl:for-each>



David

________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 
________________________________________________________________________

Current Thread