<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:fo="http://www.w3.org/1999/XSL/Format">
  <xsl:output indent="yes"/>
  <xsl:template match="/">
    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
      <fo:layout-master-set>
        <fo:simple-page-master master-name="simple"
                  page-height="29.7cm"
                  page-width="21cm"
                  margin-top="1cm"
                  margin-bottom="2cm"
                  margin-left="2.5cm"
                  margin-right="2.5cm">
          <fo:region-body margin-top="1.5cm"/>
          <fo:region-before extent="1.5cm"/>
          <fo:region-after extent="1.5cm"/>
        </fo:simple-page-master>
      </fo:layout-master-set>

      <fo:page-sequence master-name="simple" initial-page-number="1">
        <!-- usage of page layout -->
        <!-- header -->
        <fo:static-content flow-name="xsl-region-before">
          <fo:block text-align="end"
                font-size="10pt"
                font-family="sans-serif"
                line-height="14pt" >
           Created by FOP http://xml.apache.org/fop/
          </fo:block>
        </fo:static-content>

        <fo:flow flow-name="xsl-region-body">
          <xsl:apply-templates />
        </fo:flow>
      </fo:page-sequence>
    </fo:root>
  </xsl:template>

  <xsl:template match="nadpis">
      <fo:block font-size="16pt"
            font-family="Arial"
            space-after.optimum="15pt"
            text-align="center"
            break-before="page">
      <xsl:apply-templates />
      </fo:block>
  </xsl:template>

  <xsl:template match="odstavec">
   <fo:block font-size="12pt"
                font-family="Times"
                line-height="13pt"
                text-align="justify">
      <xsl:apply-templates />
   </fo:block>
  </xsl:template>

  <xsl:template match="i">
  <fo:inline font-style="italic"> <xsl:apply-templates /> </fo:inline>
  </xsl:template>
  <xsl:template match="b">
  <fo:inline font-weight="bold"> <xsl:apply-templates /> </fo:inline>
  </xsl:template>

  <xsl:template match="ul">
   <fo:list-block >
          <xsl:apply-templates select="li" />
   </fo:list-block>
  </xsl:template>

  <xsl:template match="li">
        <fo:list-item>
          <!-- insert a bullet -->
          <fo:list-item-label end-indent="label-end()">
            <fo:block><fo:inline font-family="Symbol">&#183;</fo:inline></fo:block>
          </fo:list-item-label>
          <!-- list text -->
          <fo:list-item-body start-indent="body-start()">
            <fo:block>
              <xsl:value-of select="text()"/>
            </fo:block>
          </fo:list-item-body>
        </fo:list-item>
  </xsl:template>

</xsl:stylesheet>

