954,517 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Dynamic Url

Hi,

I need to concatenate 3 strings to make URL dynamically.

<xsl:variable name="userurl">
                  		<xsl:choose>
                           <xsl:when test="currentUser/first != ''">
                              <xsl:value-of select="currentUser/first"/>
                           </xsl:when>
                           <xsl:otherwise>
                              <xsl:value-of select="currentUser/userid"/>
                           </xsl:otherwise>
                        </xsl:choose>
                    </xsl:variable>

 <xsl:variable name="url">
                    	<xsl:value-of select="concat('http://localhost:8080/xsl-portal/site/~',$userurl,'/page/487d2e0a-ca50-440b-a8c2-e98a2cee632c')"/>
                    </xsl:variable>
                  	<xsl:text>|</xsl:text>
                  	<a href="{$url}" target="_blank">
                  		<xsl:text>Search</xsl:text>
                  	</a>


Here i am not able to get the link, The link is coming like http://localhost:8080/%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09concat%28%27http://localhost:8080/xsl-portal/site/~%27,$userurl,%27/page/487d2e0a-ca50-440b-a8c2-e98a2cee632c%27%29%0A

Can any one help me to Solve this. I am new to XSLT so please help...

Regards
Bhanu.

bhanu1607
Newbie Poster
12 posts since Aug 2010
Reputation Points: 10
Solved Threads: 0
 

Please post the input xml, relevant xslt and the expected output from the input xml.

mrame
Light Poster
37 posts since Feb 2011
Reputation Points: 10
Solved Threads: 4
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You