Attachment 'forecasts.xsl'
Download 1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!DOCTYPE stylesheet [<!ENTITY space '<xsl:text> </xsl:text>'>]>
3 <xsl:stylesheet version="1.0"
4 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
5
6 <!--
7 XSL stylesheet for analyst reviews on www.lbma.org.uk
8 Stephen Taylor • Lambent Technology • sjt@lambenttechnology.com
9 -->
10
11 <xsl:output method="html"/>
12
13 <xsl:template match="review">
14
15 <h1>Forecast <xsl:value-of select="@year"/></h1>
16
17 <ul id="tables">
18 <li><a onclick="showfcst('Gold')">Gold</a></li>
19 <li><a onclick="showfcst('Silver')">Silver</a></li>
20 <li><a onclick="showfcst('Platinum')">Platinum</a></li>
21 <li><a onclick="showfcst('Palladium')">Palladium</a></li>
22 </ul>
23
24 <p>
25 These clickable tables show our analysts’ forecasts
26 and commentary for <xsl:value-of select="@year"/>.
27 </p>
28
29
30 <ul id="comments">
31 <xsl:apply-templates select="analyst/commentary" />
32 </ul>
33
34
35 <h2 id="metal">Gold</h2>
36
37 <table id="Gold" class="forecast sortable">
38 <thead>
39 <tr><th></th><th>high</th><th>low</th><th>average</th></tr>
40 </thead>
41 <tbody>
42 <xsl:apply-templates select="//forecast[@metal='gold']">
43 <xsl:sort select="forecast[@metal='gold']/hi" order="ascending"/>
44 </xsl:apply-templates>
45 <tr class="actual"><td class="left">YTD actual at end [date]</td><td>0</td><td>0</td><td>0</td></tr>
46 </tbody>
47 </table>
48
49 <table id="Silver" class="forecast sortable">
50 <thead>
51 <tr><th></th><th>high</th><th>low</th><th>average</th></tr>
52 </thead>
53 <tbody>
54 <xsl:apply-templates select="analyst/forecast[@metal='silver']">
55 <xsl:sort select="forecast[@metal='silver']/hi" order="descending"/>
56 </xsl:apply-templates>
57 <tr class="actual"><td class="left">YTD actual at end [date]</td><td>0</td><td>0</td><td>0</td></tr>
58 </tbody>
59 </table>
60
61 <table id="Platinum" class="forecast sortable">
62 <thead>
63 <tr><th></th><th>high</th><th>low</th><th>average</th></tr>
64 </thead>
65 <tbody>
66 <xsl:apply-templates select="analyst/forecast[@metal='platinum']">
67 <xsl:sort select="forecast[@metal='platinum']/hi" order="descending"/>
68 </xsl:apply-templates>
69 <tr class="actual"><td class="left">YTD actual at end [date]</td><td>0</td><td>0</td><td>0</td></tr>
70 </tbody>
71 </table>
72
73 <table id="Palladium" class="forecast sortable">
74 <thead>
75 <tr><th></th><th>high</th><th>low</th><th>average</th></tr>
76 </thead>
77 <tbody>
78 <xsl:apply-templates select="analyst/forecast[@metal='palladium']">
79 <xsl:sort select="forecast[@metal='palladium']/hi" order="descending"/>
80 </xsl:apply-templates>
81 <tr class="actual"><td class="left">YTD actual at end [date]</td><td>0</td><td>0</td><td>0</td></tr>
82 </tbody>
83 </table>
84
85 <p>
86 Download the
87 <a href="archive/forecast2008.pdf">
88 forecast for <xsl:value-of select="@year"/>
89 </a>.
90 </p>
91
92 </xsl:template>
93
94
95 <xsl:template match="commentary">
96 <li class="{../familyname} {@metal}">
97 <xsl:apply-templates select="../pic"/>
98 <span class="author">
99 <xsl:value-of select="../forename"/>&space;
100 <xsl:value-of select="../familyname"/>
101 </span>
102 <xsl:apply-templates />
103 </li>
104 </xsl:template>
105
106 <xsl:template match="br">
107 <br/>
108 </xsl:template>
109
110
111 <xsl:template match="pic">
112 <img src="images/faces/{.}.jpg" alt="{../forename} {../familyname}" />
113 </xsl:template>
114
115
116 <xsl:template match="forecast">
117 <tr class="{../classname}{../familyname}" onclick="showcomments(this)">
118 <td class="left">
119 <xsl:value-of select="../label"/>
120 <xsl:value-of select="../forename"/>&space;
121 <xsl:value-of select="../familyname"/>&space;
122 <span class="company"><xsl:value-of select="../company"/></span>
123 </td>
124 <td><xsl:value-of select="hi"/></td>
125 <td><xsl:value-of select="lo"/></td>
126 <td><xsl:value-of select="av"/></td>
127 </tr>
128 </xsl:template>
129
130
131 </xsl:stylesheet>
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.