title: Strange XSL matching behaviour
body: <p>There is something about XSL matching rules I cannot get.</p>
  
  <p>I've this input: </p>
  
  <pre><code>&lt;root&gt;
    &lt;metadata&gt;
    &lt;/metadata&gt;
    &lt;elements&gt;
      &lt;a-elems&gt;
            &lt;a&gt;A1&lt;/a&gt;
            &lt;a&gt;A2&lt;/a&gt;
      &lt;/a-elems&gt;
      &lt;b-elems&gt;
        &lt;b&gt;B1&lt;/b&gt;
        &lt;b&gt;B2&lt;/b&gt;
      &lt;/b-elems&gt;
    &lt;/elements&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>This XSL works as I want, a list of <code>&lt;a&gt;</code> values is reported:</p>
  
  <pre><code>&lt;xsl:stylesheet 
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      version="2.0"&gt;
  
      &lt;xsl:template match = "/"&gt;
          _____ Elements _____
          &lt;xsl:apply-templates select = "root/elements/*/*" /&gt;
      &lt;/xsl:template&gt;
  
  
    &lt;xsl:template match = "a-elems/a"&gt;
      __ A ELEM: &lt;xsl:value-of select = "."&gt;&lt;/xsl:value-of&gt; __
    &lt;/xsl:template&gt;
  
    &lt;xsl:template match="*"&gt;
          &lt;xsl:message&gt;Excluding &lt;xsl:value-of select = "name(.)" /&gt;&lt;/xsl:message&gt;
    &lt;/xsl:template&gt;
  
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p>However, I think this root template, where I state the level I want to start from, would be cleaner:</p>
  
  <pre><code>&lt;xsl:template match = "/root/elements"&gt;
      _____ Elements _____
      &lt;xsl:apply-templates select = "*/*" /&gt;
  &lt;/xsl:template&gt;
  </code></pre>
  
  <p>But it doesn't work, I get the 'Excluding root' message and I understand the template never matches. I don't get why, I've also tried select = "*" and adding priority attributes.</p>