<?xml version="1.0" encoding="windows-1251"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:param name="mode" select="''" />


  <xsl:output method="html" encoding="utf-8" indent="no"/>
     
  <xsl:template match="/">
  <xsl:if test="$mode=''" >
         <xsl:apply-templates select="scrollbox"/>
          </xsl:if>
  <xsl:if test="$mode='images'" >
          <xsl:for-each select = "//image" > 
                    <xsl:value-of select = "@pic" /> ;
          </xsl:for-each>
   </xsl:if>
  </xsl:template>
   
  <xsl:template match="scrollbox">
     <xsl:apply-templates />
  </xsl:template>


  <xsl:template match="par">
     <xsl:apply-templates />
     <br/>
  </xsl:template>
 
  <xsl:template match="subsup">
      <xsl:apply-templates select="text[1]"/>
      <sup>
	  <xsl:apply-templates select="text[2]"/>
      </sup>
      <sub>
	  <xsl:apply-templates select="text[3]"/>
      </sub>
  </xsl:template>

  <xsl:template match="text">
      <xsl:element name="font">
	<xsl:attribute name="face">
           <xsl:value-of select="@fn" />
	</xsl:attribute>

      <xsl:choose> 
      <xsl:when test="@fs='b'">
          <b>
             <xsl:apply-templates/>
          </b>
      </xsl:when>
      <xsl:otherwise> 
             <xsl:apply-templates/>
      </xsl:otherwise> 
    </xsl:choose> 

      </xsl:element>
  </xsl:template>

</xsl:stylesheet>
