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:import href="hr_custom_default.xsl"/>
7 <xsl:import href="hr_custom_rml.xsl"/>
9 <xsl:template match="/">
10 <xsl:call-template name="rml" />
13 <xsl:template name="stylesheet">
14 <paraStyle name="normal" fontName="Helvetica" fontSize="6" alignment="left" />
15 <paraStyle name="normal-title" fontName="Helvetica" fontSize="10" alignment="center"/>
16 <paraStyle name="digits" fontName="Helvetica" fontSize="6" alignment="left"/>
17 <paraStyle name="title" fontName="Helvetica" fontSize="18" alignment="center" />
18 <paraStyle name="dept" fontName="Helvetica-Bold" fontSize="8" alignment="left" />
19 <paraStyle name="employee" fontName="Helvetica-Bold" fontSize="6" textColor="black" />
20 <paraStyle name="leaveid" fontName="Helvetica" fontSize="6" alignment="center" />
21 <paraStyle name="print-date" fontName="Helvetica" fontSize="11" alignment="right" />
22 <paraStyle name="sum" fontName="Helvetica-BoldOblique" fontSize="6" alignment="left" />
23 <paraStyle name="company" textColor="purple" fontName="Helvetica-Bold" fontSize="11" alignment="left"/>
24 <blockTableStyle id="header">
25 <blockAlignment value="LEFT" start="0,0" stop="-1,-1"/>
26 <blockFont name="Helvetica" size="8" start="0,0" stop="-1,-1"/>
27 <blockValign value="TOP"/>
29 <blockTableStyle id="products">
30 <blockAlignment value="CENTER" start="1,0" stop="-1,-1"/>
31 <lineStyle kind="LINEABOVE" colorName="black" start="0,0" stop="-1,-1" />
32 <lineStyle kind="LINEBEFORE" colorName="black" start="0,0" stop="-1,-1"/>
33 <lineStyle kind="LINEAFTER" colorName="black" start="-1,0" stop="-1,-1"/>
34 <lineStyle kind="LINEBELOW" colorName="black" start="0,-1" stop="-1,-1"/>
35 <blockFont name="Helvetica-Bold" size="8" start="0,-1" stop="-1,-1"/>
36 <blockValign value="TOP"/>
38 <blockTableStyle id="legend">
39 <blockAlignment value="CENTER" start="0,0" stop="-1,-1" />
40 <blockFont name="Helvetica" size="7" start="0,0" stop="-1,-1"/>
41 <lineStyle kind="LINEABOVE" colorName="black" start="0,0" stop="-1,-1" />
42 <lineStyle kind="LINEBEFORE" colorName="black" start="0,0" stop="-1,-1"/>
43 <lineStyle kind="LINEAFTER" colorName="black" start="-1,0" stop="-1,-1"/>
44 <lineStyle kind="LINEBELOW" colorName="black" start="0,-1" stop="-1,-1"/>
45 <blockBackground colorName="#FFFFFF" start="0,0" stop="-1,-1"/>
46 <xsl:for-each select="/report/legend">
48 <xsl:attribute name="colorName">
49 <xsl:value-of select="attribute::color" />
51 <xsl:attribute name="start">
52 <xsl:text>0,</xsl:text>
53 <xsl:value-of select="attribute::row" />
55 <xsl:attribute name="stop">
56 <xsl:text>0,</xsl:text>
57 <xsl:value-of select="attribute::row" />
61 <blockValign value="TOP"/>
63 <blockTableStyle id="month">
64 <blockAlignment value="CENTER" start="1,0" stop="-1,-1" />
65 <blockFont name="Helvetica" size="5" start="0,0" stop="-1,-1"/>
66 <blockFont name="Helvetica-BoldOblique" size="4.5" start="-1,0" stop="-1,-1"/>
67 <blockBackground colorName="#FFFFFF" start="1,0" stop="-2,1"/>
68 <xsl:for-each select="/report/days/dayy[@name='Sat' or @name='Sun']">
69 <xsl:variable name="col" select="attribute::cell" />
71 <xsl:attribute name="colorName">lightgrey</xsl:attribute>
72 <xsl:attribute name="start">
73 <xsl:value-of select="$col" />
74 <xsl:text>,0</xsl:text>
76 <xsl:attribute name="stop">
77 <xsl:value-of select="$col" />
78 <xsl:text>,-1</xsl:text>
82 <xsl:for-each select="/report/info">
83 <xsl:variable name="val" select="attribute::val" />
84 <xsl:variable name="col" select="attribute::number" />
85 <xsl:variable name="row" select="attribute::id" />
86 <xsl:for-each select="/report/legend">
87 <xsl:variable name="val_id" select="attribute::id" />
88 <xsl:variable name="color" select="attribute::color" />
89 <xsl:if test="$val_id = $val ">
91 <xsl:attribute name="colorName"><xsl:value-of select="$color" /></xsl:attribute>
92 <xsl:attribute name="start">
93 <xsl:value-of select="$col" />
94 <xsl:text>,</xsl:text>
95 <xsl:value-of select="$row + 1" />
97 <xsl:attribute name="stop">
98 <xsl:value-of select="$col" />
99 <xsl:text>,</xsl:text>
100 <xsl:value-of select="$row + 1" />
106 <xsl:for-each select="report/employee">
107 <xsl:variable name="dept" select="attribute::id" />
108 <xsl:variable name="row" select="attribute::row" />
109 <xsl:if test="$dept = 1">
111 <xsl:attribute name="colorName">lightgrey</xsl:attribute>
112 <xsl:attribute name="start">
113 <xsl:text>0,</xsl:text>
114 <xsl:value-of select="$row +1" />
116 <xsl:attribute name="stop">
117 <xsl:text>0,</xsl:text>
118 <xsl:value-of select="$row +1" />
123 <lineStyle kind="LINEABOVE" colorName="black" start="0,0" stop="-1,-1" />
124 <lineStyle kind="LINEBEFORE" colorName="black" start="0,0" stop="-1,-1"/>
125 <lineStyle kind="LINEAFTER" colorName="black" start="-1,0" stop="-1,-1"/>
126 <lineStyle kind="LINEBELOW" colorName="black" start="0,-1" stop="-1,-1"/>
127 <blockValign value="TOP"/>
131 <xsl:template name="story">
132 <xsl:variable name="cols_header">
133 <xsl:text>13.7cm,13.7cm</xsl:text>
136 <xsl:attribute name="style">header</xsl:attribute>
137 <xsl:attribute name="colWidths"><xsl:value-of select="$cols_header"/></xsl:attribute>
139 <xsl:for-each select="report/res">
151 <spacer length="1.0cm" />
152 <para style="title" t="1">Off-Days' Summary</para>
153 <spacer length="0.5cm" />
154 <para style="normal-title" t="1">Analyze from <u><xsl:value-of select="report/from" /></u> to <u> <xsl:value-of select="report/to" /> </u> of the <u><xsl:value-of select="report/type" /></u> holidays. </para>
155 <spacer length="1.0cm" />
156 <xsl:variable name="cols_legend">
157 <xsl:text>0.7cm,5.0cm</xsl:text>
160 <xsl:attribute name="style">products</xsl:attribute>
161 <xsl:attribute name="colWidths"><xsl:value-of select="report/cols_months"/></xsl:attribute>
164 <xsl:for-each select="report/months">
166 <xsl:value-of select="attribute::name" />
174 <xsl:attribute name="style">month</xsl:attribute>
175 <xsl:attribute name="colWidths"><xsl:value-of select="report/cols" /></xsl:attribute>
178 <xsl:for-each select="report/days/dayy">
180 <xsl:value-of select="attribute::name" />
187 <xsl:attribute name="style">employee</xsl:attribute>
188 Departments and Employees
191 <xsl:for-each select="report/days/dayy">
192 <td><para><xsl:attribute name="style">digits</xsl:attribute>
193 <xsl:value-of select="attribute::number" /></para>
198 <xsl:apply-templates select="report/employee"/>
199 <xsl:for-each select="report/employee">
200 <xsl:variable name="id" select="attribute::id"/>
201 <xsl:variable name="rw" select="attribute::row"/>
202 <xsl:variable name="sum" select="attribute::sum"/>
207 <xsl:when test="$id = 1">
208 <xsl:attribute name="style">dept</xsl:attribute>
211 <xsl:attribute name="style">normal</xsl:attribute>
214 <xsl:value-of select="attribute::name"/>
217 <xsl:for-each select="//report/days/dayy">
218 <xsl:variable name="cell" select="attribute::cell" />
220 <para><xsl:attribute name="style">digits</xsl:attribute>
221 <xsl:value-of select="//employee[@row=$rw]/time-element[@index=$cell]"/>
227 <xsl:attribute name="style">sum</xsl:attribute><xsl:value-of select="attribute::sum"/></para></td>
232 <spacer length="1cm" />
233 <condPageBreak height="1in" />
235 <xsl:attribute name="style">legend</xsl:attribute>
236 <xsl:attribute name="colWidths"><xsl:value-of select="$cols_legend"/></xsl:attribute>
239 <td>Holiday Type</td>
242 <xsl:for-each select="report/legend">
246 <xsl:attribute name="style">digits</xsl:attribute>
251 <xsl:attribute name="style">normal</xsl:attribute>
252 <xsl:value-of select="attribute::name"/>