I have a long web url in my xsl variable. eg. @url = "http://stackoverflow.com/questions/ask/2434/35454"
I need a substring from this based on 3rd index of "/". i.e I want to display only http://stackoverflow.com
There is a substring(string, start, length) function in xsl but how do i find the length portion. I could not find any indexof function.
<xsl:value-of select="substring(url,1,length)"/> My url is suppose - "http://stackoverflow.com/questions/ask/2434/35454" Output I want is http://stackoverflow.com
Please suggest some solutions.