Improved Postscript output handling.
[account.git] / balans.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>Balans</title>
15
16 </head>
17 <body>
18    <h1>Balans voor <xsl:value-of select='../@companyname'/> per <xsl:value-of select='@end'/></h1>
19
20    <h2>Bezittingen</h2>
21    <table>
22    <xsl:for-each select="account[type='BALANCE' and balance='DEBIT']">
23       <tr><xsl:apply-templates/></tr>
24    </xsl:for-each>
25    <tr>
26    <td><b>TOTAAL</b></td>
27    <td><b><xsl:value-of select="sum(account[type='BALANCE' and balance='DEBIT']/amount)"/></b></td>
28    </tr>
29    </table>
30
31    <h2>Schulden</h2>
32    <table>
33    <xsl:for-each select="account[type='BALANCE' and balance='CREDIT']">
34       <tr><xsl:apply-templates/></tr>
35    </xsl:for-each>
36    <tr>
37    <td><b>TOTAAL</b></td>
38    <td><b><xsl:value-of select="sum(account[type='BALANCE' and balance='CREDIT']/amount)"/></b></td>
39    </tr>
40    </table>
41
42 </body>
43 </html>
44 </xsl:template>
45
46 <xsl:template match="number"/>
47 <xsl:template match="type"/>
48 <xsl:template match="balance"/>
49
50 <xsl:template match="name">
51   <td><xsl:apply-templates/></td>
52 </xsl:template>
53
54 <xsl:template match="amount">
55   <td align='right'><xsl:apply-templates/></td>
56 </xsl:template>
57
58 </xsl:stylesheet>