<?xml version="1.0" encoding="UTF-8"?>
<!-- XSLT-шаблоны для печати, отправки на e-mail: наработка на e-mail и html -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:output method="html" encoding="UTF-8" indent="yes"/>

<xsl:template match="/data">
<html>

<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
</head>

<body>
    <center>
        <h2><xsl:value-of select="@reportTitle"/><br/>Контракт:&#160;<xsl:value-of select="@contractTitle"/>(<xsl:value-of select="@comment"/>)</h2>
         Период с: <xsl:value-of select="@date1"/> по <xsl:value-of select="@date2"/><br/><br/>
     </center>
    <xsl:call-template name="main"/><br/>
</body>
</html>
</xsl:template>

<xsl:template name="main">
<table width="100%" border="1" cellspacing="0" cellpadding="0">
<tr>
    <td><b>Месяц, год</b></td>
    <td><b><xsl:value-of select="@serviceName"/></b></td>
    <td><b>Сумма</b></td>
</tr>
<xsl:for-each select="/data/row">
    <tr>    
        <td> <xsl:value-of select="@date"/> </td>
        <td> <xsl:value-of select="@serviceTitle"/> </td>
        <td> <xsl:value-of select="@sum"></xsl:value-of></td>
    </tr>
</xsl:for-each>
</table>
</xsl:template>


</xsl:stylesheet>
