After getting two excellent and informative responses, I went with the
following (note, there is one change in the last line of the code. I
moved one of the parentheses):
<xsl:value-of select="substring($u, 1, string-length($u) - 1)"/>
This works beautifully!
Thanks for your help!
Trish
-----Original Message-----
Given the limitations of 1.0, where you can't manipulate sequences of
strings, or create and then process temporary trees, I would do:
<xsl:variable name="u">
<xsl:text>pagename.aspx?</xsl:text>
<xsl:if test="$varTarget">
<xsl:text>target=</xsl:text>
<xsl:value-of select="$varTarget">
<xsl:text>&</xsl:text>
</xsl:if>
<xsl:if test="$varPage">
<xsl:text>page=</xsl:text>
<xsl:value-of select="$varPage">
<xsl:text>&</xsl:text>
</xsl:if>
.. repeat for other parameters
</xsl:variable>
<xsl:value-of select="substring($u, 1, string-length($u - 1))"/>
that is, add an & after every parameter, then at the end strip off the
last
character of the string.
Michael Kay
http://www.saxonica.com/
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--