title: Using XSLT to create XSL-FO with nested bold/italic tags
body: <p>I'm creating xslt file, which should convert my xml into xsl-fo.</p>
  
  <p>XML is something like that:</p>
  
  <pre><code>&lt;doc&gt;
    &lt;par&gt;
      &lt;point&gt;
        &lt;text&gt;some text&lt;/text&gt;
      &lt;/point&gt;
    &lt;/par&gt;
  &lt;/doc&gt;
  </code></pre>
  
  <p>Of course, there are many paragraphs and points in document. I would like to add possibility to format "some text", for example</p>
  
  <pre><code>&lt;bold&gt;bolded text&lt;/bold&gt; and &lt;italic&gt;italic&lt;/italic&gt;
  </code></pre>
  
  <p>Should give</p>
  
  <pre><code>&lt;fo:block&gt;&lt;fo:inline font-weight="bold"&gt;bolded text&lt;/fo:inline&gt; and &lt;fo:inline font-style="italic"&gt;italic&lt;/fo:inline&gt;
  </code></pre>
  
  <p>Now I have quite simple xslt document, like this:</p>
  
  <pre><code>&lt;xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" exclude-result-prefixes="fo"&gt;
    &lt;xsl:output method="xml" version="1.0" omit-xml-declaration="no" indent="yes"/&gt;
    &lt;xsl:param name="versionParam" select="'1.0'"/&gt; 
    &lt;xsl:template match="doc"&gt;
      &lt;fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"&gt;
        &lt;fo:layout-master-set&gt;
          &lt;fo:simple-page-master master-name="simpleA4" page-height="29.7cm" page-width="21cm" margin-top="2cm" margin-bottom="2cm" margin-left="2cm" margin-right="2cm"&gt;
            &lt;fo:region-body margin="2cm"/&gt;
            &lt;fo:region-before margin="0.2cm" extent="1.5cm"/&gt;
          &lt;/fo:simple-page-master&gt;
        &lt;/fo:layout-master-set&gt;
        &lt;fo:page-sequence master-reference="simpleA4"&gt;
          &lt;fo:static-content flow-name="xsl-region-before"  margin-right="1cm"&gt; 
              &lt;fo:block text-align="start" margin-top="0.2cm"&gt;
              &lt;fo:block text-align="end" margin-top="0.2cm"&gt;
                  Page &lt;fo:page-number/&gt; of &lt;fo:page-number-citation ref-id="terminator"/&gt;
              &lt;/fo:block&gt;
          &lt;/fo:static-content&gt;
          &lt;fo:flow flow-name="xsl-region-body"&gt;
            &lt;xsl:apply-templates select="par/point"/&gt;
            &lt;fo:block id="terminator"/&gt;
          &lt;/fo:flow&gt;
        &lt;/fo:page-sequence&gt;
      &lt;/fo:root&gt;
    &lt;/xsl:template&gt;
    &lt;xsl:template match="point"&gt;
      &lt;fo:block font-size="16pt" space-after="5mm"&gt;
          &lt;xsl:value-of select="tresc"/&gt;
      &lt;/fo:block&gt;
    &lt;/xsl:template&gt;
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p>Should I add another template (bold, italic)? How am I supposed to call it in "text" node? </p>
  
  <p>I found some solution:</p>
  
  <pre><code>&lt;xsl:template match="//bold"&gt;
      &lt;fo:inline font-weight="bold"&gt;
          &lt;xsl:value-of select="current()"&gt;&lt;/xsl:value-of&gt;
      &lt;/fo:inline&gt;
  &lt;/xsl:template&gt;
  </code></pre>
  
  <p>But it didn't work for me. Output xsl-fo dosn't contain any fo:inline.</p>