0

I have following in XLST to display URL

 <td class="ms-vb" style="width: 257px">   
     <a href="{url}">  
      <xsl:value-of  select="url"/>
     </a>      
  </td>   

The problem is if an url value has 2 spaces then it removes one of the space from the link thus link is broken. Any fix. I have various way but can't find to fix it for over 5 hours.

1

1 Answer 1

0

Thank you Akhoy for the helpful link. The following code works.

     <a> 
      <xsl:variable name="myVar" >
         <xsl:call-template name="string-replace-all">
           <xsl:with-param name="text" select="url" />
           <xsl:with-param name="replace" select="' '" />
           <xsl:with-param name="by" select="'%20'" />
         </xsl:call-template>
      </xsl:variable>
       <xsl:value-of select="$myVar" />
       </a>  

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.