title: Apply templates to words and characters in XSLT
body: <p>I have XML files with text and I want to format certain words and characters. These could be within several elements, such as <em>l</em>, <em>add</em> and others. So I want to look up for characters like letter <em>e</em> or symbols and change its format. I want to exclude from my search text within <em>abbr</em> element.
  Thanks.</p>
  <p><strong>EDIT: I'm using XSLT 1.0 and I can't upgrade it.</strong></p>
  <p>Take this text as an example:</p>
  <pre><code>&lt;l n=&quot;1&quot; type=&quot;latin&quot;&gt;Lorem ipsum dolor sit amet, &lt;add type=&quot;con&quot; xml:id=&quot;add2&quot;&gt;consectetur&lt;/add&gt; adipiscing elit, &lt;abbr&gt;se&lt;/abbr&gt;d do eiusmod tempor incididunt ut labore et dolore magna aliqua&lt;/l&gt;
  </code></pre>
  <p>Desired output:</p>
  <blockquote>
  <p>Lor<strong>e</strong>m ipsum dolor sit am<strong>e</strong>t,cons<strong>e</strong>ct<strong>e</strong>tur
  adipiscing <strong>e</strong>lit, sed do <strong>e</strong>iusmod t<strong>e</strong>mpor
  incididunt ut labor<strong>e</strong> <strong>e</strong>t dolor<strong>e</strong> magna aliqua</p>
  </blockquote>
  <p>XML Header</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding =&quot;UTF-8&quot; standalone =&quot;no&quot; ?&gt;
  </code></pre>
  <p>XSLT Header</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  
  &lt;xsl:stylesheet xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot;
      xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot;
      xmlns:tei=&quot;http://www.tei-c.org/ns/1.0&quot;
      exclude-result-prefixes=&quot;xs tei&quot;
      version=&quot;1.0&quot;&gt;
      &lt;xsl:output method=&quot;html&quot; encoding=&quot;UTF-8&quot; indent=&quot;yes&quot;/&gt;
  </code></pre>