title: limit number of characters in a string - XSLT
body: <p>I am using a third party asp.net control to pull and display the latest content from the database. The control pulls the title of the latest published content using a xsl file. My issue is the title(content piece) being too long. They place I used to display has no room for about 100 characters. I need to trim(not the white spaces) end part and may be limit it to a few words or some characters. It uses the xsl file -</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;
      &lt;xsl:template match="/"&gt;
          &lt;table border="0" cellspacing="0" cellpadding="0" width="100%"&gt;
              &lt;xsl:for-each select="Collection/Content"&gt;
                  &lt;tr&gt;
                      &lt;td&gt;
                          &lt;a&gt;
                              &lt;xsl:attribute name="href"&gt;
                                  &lt;xsl:choose&gt;
                                      &lt;xsl:when test="Type ='Assets' or Type = 8 "&gt;
                                          javascript:void window.open('showcontent.aspx?id=&lt;xsl:value-of select="ID"/&gt;')
                                      &lt;/xsl:when&gt;
                                      &lt;xsl:otherwise&gt;
                                          &lt;xsl:value-of select="QuickLink"/&gt;
                                      &lt;/xsl:otherwise&gt;
                                  &lt;/xsl:choose&gt;
                              &lt;/xsl:attribute&gt;
                              &lt;xsl:value-of select="Title"/&gt;
                          &lt;/a&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/xsl:for-each&gt;
          &lt;/table&gt;
      &lt;/xsl:template&gt;
  </code></pre>
  
  <p>This part, <code>&lt;xsl:value-of select="Title"/&gt;</code> is where you the title is and I need to shorten it.. (putting ... in the end perhaps)</p>
  
  <p>How can I do it? Can I get this done in the xsl file itself without using JQuery? Many thanks,</p>