<?xml version="1.0" encoding="UTF-8"?>
<!-- XSLT-шаблоны для печати, отправки на e-mail: наработка при сохранении в csv -->
<xsl:stylesheet
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:utils="ru.bitel.common.Utils"
    extension-element-prefixes="utils"
	version="1.0">

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

<xsl:template match="/data">
<xsl:value-of select="utils:insertBOM()"/>"<xsl:value-of select="@reportTitle"/>";
"Контракт:";"<xsl:value-of select="@contractTitle"/>";"<xsl:value-of select="@comment"/>";
"Период:";"<xsl:value-of select="@date1"/>";"<xsl:value-of select="@date2"/>";
<xsl:call-template name="main"/>
</xsl:template>

<xsl:template name="main">
"Месяц, год";"<xsl:value-of select="@serviceName"/>";"Сумма";
<xsl:for-each select="/data/row">
        <xsl:value-of select="@date"/>;<xsl:value-of select="@serviceTitle"/>;<xsl:value-of select="@sum"></xsl:value-of>;
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
