title: XSLT Translate Issue
body: <p>I am using a translate() function in a xslt script to remove unwanted string from a repeating element before rendering the output. While the translate function is doing its job, it is affecting a handful of these elements by removing more characters than it should and I can't for the life of me figure out why that is happening. </p>
  
  <p>Here's an example XML document:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;books&gt;&lt;book&gt;&lt;title&gt;Keep this text [remove this text]&lt;/title&gt;&lt;/book&gt;&lt;book&gt;&lt;title&gt;Keep this text 2 [remove this text]&lt;/title&gt;&lt;/book&gt;&lt;book&gt;&lt;title&gt;Keep this text 3 [remove this text]&lt;/title&gt;&lt;/book&gt;&lt;book&gt;&lt;title&gt;Keep this text 4&lt;/title&gt;&lt;/book&gt;&lt;/books&gt;
  </code></pre>
  
  <p>Here's a VERY basic example portion of a XSLT that tests for the [remove this text] string from the title element (this function is nested in a for-each loop):</p>
  
  <pre><code>&lt;xsl:value-of select="translate(books/book/title, '[remove this text]', '')" /&gt;
  </code></pre>
  
  <p>This successfully removes the unwanted string and in most cases preserves the preceding text without issue. Unfortunately, in a handful of issues, the resultant output of the title element will be missing several characters (all white space is removed) and will look like "kpptt2" instead of "Keep this text 2". Does any one know why this might happen and/or produces flukes such as this example? Thank you! </p>