~technofluid-team/openobject-addons/technofluid_multiple_installations

« back to all changes in this revision

Viewing changes to stock/report/product_location.xsl

  • Committer: pinky
  • Date: 2006-12-07 13:41:40 UTC
  • Revision ID: pinky-dedd7f8a42bd4557112a0513082691b8590ad6cc
New trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="utf-8"?>
 
2
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
 
3
 
 
4
        <xsl:import href="../../custom/corporate_defaults.xsl"/>
 
5
        <xsl:import href="../../base/report/rml_template.xsl"/>
 
6
        <xsl:variable name="page_format">a4_normal</xsl:variable>
 
7
 
 
8
        <xsl:template match="/">
 
9
                <xsl:call-template name="rml"/>
 
10
        </xsl:template>
 
11
 
 
12
        <!-- stylesheet -->
 
13
 
 
14
        <xsl:template name="stylesheet">
 
15
                <paraStyle name="title" fontName="Helvetica-Bold" fontSize="12" alignment="center"/>
 
16
                <blockTableStyle id="headerm">
 
17
                        <blockBackground colorName="grey" start="0,0" stop="-1,0"/>
 
18
                        <blockValign value="TOP"/>
 
19
                         <blockAlignment value="CENTER"/>
 
20
                         <lineStyle kind="GRID" colorName="black"/>
 
21
                </blockTableStyle>
 
22
                <blockTableStyle id="header">
 
23
                        <blockBackground colorName="lightgrey" start="0,0" stop="-1,0"/>
 
24
                        <blockValign value="TOP"/>
 
25
                        <blockAlignment value="RIGHT" start="-1,0" stop="-1,-1"/>
 
26
                        <lineStyle kind="GRID" colorName="black"/>
 
27
                </blockTableStyle>
 
28
</xsl:template>
 
29
 
 
30
        <xsl:template name="story">
 
31
                <xsl:apply-templates select="report"/>
 
32
        </xsl:template>
 
33
        
 
34
        <xsl:template match="report">
 
35
                <xsl:apply-templates select="product"/>
 
36
        </xsl:template>
 
37
 
 
38
        <xsl:template match="product">
 
39
                <blockTable style="headerm" colWidths="15cm">
 
40
                <tr>
 
41
                        <td>
 
42
                                <para style="title">
 
43
                                        <xsl:value-of select="name"/>
 
44
                                        <xsl:text> (</xsl:text>
 
45
                                        <xsl:value-of select="unit"/>
 
46
                                        <xsl:text>)</xsl:text>
 
47
                                </para>
 
48
                        </td>
 
49
                </tr>
 
50
                </blockTable>
 
51
                <xsl:apply-templates select="locations"/>
 
52
                <spacer length="5mm" width="5mm"/>
 
53
        </xsl:template>
 
54
 
 
55
        <xsl:template match="locations">
 
56
                <blockTable style="header" colWidths="12cm,3cm">
 
57
                <tr>
 
58
                        <td t="1">Location</td>
 
59
                        <td t="1">Quantity</td>
 
60
                </tr>
 
61
                <xsl:apply-templates select="location"/>
 
62
                </blockTable>
 
63
        </xsl:template>
 
64
 
 
65
        <xsl:template match="location">
 
66
                <tr>
 
67
                        <td>
 
68
                                <para>
 
69
                                        <xsl:value-of select="loc_name"/>
 
70
                                </para>
 
71
                        </td>
 
72
                        <td>
 
73
                                        <xsl:value-of select="loc_qty"/>
 
74
                        </td>
 
75
                </tr>
 
76
        </xsl:template>
 
77
 
 
78
</xsl:stylesheet>