[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Problem Dynamically Building Query String In XSLT

Subject: Re: Problem Dynamically Building Query String In XSLT 1.0
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 31 Jul 2007 17:47:46 +0100
Re:  Problem Dynamically Building Query String In XSLT
> 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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.