1
<?xml version="1.0" encoding="utf-8"?>
2
<xsl:stylesheet version="1.0"
3
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4
xmlns:fo="http://www.w3.org/1999/XSL/Format">
6
<xsl:template match="/">
7
<xsl:call-template name="rml" />
11
<xsl:template name="rml">
12
<document filename="example.pdf">
13
<template pageSize="29.7cm,21cm" leftMargin="2.0cm" rightMargin="2.0cm" topMargin="2.0cm" bottomMargin="2.0cm" title="Timesheets" author="Generated by Tiny ERP, Fabien Pinckaers" allowSplitting="20">
14
<pageTemplate id="first">
16
<drawRightString x="19.0cm" y="26.0cm"><xsl:value-of select="date"/></drawRightString>
18
<frame id="col1" x1="2.0cm" y1="2.5cm" width="22.7cm" height="18cm"/>
23
<paraStyle name="name" fontName="Helvetica" textColor="green" fontSize="7"/>
24
<paraStyle name="normal" fontName="Helvetica" fontSize="6"/>
25
<blockTableStyle id="week">
26
<blockFont name="Helvetica-BoldOblique" size="8" start="0,0" stop="-1,0"/>
27
<blockFont name="Helvetica" size="5" start="0,1" stop="-1,-1"/>
28
<blockBackground colorName="grey" start="0,0" stop="-1,0"/>
29
<lineStyle kind="LINEABOVE" colorName="grey" start="0,0" stop="-1,0" />
30
<lineStyle kind="LINEBEFORE" colorName="grey" start="0,0" stop="-1,-1"/>
31
<lineStyle kind="LINEAFTER" colorName="grey" start="-1,0" stop="-1,-1"/>
32
<blockValign value="TOP"/>
37
<xsl:call-template name="story"/>
42
<xsl:template name="story">
44
colWidths="2cm,0.79cm,0.79cm,0.79cm,0.79cm,0.79cm,0.79cm,0.79cm,0.79cm,0.79cm,0.79cm,0.79cm,0.79cm,0.79cm,0.79cm,0.79cm,0.79cm,0.79cm,0.79cm,0.79cm,0.79cm,0.79cm,0.79cm,0.79cm,0.79cm,0.79cm,0.79cm,0.79cm,0.79cm,0.79cm,0.79cm,0.79cm" style="week">
46
<td><xsl:value-of select="/report/month" /><xsl:text> </xsl:text><xsl:value-of select="/report/year" /></td>
79
<xsl:apply-templates select="report/user"/>
83
<xsl:template match="user">
87
<para style="name"><xsl:value-of select="name" /></para>
88
<para style="normal"><xsl:text>By week: </xsl:text><xsl:value-of select="format-number(regime, '#.#')" /><xsl:text> h</xsl:text></para>
89
<para style="normal"><xsl:text>Holidays: </xsl:text><xsl:value-of select="holiday" /></para>
94
<xsl:for-each select="day">
95
<td><xsl:value-of select="th" /></td>
100
<xsl:for-each select="day">
101
<td><xsl:value-of select="wh" /></td>