<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:saxon="http://icl.com/saxon" version="1.0" extension-element-prefixes="saxon">
   <xsl:output indent="yes" method="html" encoding="utf-8" saxon:character-representation="native"/>
   <xsl:strip-space elements="*"/><!-- Root element -->
   <xsl:template match="/">
      <xsl:apply-templates/>
   </xsl:template><!-- All elements with attributes -->
   <xsl:template match="@*|node()">
      <xsl:copy>
         <xsl:apply-templates select="@*|node()"/>
      </xsl:copy>
   </xsl:template><!-- End of common area --><!-- Display subtitles as parahraphs in bold -->
   <xsl:template match="subtitle">
      <p>
         <b>
            <xsl:apply-templates/>
         </b>
      </p>
   </xsl:template><!-- Explanation -->
   <xsl:template match="explanation">
      <xsl:choose>
         <xsl:when test="@type=&#34;begin&#34;">
            <p>[<xsl:apply-templates/>
            </p>
         </xsl:when>
         <xsl:when test="@type=&#34;middle&#34;">
            <p>
               <xsl:apply-templates/>
            </p>
         </xsl:when>
         <xsl:when test="@type=&#34;end&#34;">
            <p>
               <xsl:apply-templates/>]</p>
         </xsl:when>
         <xsl:otherwise>
            <p>[<xsl:apply-templates/>]</p>
         </xsl:otherwise>
      </xsl:choose>
   </xsl:template><!-- Quotes -->
   <xsl:template match="quote">
  ,,<xsl:apply-templates/>''
</xsl:template><!-- Comment -->
   <xsl:template match="comment">
      <p>Text této smlouvy uvozený hranatými závorkami (znaky [ a ]) má vysvětlující povahu.</p>
   </xsl:template>
</xsl:stylesheet>

