xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
- <xsl:template match="/">
- <xsl:call-template name="rml" />
- </xsl:template>
-
+ <xsl:import href="custom_default.xsl"/>
+ <xsl:import href="custom_rml.xsl"/>
- <xsl:template name="rml">
- <document filename="example.pdf">
- <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">
- <pageTemplate id="first">
- <frame id="col1" x1="2.0cm" y1="2.5cm" width="24.7cm" height="17cm"/>
- </pageTemplate>
- </template>
+ <xsl:template match="/">
+ <xsl:call-template name="rml"/>
+ </xsl:template>
- <stylesheet>
+ <xsl:template name="stylesheet">
<paraStyle name="normal" fontName="Helvetica" fontSize="6" alignment="left" />
<paraStyle name="normal-title" fontName="Helvetica" fontSize="6" />
<paraStyle name="title" fontName="Helvetica" fontSize="18" alignment="center" />
<blockFont name="Helvetica" size="6" start="0,2" stop="-2,-2"/>
<blockFont name="Helvetica-BoldOblique" size="8" start="0,-1" stop="-1,-1"/>
<blockBackground colorName="#AAAAAA" start="1,0" stop="-2,1"/>
- <xsl:for-each select="/report/days/day[@name='Sat' or @name='Sun']">
+ <xsl:for-each select="/report/days/day[@weekday=6 or @weekday=7]">
<xsl:variable name="col" select="attribute::number" />
<blockBackground>
<xsl:attribute name="colorName">lightgrey</xsl:attribute>
<lineStyle kind="LINEBELOW" colorName="black" start="0,-1" stop="-1,-1"/>
<blockValign value="TOP"/>
</blockTableStyle>
- </stylesheet>
-
- <story>
- <xsl:call-template name="story"/>
- </story>
- </document>
- </xsl:template>
+ </xsl:template>
<xsl:template name="story">
- <para style="title" t="1">Timesheet</para>
+ <spacer length="1cm" />
+ <para style="title" t="1">Timesheet by Employee</para>
<spacer length="1cm" />
<para style="employee"><xsl:value-of select="/report/employee" /></para>
<spacer length="1cm" />
</td>
</tr>
</xsl:template>
-</xsl:stylesheet>
\ No newline at end of file
+</xsl:stylesheet>