title: xsl : how to translate or replace string?
body: <p>my xsl variable:  </p>
  
  <pre><code>&lt;xsl:variable name="string"&gt;Satur - Sun - Mon - Tues - Wednes - Thurs - Fri&lt;/xsl:variable&gt;
  </code></pre>
  
  <p>i need to translate or replace the <code>string</code> variable data from:  </p>
  
  <pre><code>Satur - Sun - Mon - Tues - Wednes - Thurs - Fri
  </code></pre>
  
  <p><strong>so, the output should be like this:</strong>  </p>
  
  <pre><code>Saturday - Sunday - Monday - Tuesday - Wednesday - Thursday - Friday
  </code></pre>
  
  <p>................................</p>
  
  <p>@Mads Hansen<br>
  i am newbie in <code>xsl</code> and <code>xml</code> and i tried your code but it not works<br>
  <code>100%</code> it is wrong  </p>
  
  <p><strong>my xsl file:</strong>
      
      
      </p>
  
  <pre><code>    &lt;xsl:variable name="string"&gt;Satur - Sun - Mon - Tues - Wednes - Thurs - Fri&lt;/xsl:variable&gt;
      &lt;xsl:template match="/"&gt;
          &lt;html&gt;
              &lt;body&gt;
                  &lt;h2&gt;result: &lt;/h2&gt;
                  &lt;xsl:value-of 
                      select="for $token in tokenize($string, '\s-\s') 
                              return(
                                  document('')/*/config/replacement[find[.=$token]]/replace,             
                                  $token
                              )[1]" 
                      separator=" - "
                  /&gt;
              &lt;/body&gt;
          &lt;/html&gt;
      &lt;/xsl:template&gt;
  
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p><strong>my xml file:</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
  &lt;?xml-stylesheet type="text/xsl" href="index.xsl"?&gt;
      &lt;config&gt;
         &lt;replacement&gt;
              &lt;find&gt;Satur&lt;/find&gt;
              &lt;replace&gt;Saturday&lt;/replace&gt;
          &lt;/replacement&gt;
          &lt;replacement&gt;
              &lt;find&gt;Sun&lt;/find&gt;
              &lt;replace&gt;Sunday&lt;/replace&gt;
          &lt;/replacement&gt;
          &lt;replacement&gt;
              &lt;find&gt;Mon&lt;/find&gt;
              &lt;replace&gt;Monday&lt;/replace&gt;
          &lt;/replacement&gt;
          &lt;replacement&gt;
              &lt;find&gt;Tues&lt;/find&gt;
              &lt;replace&gt;Tuesday&lt;/replace&gt;
          &lt;/replacement&gt;
          &lt;replacement&gt;
              &lt;find&gt;Wednes&lt;/find&gt;
              &lt;replace&gt;Wednesday&lt;/replace&gt;
          &lt;/replacement&gt;
          &lt;replacement&gt;
              &lt;find&gt;Thurs&lt;/find&gt;
              &lt;replace&gt;Thursday&lt;/replace&gt;
          &lt;/replacement&gt;
          &lt;replacement&gt;
              &lt;find&gt;Fri&lt;/find&gt;
              &lt;replace&gt;Friday&lt;/replace&gt;
          &lt;/replacement&gt;
      &lt;/config&gt;
  </code></pre>
  
  <p><strong>what is wrong in my codes ?</strong></p>