added comment to the account.h
[account.git] / saldibalans.xsl
1 <?xml version="1.0"?>
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
3
4 <xsl:strip-space elements="doc chapter section"/>
5 <xsl:output method="xml" indent="yes" encoding="iso-8859-1"
6             doctype-system="http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd"
7             doctype-public="-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"/>
8
9 <xsl:template match="balance-sheet">
10 <html>
11   <xsl:attribute name='xmlns'>http://www.w3.org/1999/xhtml</xsl:attribute>
12 <head>
13 </head>
14 <body>
15    <h1>Saldi Balans</h1>
16    <h2>Periode van <xsl:value-of select='@begin'/> tot <xsl:value-of select='@end'/></h2>
17
18    <table border='1'>
19    <tr><th>Rekening</th><th colspan='2'>Kosten</th><th colspan='2'>Balans</th></tr>
20    <tr><th> </th><th>DEBET</th><th>CREDIT</th><th>DEBET</th><th>CREDIT</th></tr>
21       <xsl:apply-templates/>
22    <tr>
23    <td><b>TOTAAL</b></td>
24    <td align='right'><b><xsl:value-of select="sum(account[type='COST' and balance='DEBIT']/amount)"/></b></td>
25    <td align='right'><b><xsl:value-of select="sum(account[type='COST' and balance='CREDIT']/amount)"/></b></td>
26    <td align='right'><b><xsl:value-of select="sum(account[type='BALANCE' and balance='DEBIT']/amount)"/></b></td>
27    <td align='right'><b><xsl:value-of select="sum(account[type='BALANCE' and balance='CREDIT']/amount)"/></b></td>
28    </tr>
29    </table>
30
31 </body>
32 </html>
33 </xsl:template>
34
35 <xsl:template match="account[type='COST' and balance='DEBIT']">
36   <tr>
37     <xsl:apply-templates select="name"/>
38     <xsl:apply-templates select='amount'/>
39     <td> </td>
40     <td> </td>
41     <td> </td>
42   </tr>
43 </xsl:template>
44
45 <xsl:template match="account[type='COST' and balance='CREDIT']">
46   <tr>
47     <xsl:apply-templates select="name"/>
48     <td> </td>
49     <xsl:apply-templates select='amount'/>
50     <td> </td>
51     <td> </td>
52   </tr>
53 </xsl:template>
54
55 <xsl:template match="account[type='BALANCE' and balance='DEBIT']">
56   <tr>
57     <xsl:apply-templates select="name"/>
58     <td> </td>
59     <td> </td>
60     <xsl:apply-templates select='amount'/>
61     <td> </td>
62   </tr>
63 </xsl:template>
64
65 <xsl:template match="account[type='BALANCE' and balance='CREDIT']">
66   <tr>
67     <xsl:apply-templates select="name"/>
68     <td> </td>
69     <td> </td>
70     <td> </td>
71     <xsl:apply-templates select='amount'/>
72   </tr>
73 </xsl:template>
74
75
76 <xsl:template match="number"/>
77 <xsl:template match="type"/>
78 <xsl:template match="balance"/>
79
80 <xsl:template match="name">
81   <td><xsl:apply-templates/></td>
82 </xsl:template>
83
84 <xsl:template match="amount">
85   <td align='right'><xsl:apply-templates/></td>
86 </xsl:template>
87
88 </xsl:stylesheet>