[xsl] Spaces to %20

Subject: [xsl] Spaces to %20
From: Kerry Kobashi <kkobashi@xxxxxxxxxxx>
Date: Thu, 05 Jul 2007 23:40:56 -0700
Hi all,

I need a way to convert all spaces into %20 for the anchor tag href below:

<xsl:for-each select="/article/keywords/keyword">
  <xsl:variable name="kw" select="."/>
    <a href="/search.php?keyword={$kw}" title="{$kw}">
       <xsl:value-of select="$kw" />
    </a>
  <xsl:if test="position()!=last()">, </xsl:if>
</xsl:for-each>


<?xml version="1.0" encoding="UTF-8"?> <article> <keywords> <keyword>Cascading Style Sheet</keyword> <keyword>Hypertext Markup Language</keyword> </keywords> </article>

Current Thread