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">
5 <xsl:import href="../../base/report/corporate_defaults.xsl" />
6 <xsl:template match="/">
7 <xsl:call-template name="rml" />
11 <xsl:template name="rml" match="/">
12 <document filename="example.pdf">
14 <pageTemplate id="first">
15 <frame id="first" x1="1cm" y1="2.5cm" width="19.0cm" height="23.0cm"/>
22 <paraStyle name="normal" fontName="Times-Roman" fontSize="12" />
23 <paraStyle name="title" fontName="Times-Bold" fontSize="15" alignment="center" />
24 <paraStyle name="table_title" fontName="Times-Bold" fontSize="12" alignment="center" />
25 <paraStyle name="product1" fontName="Times-Roman" fontSize="8" />
26 <paraStyle name="categ" fontName="Times-Bold" fontSize="10" textColor="blue"/>
27 <paraStyle name="price" fontName="Times-Roman" fontSize="8" alignment="right" />
29 <blockTableStyle id="main_title">
30 <blockAlignment value="CENTER" />
31 <lineStyle kind="GRID" colorName="black"/>
32 <blockBackground colorName="#e6e6e6" />
33 <blockValign value="TOP"/>
36 <blockTableStyle id="product">
37 <blockAlignment value="LEFT" />
38 <xsl:for-each select="/report/title">
39 <xsl:variable name="col" select="attribute::number" />
41 <xsl:attribute name="colorName">#e6e6e6</xsl:attribute>
42 <xsl:attribute name="start">
43 <xsl:value-of select="$col" />
44 <xsl:text>,0</xsl:text>
46 <xsl:attribute name="stop">
47 <xsl:value-of select="$col" />
48 <xsl:text>,0</xsl:text>
52 <lineStyle kind="LINEABOVE" colorName="black" start="0,0" stop="-1,-1" />
53 <lineStyle kind="LINEBEFORE" colorName="black" start="0,0" stop="-1,-1"/>
54 <lineStyle kind="LINEAFTER" colorName="black" start="-1,0" stop="-1,-1"/>
55 <lineStyle kind="LINEBELOW" colorName="black" start="0,-1" stop="-1,-1"/>
56 <blockValign value="TOP"/>
60 <xsl:call-template name="story"/>
65 <xsl:template name="story">
66 <spacer length="1cm" />
67 <blockTable rowHeights="1cm">
68 <xsl:attribute name="style">main_title</xsl:attribute>
69 <tr> <td> <para style="title" t="1">Products Price List</para> </td> </tr>
71 <spacer length="1cm" />
72 <para style="normal" t="1">Price List Name :<xsl:value-of select="report/pricelist" /></para>
73 <para style="normal" t="1">Currency : <xsl:value-of select="report/currency" /></para>
74 <para style="normal" t="1">Printing Date : <xsl:value-of select="report/date" /></para>
75 <spacer length="0.7cm" />
77 <xsl:attribute name="style">product</xsl:attribute>
78 <xsl:attribute name="colWidths"><xsl:value-of select="report/cols" /></xsl:attribute>
80 <xsl:for-each select="report/title" >
81 <td><para style="table_title"> <xsl:value-of select="attribute::name" /> </para></td>
85 <xsl:for-each select="report/product/pro" >
88 <xsl:when test="@categ">
89 <td> <para style="categ"><xsl:value-of select="attribute::name" /> </para> </td>
92 <td> <para style="product1"> <xsl:value-of select="attribute::name" /> </para> </td>
96 <xsl:for-each select="price" >
97 <td><para style="price"> <xsl:value-of select="attribute::name" /> </para> </td>