title: XSLT, finding out if last child node is a specific element
body: <p>Look at the following two examples:</p>
  
  <pre><code>&lt;foo&gt;some text &lt;bar/&gt; and maybe some more&lt;/foo&gt;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>&lt;foo&gt;some text &lt;bar/&gt; and a last &lt;bar/&gt;&lt;/foo&gt;
  </code></pre>
  
  <p>Mixed text nodes and <code>bar</code> elements within the <code>foo</code> element. Now I am in <code>foo</code>, and want to find out if the last child is a <code>bar</code>. The first example should prove false, as there are text after the <code>bar</code>, but the second example should be true.</p>
  
  <p>How can I accomplish this with XSLT?</p>