title: Getting substring based on particular index in xsl/xslt
body: <p>I have a long web url in my xsl variable. 
  eg.
  @url = "http://stackoverflow.com/questions/ask/2434/35454"</p>
  
  <p>I need a substring from this based on 3rd index of "/". i.e I want to display only
  <a href="http://stackoverflow.com">http://stackoverflow.com</a></p>
  
  <p>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.</p>
  
  <pre><code>&lt;xsl:value-of select="substring(url,1,length)"/&gt; 
  </code></pre>
  
  <p>My url is suppose - "http://stackoverflow.com/questions/ask/2434/35454"
  Output I want is <a href="http://stackoverflow.com">http://stackoverflow.com</a></p>
  
  <p>Please suggest some solutions.</p>