title: XSL: How to get all textpieces, keep the order and apply certain templates within
body: <p>following code:</p>
  
  <pre><code>&lt;elem1&gt; This is an example text
  &lt;elem2&gt; and i want to select all of this
  &lt;elem3&gt; and apply a template on elem3 &lt;/elem3&gt;
  &lt;elem3&gt; so it gets bold &lt;/elem3&gt;
  exampletext &lt;/elem2&gt;
  exampletext  &lt;/elem1&gt;
  </code></pre>
  
  <p>The output should look like:</p>
  
  <pre><code>This is an example text and i want to select all of this &lt;b&gt;and apply a template on elem3&lt;/b&gt;&lt;b&gt; so it gets bold &lt;/b&gt; exampletext exampletext 
  </code></pre>
  
  <p>How can I do this with xsl?
  If I use 'text()' or select'.' while looping through every element with for-each select="*" I get some of the text many times. How do I archive the outcome I wrote earlier? Even if I do a template for every element I don't know how to get the text only of this node and not of the child. And it should also stay in the same order, so I want the part of text before I enter a child node and so on...</p>
  
  <p>It may be a dumb question, but im new and im desperate about that :/</p>