This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: construct query string
- From: "Michael Kay" <michael dot h dot kay at ntlworld dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Tue, 7 May 2002 23:06:52 +0100
- Subject: RE: [xsl] construct query string
- Reply-to: xsl-list at lists dot mulberrytech dot com
You do it inside the variable declaration:
<xsl:variable name="querystring">
<xsl:for-each select="param">
<xsl:if test="position()!=1">&</xsl:if>
<xsl:value-of concat(name, '=', value)/>
</xsl:for-each>
</xsl:variable>
Michael Kay
Software AG
home: Michael.H.Kay@ntlworld.com
work: Michael.Kay@softwareag.com
> -----Original Message-----
> From: owner-xsl-list@lists.mulberrytech.com
> [mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of Zack Angelo
> Sent: 07 May 2002 20:37
> To: xsl-list@lists.mulberrytech.com
> Subject: [xsl] construct query string
>
>
> I'm attempting to construct a query string
> ("?param1=blah¶m2=blah2",
> for example) using the values of a series of tags in an XML
> document. My
> first intuition was to create an XSL variable, and then send the
> transformer into a loop which concats each param tag onto
> that variable.
> However, after reading the W3C doc, it doesn't seem like
> that's feasible
> because you can't "shadow" a XSLT variable in the same
> template context,
> and you can't reference the variable you're trying to declare in the
> variable definition. TIA.
>
> -Zack
>
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list