Re: [xsl] Spaces to %20

Subject: Re: [xsl] Spaces to %20
From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
Date: Fri, 6 Jul 2007 06:36:29 -0700
Use the str-map() function/template of FXSL.

See for example test-str-dvc-Map2.xsl:

http://fxsl.cvs.sourceforge.net/fxsl/fxsl-xslt2/Tests/test-str-dvc-Map2.xsl?view=markup

--
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play


On 7/5/07, Kerry Kobashi <kkobashi@xxxxxxxxxxx> wrote:
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