title: XSLT - Using substring with copy-of to preserve inner HTML tags
body: <p>I have some XML like this:</p>
  
  <p><code>&lt;story&gt;&lt;p&gt;&lt;strong&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit.&lt;/strong&gt;Nulla vel mauris metus. Etiam vel tortor vel magna bibendum euismod nec varius turpis. Nullam ullamcorper, nunc vel auctor consectetur, quam felis accumsan eros, lacinia fringilla mauris est vel lectus. Curabitur et tortor eros. Duis sed convallis metus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Cras tempus quam sed enim gravida bibendum. Vestibulum magna ligula, varius in sodales eu, ultricies volutpat sem. Phasellus ante justo, vestibulum eu hendrerit a, posuere vitae est. Integer at pulvinar est.&lt;/p&gt;&lt;p&gt;Quisque a commodo eros. Integer tempus mi sit amet leo consectetur adipiscing. Nullam sit amet enim metus. Curabitur sollicitudin egestas arcu, at convallis enim iaculis eget. Etiam faucibus, justo sit amet lacinia consectetur, purus nunc rhoncus dui, id malesuada tortor est sed orci. Quisque eget nisi vitae mi facilisis varius. Integer fringilla eros sit amet velit vehicula commodo. &lt;/p&gt;&lt;br /&gt;&lt;span&gt;And some more text here&lt;/span&gt;
  &lt;/story&gt;</code>    </p>
  
  <p>I want to do this:</p>
  
  <pre><code>&lt;xsl:copy-of select="substring(story/node(),1,500)"/&gt;
  </code></pre>
  
  <p>Here is the problem.  I lose the <code>&lt;p&gt;, &lt;strong&gt;, &lt;br /&gt;</code> and other HTML tags inside the <code>&lt;story&gt;</code> tag whenever I take the substring.  Is there any way to get the first 500 characters of the story tag while keeping the inner HTML tags?</p>
  
  <p>Thanks!</p>