<?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="no" method="text" encoding="cp852" saxon:character-representation="native"/>
   <xsl:strip-space elements="*"/><!-- Root element -->
   <xsl:template match="/">
      <xsl:apply-templates/>
   </xsl:template><!-- <html> will be converted to userdoc -->
   <xsl:template match="html">
:userdoc.
<xsl:apply-templates/>
:euserdoc.
</xsl:template><!-- <head> and <body> do nothing -->
   <xsl:template match="head|body">
      <xsl:apply-templates/>
   </xsl:template><!-- Title -->
   <xsl:template match="title">
:title.<xsl:apply-templates/>
   </xsl:template><!-- Header, first level -->
   <xsl:template match="h1">
:h1.<xsl:apply-templates/>
   </xsl:template><!-- Display subtitles as parahraphs in bold -->
   <xsl:template match="subtitle">
:p.:hp2.<xsl:apply-templates/>:ehp2.

</xsl:template><!-- Paragraphs -->
   <xsl:template match="p">
:p.<xsl:apply-templates/>
   </xsl:template><!-- Explanation -->
   <xsl:template match="explanation">
      <xsl:choose>
         <xsl:when test="@type=&#34;begin&#34;">
:p.[<xsl:apply-templates/>
         </xsl:when>
         <xsl:when test="@type=&#34;middle&#34;">
:p.<xsl:apply-templates/>
         </xsl:when>
         <xsl:when test="@type=&#34;end&#34;">
:p.<xsl:apply-templates/>]
    </xsl:when>
         <xsl:otherwise>
:p.[<xsl:apply-templates/>]
    </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.

</xsl:template>
</xsl:stylesheet>