<?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="@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:for-each select="/data/month">
"<xsl:value-of select="@title"/>";
<xsl:for-each select="row">
<xsl:value-of select="@date"/>;<xsl:value-of select="@contractTitle"/>;<xsl:value-of select="@type"/>;<xsl:value-of select="@comment"/>;<xsl:value-of select="@summa"/>;<xsl:value-of select="@summAfterCharge"/>;
</xsl:for-each>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
