title: format italic/bold tag with xpath and/or xsl-fo
body: <p>I have an similar issue like this question: <a href="https://stackoverflow.com/questions/7038895/using-xslt-to-create-xsl-fo-with-nested-bold-italic-tags">Using XSLT to create XSL-FO with nested bold/italic tags</a>. I want to detect <code>&lt;italic&gt;</code> and <code>&lt;bold&gt;</code> tags in XML Text and give it out right formatted with XSLT.
  I tried it like the solution in the other question but it seems it doesn't work for me. What am I missing?</p>
  
  <p>This is my XML structure:</p>
  
  <pre><code>&lt;bibliography&gt;
      &lt;type1&gt;
          Some text and &lt;italic&gt;italic Text&lt;/italic&gt; and &lt;bold&gt;bold text&lt;/bold&gt;
      &lt;/type1&gt;
      &lt;type2&gt;
          Some text and &lt;italic&gt;italic Text&lt;/italic&gt; and &lt;bold&gt;bold text&lt;/bold&gt;
      &lt;/type2&gt;
  &lt;/bibliography&gt;
  </code></pre>
  
  <p>This XSL works but without <code>&lt;italic&gt;</code> or <code>&lt;bold&gt;</code> tags:</p>
  
  <pre><code>&lt;xsl:template match="/bibliography/*"&gt;
      &lt;p&gt;
          &lt;div class="entry{@type}"&gt;
      [&lt;xsl:number count="*"/&gt;]
      &lt;xsl:apply-templates/&gt;
          &lt;/div&gt;
      &lt;/p&gt;
  &lt;/xsl:template&gt;
  </code></pre>
  
  <p>This is how I tried to use the solution on my XML structure:</p>
  
  <pre><code>&lt;xsl:template match="/bibliography/*"&gt;
      &lt;p&gt;
          &lt;div class="entry{@type}"&gt;
      [&lt;xsl:number count="*"/&gt;]
      &lt;xsl:apply-templates/&gt;
          &lt;/div&gt;
      &lt;/p&gt;
  &lt;/xsl:template&gt;
  &lt;xsl:template match="/"&gt;
      &lt;div class="entry{@type}"&gt;
          &lt;p&gt;
              &lt;fo:root&gt;
                  &lt;fo:page-sequence&gt;
                      &lt;fo:flow&gt;
                          &lt;xsl:apply-templates select="bibliography"/&gt;
                      &lt;/fo:flow&gt;
                  &lt;/fo:page-sequence&gt;
              &lt;/fo:root&gt;
          &lt;/p&gt;
      &lt;/div&gt;
  &lt;/xsl:template&gt;
  &lt;xsl:template match="italic"&gt;
      &lt;fo:inline font-style="italic"&gt;
          &lt;xsl:apply-templates select="node()"/&gt;
      &lt;/fo:inline&gt;
  &lt;/xsl:template&gt;
  
  &lt;xsl:template match="bold"&gt;
      &lt;fo:inline font-weight="bold"&gt;
          &lt;xsl:apply-templates select="node()"/&gt;
      &lt;/fo:inline&gt;  
  &lt;/xsl:template&gt;
  </code></pre>