Initial revision of account
[account.git] / profit.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   <link rel="stylesheet" type="text/css" href="account.css"/>
14   <title>Winst en Verlies rekening</title>
15 </head>
16 <body>
17    <h1>Winst en Verlies rekening</h1>
18
19    <h2>Opbrengsten</h2>
20    <table>
21    <xsl:for-each select="account[type='COST' and balance='CREDIT']">
22       <tr><xsl:apply-templates/></tr>
23    </xsl:for-each>
24    <tr>
25    <td><b>TOTAAL</b></td>
26    <td><b><xsl:value-of select="sum(account[type='COST' and balance='CREDIT']/amount)"/></b></td>
27    </tr>
28    </table>
29
30    <h2>Kosten</h2>
31    <table>
32    <xsl:for-each select="account[type='COST' and balance='DEBIT']">
33       <tr><xsl:apply-templates/></tr>
34    </xsl:for-each>
35    <tr>
36    <td><b>TOTAAL</b></td>
37    <td><b><xsl:value-of select="sum(account[type='COST' and balance='DEBIT']/amount)"/></b></td>
38    </tr>
39    </table>
40
41 </body>
42 </html>
43 </xsl:template>
44
45 <xsl:template match="number"/>
46 <xsl:template match="type"/>
47 <xsl:template match="balance"/>
48
49 <xsl:template match="name">
50   <td><xsl:apply-templates/></td>
51 </xsl:template>
52
53 <xsl:template match="amount">
54   <td align='right'><xsl:apply-templates/></td>
55 </xsl:template>
56
57 </xsl:stylesheet>