title: Wildcard formatting in XML & XSLT
body: <p>Why doesn't this line:</p>
  
  <p><strong><code>apply-templates select="*/*</code></strong> (under the "shop" element in the XSLT file)</p>
  
  <p>apply bold formatting to <code>Blake2</code>? The output looks like this:</p>
  
  <blockquote>
    <p>Start of root in XSLT</p>
    
    <p>"Step 1 start" <strong>Alexis</strong> (Task: Sales )
    <strong>Employee2</strong> (Task: ) Blake2 "Step 1 done"</p>
    
    <p>End of root in XSLT</p>
  </blockquote>
  
  <p>My question is, why isn't <code>Blake2</code> also in bold? It's under the <code>&lt;employee&gt;</code> element.</p>
  
  <p>Changing that line to <strong><code>*apply-templates select="*"</code></strong> causes <code>Blake2</code> to be in bold. What makes this different?</p>
  
  <p>Here's the XML file:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt; 
  &lt;?xml-stylesheet type="text/xsl" href="2.xsl" ?&gt;
  
  &lt;root&gt;
      &lt;shop&gt;
          &lt;person&gt; 
              &lt;employee&gt; 
                  &lt;name&gt; Alexis &lt;/name&gt; 
                  &lt;role&gt; Manager &lt;/role&gt; 
                  &lt;task&gt; Sales &lt;/task&gt; 
              &lt;/employee&gt; 
  
              &lt;employee&gt;
                  &lt;name&gt; Employee2 &lt;/name&gt;
              &lt;/employee&gt;
          &lt;/person&gt;
  
          &lt;employee&gt;
              &lt;name&gt; Blake2 &lt;/name&gt;
          &lt;/employee&gt;
  
      &lt;/shop&gt;
  
  &lt;/root&gt;
  </code></pre>
  
  <p>Here's the XSLT file:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;
  
  &lt;xsl:template match="root"&gt; 
  &lt;html&gt;&lt;head&gt;&lt;/head&gt; 
  &lt;body&gt;
  Start of root in XSLT &lt;p/&gt; &lt;xsl:apply-templates /&gt; &lt;p/&gt;
  
  End of root in XSLT
  
  &lt;/body&gt; 
  &lt;/html&gt; 
  &lt;/xsl:template&gt; 
  
  &lt;xsl:template match="shop"&gt;
  "Step 1 start"
  &lt;xsl:apply-templates select="*/*"/&gt;
  "Step 1 done" &lt;p/&gt;
  &lt;/xsl:template&gt; 
  
  &lt;xsl:template match="employee"&gt; 
  &lt;b&gt; &lt;xsl:apply-templates select="name"/&gt; &lt;/b&gt; 
  (Task: &lt;xsl:apply-templates select="task"/&gt;) 
  &lt;br&gt;&lt;/br&gt; 
  &lt;/xsl:template&gt; 
  
  &lt;/xsl:stylesheet&gt;
  </code></pre>