source: GTP-Internal/trunk/Webpage/NOF/gtp_webpage/Styles/GameTools1/template/siteStyle.xsl @ 1510

Revision 1510, 38.2 KB checked in by giegl, 18 years ago (diff)

GTP webpage - News redesign (images & style) WIP

Line 
1<?xml version="1.0" encoding="UTF-8"?>
2
3<xsl:stylesheet xmlns:xsl= "http://www.w3.org/1999/XSL/Transform"
4                 xmlns:msxsl="urn:schemas-microsoft-com:xslt"
5                 xmlns:nof="http://netobjects.com/nof"
6                 version="1.0">
7
8<xsl:import href="decoratorStyle.xsl"/>
9
10<xsl:output method="html"/>
11<xsl:output cdata-section-elements="SCRIPT"/>
12<xsl:strip-space elements="*"/>
13
14<xsl:template match="SiteStyle">
15<html>
16<head>
17<meta http-equiv="Pragma" content="no-cache"/>
18<meta http-equiv="Cache-Control" content="no-cache"/>
19 <script language="JavaScript">     
20    document.write(
21    "&lt;script language='javascript' src='js/FlashCtrl.js'&gt;&lt;\/script&gt;" +
22    "&lt;script language='javascript' src='js/scripts.js'&gt;&lt;\/script&gt;" +
23    " &lt;link rel='stylesheet' type='text/css' href='css/general_en.css' /&gt;" );   
24 </script>
25<script language='javascript'>
26function NOF_OnLoadPage() {
27        runOnLoad();
28        if (typeof navbarColl == "object") {
29                navbarColl.startAll();
30        }
31}
32</script>
33<link rel="stylesheet" href="display.css" type="text/css" />
34
35</head>
36
37<body onclick="NOF_StyleView_CallInspector(null)" id="author" onLoad="NOF_OnLoadPage()" onresize="navbarColl.resizeAll();">
38<TABLE width="100%" border="0" cellpadding="0" cellspacing="0">
39  <TR>
40    <TD>
41       <table border="0" cellspacing="0" cellpadding="3" width="100%">
42         <tr>
43          <td width="100" valign="middle"><span class="title" id="styleView.label.author">Designed By:</span></td>
44          <td valign="middle">           
45              <div id="{//Author/@id}" onclick="NOF_StyleView_CallInspector(this, 'graphic')" ondblclick="NOF_StyleView_DblClick(this, 'graphic')" class="objNormal">                   
46                   <xsl:apply-templates select="Author"/>                   
47              </div> 
48              <script>               
49                function runOnLoad() {                                                 
50                        handleAuthor(<xsl:value-of select="//Author/@id"/>);
51                }
52                </script>
53          </td>   
54          </tr>
55       </table>   
56    </TD>
57  </TR>
58  <TR>
59    <TD background="labels/sv_title_div.gif"><span class="title" id="styleView.label.banner">Banner</span></TD>
60  </TR>
61  <TR>
62    <TD><xsl:apply-templates select="Banners" /></TD>
63  </TR>
64  <TR>
65    <TD><IMG src="labels/spacer.gif" width="50" height="10"/></TD>
66  </TR>
67</TABLE>
68
69<TABLE width="100%" border="0" cellpadding="0" cellspacing="0">
70  <TR>
71    <TD background="labels/sv_title_div.gif"><span class="title"  id="styleView.label.navigation">Navigation</span></TD>
72  </TR>
73  <TR>
74    <TD><TABLE border="0" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF">
75        <TR>
76          <TD><img src="labels/spacer.gif" width="1" height="1" border="0"/></TD>
77          <TD><IMG src="labels/spacer.gif" width="10" height="20"/></TD>
78          <TD><span class="label" id="styleView.label.regular">Regular</span></TD>
79          <TD><IMG src="labels/spacer.gif" width="10" height="20"/></TD>
80          <TD><span class="label" id="styleView.label.regularRollover">Regular Rollover</span></TD>
81          <TD><IMG src="labels/spacer.gif" width="10" height="20"/></TD>
82          <TD><span class="label" id="styleView.label.highlighted">Highlighted</span></TD>
83          <TD><IMG src="labels/spacer.gif" width="10" height="20"/></TD>
84          <TD><span class="label" id="styleView.label.higlightedRollover">Highlighted Rollover</span></TD>
85          <TD width="100%"></TD>
86        </TR>
87 
88        <xsl:apply-templates select="//Navbar/NavbarState" mode="buttonSet" />
89     
90        <TR>
91          <TD colspan="10"><IMG src="labels/spacer.gif" width="20" height="10"/></TD>
92        </TR>
93        <TR>
94          <TD valign="top"><span class="label" id="styleView.label.preview">Preview</span></TD>
95          <TD><img src="labels/spacer.gif" width="1" height="1" border="0"/></TD>
96          <TD colspan="7" class="label" width="*">
97              <xsl:for-each select="//Navbar/NavbarState">
98                <xsl:value-of select="@name"/>
99                <xsl:apply-templates select="." mode="preview"/>
100              </xsl:for-each>
101           </TD>
102                </TR>
103        </TABLE></TD>
104  </TR>
105  <TR>
106    <TD><IMG src="labels/spacer.gif" width="50" height="10"/></TD>
107  </TR>
108</TABLE>
109<TABLE width="100%" border="0" cellpadding="0" cellspacing="0">
110  <TR>
111    <TD background="labels/sv_title_div.gif"><span class="title" id="styleView.label.tableStyles">Table Styles</span></TD>
112  </TR>
113  <TR>
114    <TD>   
115      <xsl:apply-templates select="TableStyles"/>     
116    </TD>
117  </TR>
118  <TR>
119    <TD><IMG src="labels/spacer.gif" width="50" height="10"/></TD>
120  </TR>
121</TABLE>
122<TABLE width="100%" border="0" cellpadding="0" cellspacing="0">
123  <TR>
124    <TD width="300" background="labels/sv_title_div.gif"><span class="title" id="styleView.label.pageBackground">Page Background</span></TD>
125    <TD><IMG src="labels/spacer.gif" width="20" height="20"/></TD>
126    <TD background="labels/sv_title_div.gif"><span class="title" id="styleView.label.addPageElements">Additional Page Elements</span></TD>
127  </TR>
128  <TR>
129    <TD  valign="top"><!-- Page background -->
130      <div id="background" onclick="NOF_StyleView_CallInspector(this, 'graphic')" ondblclick="NOF_StyleView_DblClick(this, 'graphic')" class="objNormal">
131        <table id="background" width="100%" height="100%"  border="0" cellpadding="0" cellspacing="0" class="background">
132            <tr>
133              <td  id="background" valign="top"><IMG src="labels/spacer.gif" alt="" name="styleThumb" width="250" height="150" id="background"/></td>
134            </tr>
135        </table>
136      </div>   
137    </TD>
138    <TD><img src="labels/spacer.gif" width="1" height="1" border="0"/></TD>
139    <!-- Additional Page Elements -->
140    <TD valign="top"><xsl:apply-templates select="header" mode="graphicView"/></TD>
141  </TR>
142  <TR>
143    <TD colspan="3"><IMG src="labels/spacer.gif" width="50" height="10"/></TD>
144  </TR>
145</TABLE>
146<TABLE width="100%" border="0" cellpadding="0" cellspacing="0">
147  <TR>
148    <TD width="300" background="labels/sv_title_div.gif"><span class="title" id="styleView.label.dataList">Data List Icons</span></TD>
149    <TD><IMG src="labels/spacer.gif" width="30" height="20"/></TD>
150    <TD background="labels/sv_title_div.gif"><span class="title" id="styleView.label.styledLine">Styled Line</span></TD>
151  </TR>
152  <TR>
153    <TD valign="top" width="300">
154      <TABLE border="0" cellpadding="5" cellspacing="0" class="objSelected" width="300">
155        <TR>
156          <TD width="300">           
157            <xsl:apply-templates select="Bullet"/>
158          </TD>
159        </TR>
160      </TABLE></TD>
161    <TD><img src="labels/spacer.gif" width="5" height="1" border="0"/></TD>
162    <TD valign="top"><xsl:apply-templates select="Line"/></TD>
163  </TR>
164</TABLE>
165
166    </body>
167  </html> 
168</xsl:template>
169
170<xsl:template match="ButtonState" mode="textPreview">
171  <xsl:param name="rollCss">0</xsl:param>
172  <xsl:variable name="hAlign"><xsl:value-of select="./@hAlign"/></xsl:variable>
173  <xsl:variable name="voffset"><xsl:value-of select="./@vAlign"/></xsl:variable>
174  <xsl:variable name="hoffset"><xsl:value-of select="./@hoffset"/></xsl:variable>
175
176  <xsl:variable name="cssClass">
177  <xsl:choose>
178    <xsl:when test="$hAlign = 'left'">spanLeft</xsl:when>
179    <xsl:when test="$hAlign = 'right'">spanRight</xsl:when>
180    <xsl:otherwise>spanCenter</xsl:otherwise>
181  </xsl:choose><xsl:value-of select="self::node()/@id"/>
182  </xsl:variable>
183
184  <xsl:variable name="rollCssClass">
185  <xsl:choose>
186    <xsl:when test="$hAlign = 'left'">spanLeft</xsl:when>
187    <xsl:when test="$hAlign = 'right'">spanRight</xsl:when>
188    <xsl:otherwise>spanCenter</xsl:otherwise>
189  </xsl:choose><xsl:value-of select="$rollCss"/>
190  </xsl:variable>
191    <span onmouseover="rollImage(this);"
192    onmouseout="rollImage(this, true);"
193    roll="{$rollCssClass}"
194    rollOut="{$cssClass}"
195    class="{$cssClass}">Button Text</span>
196</xsl:template>
197
198<xsl:template match="//Navbar/NavbarState[@type='Flash']" mode="preview">
199        <TABLE width="10" border="0" cellpadding="0" cellspacing="0">
200          <TR>
201            <TD>
202                <div id="P_{@id}" style="float:left;height:30" onclick="NOF_StyleView_CallFlashInspector(document.getElementById('{@id}'), document.getElementById('{./Button/ButtonState/@parent}'), 'graphic')" class="objNormal">
203                   <xsl:call-template name="FlashNav">
204                        <xsl:with-param name="idPrefix">P</xsl:with-param>
205                        <xsl:with-param name="source"><xsl:value-of select="./Button/ButtonState/Flash/@path"/></xsl:with-param>
206                        <xsl:with-param name="parent"><xsl:value-of select="./Button/ButtonState/@parent"/></xsl:with-param>
207                        <xsl:with-param name="flashId">Button_Flash_P_<xsl:value-of select="./Button/ButtonState/@id"/></xsl:with-param>
208                        <xsl:with-param name="connectorUrl"><xsl:value-of select="./Button/ButtonState/Flash/@connectorUrl"/></xsl:with-param>
209                   </xsl:call-template>
210                </div>
211                </TD>
212         </TR>
213        </TABLE>
214</xsl:template>
215
216<xsl:template match="//Navbar/NavbarState/Button" mode="preview">      
217                        <TABLE width="10" border="0" cellpadding="0" cellspacing="0">
218                          <TR>
219                            <TD>
220                          <div name="modePreview">
221                          <xsl:choose> <!-- Button set type Text-->
222                              <xsl:when test="./ButtonState[@type = 'Text']">
223                               <table onclick="NOF_StyleView_CallInspector(document.getElementById('{../@id}'), 'graphic')"  width="600" id="NavbarState.{../@id}" name="modePreview" border="{../Border/@size}" cellpadding="{../Space/@size}" cellspacing="{../Space/@size}" height="20">
224                                <tr><td align="center"><div class="{./ButtonState[@name = 'Regular' or @name = 'SecondaryRegular']/@id}"
225                                onmouseover="rollImage(this);"
226                                onmouseout="rollImage(this, true);"
227                                roll="{./ButtonState[@name = 'Rollover' or @name = 'SecondaryRollover']/@id}"
228                                rollOut="{./ButtonState[@name = 'Regular' or @name = 'SecondaryRegular']/@id}" style="padding: 5px">
229                                <xsl:apply-templates select="./ButtonState[@name = 'Regular' or @name = 'SecondaryRegular']" mode="textPreview">
230                                    <xsl:with-param name="rollCss">
231                                      <xsl:value-of select="./ButtonState[@name = 'Rollover' or @name = 'SecondaryRollover']/@id"/>
232                                    </xsl:with-param>
233                                </xsl:apply-templates></div>       
234                                 </td><td align="center"> 
235                                 <div class="{./ButtonState[@name = 'Highlighted' or @name = 'SecondaryHighlighted']/@id}"
236                                onMouseOver="rollImage(this);"
237                                onMouseOut="rollImage(this, true);"
238                                roll="{./ButtonState[@name = 'HighlightedRollover' or @name = 'SecondaryHighlightedRollover']/@id}"
239                                rollOut="{./ButtonState[@name = 'Highlighted' or @name = 'SecondaryHighlighted']/@id}"  style="padding: 5px">       
240                                  <xsl:apply-templates select="./ButtonState[@name = 'Highlighted' or @name = 'SecondaryHighlighted']" mode="textPreview">
241                                    <xsl:with-param name="rollCss">
242                                      <xsl:value-of select="./ButtonState[@name = 'HighlightedRollover' or @name = 'SecondaryHighlightedRollover']/@id"/>
243                                    </xsl:with-param>
244                                </xsl:apply-templates></div>
245                            </td><td align="center"><div class="{./ButtonState[@name = 'Regular' or @name = 'SecondaryRegular']/@id}"
246                                onmouseover="rollImage(this);"
247                                onmouseout="rollImage(this, true);"
248                                roll="{./ButtonState[@name = 'Rollover' or @name = 'SecondaryRollover']/@id}"
249                                rollOut="{./ButtonState[@name = 'Regular' or @name = 'SecondaryRegular']/@id}"  style="padding: 5px">
250                                <xsl:apply-templates select="./ButtonState[@name = 'Regular' or @name = 'SecondaryRegular']" mode="textPreview">
251                                      <xsl:with-param name="rollCss">
252                                <xsl:value-of select="./ButtonState[@name = 'Rollover' or @name = 'SecondaryRollover']/@id"/>
253                                </xsl:with-param>
254                                </xsl:apply-templates></div>
255                            </td><td align="center"><div class="{./ButtonState[@name = 'Regular' or @name = 'SecondaryRegular']/@id}" 
256                                onmouseover="rollImage(this);"
257                                onmouseout="rollImage(this, true);"
258                                roll="{./ButtonState[@name = 'Rollover' or @name = 'SecondaryRollover']/@id}"
259                                rollOut="{./ButtonState[@name = 'Regular' or @name = 'SecondaryRegular']/@id}"  style="padding: 5px">
260                                <xsl:apply-templates select="./ButtonState[@name = 'Regular' or @name = 'SecondaryRegular']" mode="textPreview">
261                                      <xsl:with-param name="rollCss">
262                                <xsl:value-of select="./ButtonState[@name = 'Rollover' or @name = 'SecondaryRollover']/@id"/>
263                                </xsl:with-param></xsl:apply-templates></div>
264                             </td>       
265                                </tr>                                         
266                              </table>
267                                </xsl:when>
268                           <xsl:otherwise><!-- Button set type Image-->       
269                            <table onclick="NOF_StyleView_CallInspector(document.getElementById('{../@id}'), 'graphic')" id="NavbarState.{../@id}" name="modePreview" border="{../Border/@size}" cellpadding="{../Space/@size}" cellspacing="{../Space/@size}" height="20">
270                              <tr><td>
271                                <img name="modePreview" src="{./ButtonState[@name = 'Regular' or @name = 'SecondaryRegular']/Image/@path}"
272                                    onmouseover="rollImage(this);"
273                                    onmouseout="rollImage(this, true);"
274                                    roll="{./ButtonState[@name = 'Rollover' or @name = 'SecondaryRollover']/Image/@path}"
275                                    rollOut="{./ButtonState[@name = 'Regular' or @name = 'SecondaryRegular']/Image/@path}" />
276                                     
277                                <img name="modePreview" src="{./ButtonState[@name = 'Highlighted' or @name = 'SecondaryHighlighted']/Image/@path}"
278                                    onMouseOver="rollImage(this);"
279                                    onMouseOut="rollImage(this, true);"
280                                    roll="{./ButtonState[@name = 'HighlightedRollover' or @name = 'SecondaryHighlightedRollover']/Image/@path}"
281                                    rollOut="{./ButtonState[@name = 'Highlighted' or @name = 'SecondaryHighlighted']/Image/@path}"/>
282                               
283                                <img name="modePreview" src="{./ButtonState[@name = 'Regular' or @name = 'SecondaryRegular']/Image/@path}"
284                                    onmouseover="rollImage(this);"
285                                    onmouseout="rollImage(this, true);"
286                                    roll="{./ButtonState[@name = 'Rollover' or @name = 'SecondaryRollover']/Image/@path}"
287                                    rollOut="{./ButtonState[@name = 'Regular' or @name = 'SecondaryRegular']/Image/@path}" />
288                               
289                                <img name="modePreview" src="{./ButtonState[@name = 'Regular' or @name = 'SecondaryRegular']/Image/@path}"
290                                    onmouseover="rollImage(this);"
291                                    onmouseout="rollImage(this, true);"
292                                    roll="{./ButtonState[@name = 'Rollover' or @name = 'SecondaryRollover']/Image/@path}"
293                                    rollOut="{./ButtonState[@name = 'Regular' or @name = 'SecondaryRegular']/Image/@path}" />
294                              </td></tr>                               
295                                     
296                            </table>   
297                            </xsl:otherwise>
298                          </xsl:choose>       
299                  </div>       
300                </TD></TR></TABLE> 
301</xsl:template>
302
303
304<!-- Template :: FlashNav   -->
305<xsl:template name="FlashNav">
306        <xsl:param name="idPrefix">0</xsl:param>
307        <xsl:param name="source"><xsl:value-of select="./Flash/@path"/></xsl:param>
308        <xsl:param name="parent"><xsl:value-of select="@parent"/></xsl:param>
309        <xsl:param name="flashId">Button_Flash_<xsl:value-of select="$idPrefix"/>_<xsl:value-of select="@id"/></xsl:param>
310        <xsl:param name="connectorUrl"><xsl:value-of select="./Flash/@connectorUrl"/></xsl:param>
311       
312        <div id="{$flashId}_footprint" style="float:left;"></div>
313        <div id="{$flashId}_container" style="visibility: visible; position:absolute;top: 0px; left: 0px;">
314        <script>
315                if (typeof navbarColl == "object") {           
316                        var nof_<xsl:value-of select="$flashId"/> = navbarColl.createMovie("<xsl:value-of select="$flashId"/>", "<xsl:value-of select="$source"/>", 1, 1);
317                        nof_<xsl:value-of select="$flashId"/>.setVariable("nof_xmlConnectorURL", "<xsl:value-of select="$connectorUrl"/>");
318                        nof_<xsl:value-of select="$flashId"/>.setParam("play", "false");
319                        nof_<xsl:value-of select="$flashId"/>.setVariable("nof_previewMode", "true");
320                        nof_<xsl:value-of select="$flashId"/>.setVariable("nof_currentPage", "mi_0001");
321       
322                        nof_<xsl:value-of select="$flashId"/>.captureEvents(NOF.Event.MOUSEDOWN_EVENT);
323                        nof_<xsl:value-of select="$flashId"/>.addMouseListener(new NOF_Flash_Listener("<xsl:value-of select="$flashId"/>", <xsl:value-of select="@id"/>, <xsl:value-of select="$parent"/>));
324                        nof_<xsl:value-of select="$flashId"/>.write();
325                }
326        </script></div>
327</xsl:template>
328
329<!-- Template :: Button Set   -->
330<xsl:template match="//Navbar/NavbarState" mode="buttonSet">  
331        <xsl:choose>       
332        <xsl:when test="@type = 'Flash'">
333                   <tr>       
334                      <td align="left"><span class="labelLink"><div id="{@id}" style="height:30" onclick="NOF_StyleView_CallFlashInspector(this, document.getElementById('{@id}'), 'graphic')" class="objNormal"><xsl:value-of select="@name"/></div></span></td>
335                      <td><img src="labels/spacer.gif" width="10" height="1" border="0"/></td>
336                      <td align="left" valign="middle" colspan="8" id="Button.{./Button/ButtonState/@id}">
337                              <xsl:apply-templates select="./Button/ButtonState"/>
338                          </td>
339                   </tr>
340                   <tr><td colspan="10"><image src="labels/spacer.gif" height="5" width="5" border="0"/></td></tr>
341        </xsl:when>
342                <xsl:otherwise>         
343                   <tr>       
344                      <td align="left"><span class="labelLink"><div id="{@id}" style="height:30" onclick="NOF_StyleView_CallInspector(this, 'graphic')" ondblclick="NOF_StyleView_DblClick(this, 'graphic')" class="objNormal"><xsl:value-of select="@name"/></div></span></td>
345                      <td><img src="labels/spacer.gif" width="10" height="1" border="0"/></td>     
346                      <xsl:apply-templates select="Button" mode="generate"/> 
347                   </tr>
348                   <xsl:if test="count(EndCap1)>0"><tr>
349                      <td align="right"><span class="label">End Cap 1:</span></td>
350                      <td></td>
351                      <xsl:apply-templates select="EndCap1" mode="generate"/> 
352                   </tr></xsl:if>
353                   <xsl:if test="count(EndCap2)>0"><tr>
354                      <td align="right"><span class="label">End Cap 2:</span></td>
355                      <td></td>
356                      <xsl:apply-templates select="EndCap2" mode="generate"/> 
357                   </tr></xsl:if>
358                   <xsl:if test="count(Title)>0"><tr>
359                      <td align="right"><span class="label">Section Title:</span></td>
360                      <td></td>
361                      <xsl:apply-templates select="Title" mode="generate"/> 
362                   </tr></xsl:if>
363                   <tr><td colspan="10"><image src="labels/spacer.gif" height="5" width="5" border="0"/></td></tr>
364                </xsl:otherwise>
365        </xsl:choose>
366</xsl:template>
367
368<!-- Template :: Button State   -->
369<xsl:template match="ButtonState" mode="generate">      
370    <td align="left" valign="middle" width="150" id="Button.{@id}">     
371        <xsl:apply-templates select="."/>       
372    </td><td width="10"><img src="labels/spacer.gif" width="10" height="1" border="0"/></td>
373</xsl:template>
374
375<!-- Template :: Button State   -->
376<xsl:template match="ButtonState">          
377    <xsl:choose>       
378      <xsl:when test="@type = 'Text'">
379        <xsl:variable name="hAlign"><xsl:value-of select="@hAlign"/></xsl:variable>
380        <xsl:variable name="spanAlign">
381          <xsl:choose>
382            <xsl:when test="$hAlign = 'left'">spanLeft<xsl:value-of select="@id"/></xsl:when>
383            <xsl:when test="$hAlign = 'right'">spanRight<xsl:value-of select="@id"/></xsl:when>
384            <xsl:otherwise>spanCenter<xsl:value-of select="@id"/></xsl:otherwise>
385          </xsl:choose>
386        </xsl:variable>                   
387        <div id="{@id}" onclick="NOF_StyleView_CallInspector(this, 'graphic')" ondblclick="NOF_StyleView_DblClick(this, 'graphic')" class="objNormal" style="{./Font/@css}">
388           <span  id="{@id}" class="{$spanAlign}">Button Text</span></div>
389           <style>
390             .<xsl:value-of select="@id"/>{<xsl:value-of select="./Font/@css"/>}
391         
392              .spanLeft<xsl:value-of select="@id"/>{<xsl:value-of select="./Font/@css"/>;
393              padding: <xsl:value-of select="@vAlign"/>px 0px 0px <xsl:value-of select="@hoffset"/>px}
394         
395              .spanRight<xsl:value-of select="@id"/>{<xsl:value-of select="./Font/@css"/>;
396              padding: <xsl:value-of select="@vAlign"/>px <xsl:value-of select="@hoffset"/>px 0px 0px}
397         
398              .spanCenter<xsl:value-of select="@id"/>{<xsl:value-of select="./Font/@css"/>;
399              padding: <xsl:value-of select="@vAlign"/>px 0px 0px 0px} 
400          </style>       
401      </xsl:when>
402      <xsl:when test="@type = 'Flash'">
403        <div id="{@id}" style="float:left; height:30" onclick="NOF_StyleView_CallFlashInspector(this, document.getElementById('{@parent}'), 'graphic')" class="objNormal">
404                <xsl:call-template name="FlashNav">
405                        <xsl:with-param name="idPrefix">F</xsl:with-param>
406                </xsl:call-template>
407             </div>
408          </xsl:when>
409      <xsl:otherwise>
410        <xsl:choose>
411          <xsl:when test="string-length(./Image/@path)!=0">
412            <div id="{@id}" onclick="NOF_StyleView_CallInspector(this, 'graphic')" ondblclick="NOF_StyleView_DblClick(this, 'graphic')" class="objNormal"><img id="{@id}"  src="{./Image/@path}" border="0"/></div>     
413          </xsl:when>
414          <xsl:otherwise>
415            <div id="{@id}" onclick="NOF_StyleView_CallInspector(this, 'graphic')" ondblclick="NOF_StyleView_DblClick(this, 'graphic')" class="objNormal">
416              <span id="{@id}" class="invalidImage">Not Specified</span>
417            </div>
418          </xsl:otherwise>
419        </xsl:choose>
420      </xsl:otherwise>       
421    </xsl:choose>           
422</xsl:template>
423
424<!-- Template :: Banner   --> 
425<xsl:template match="Banners">
426    <xsl:for-each select="*">
427     <table><tr><td>
428      <div id="Banner.{./@id}">
429        <xsl:apply-templates select="."/>
430      </div>
431      </td></tr></table>
432    </xsl:for-each>
433</xsl:template>
434
435<xsl:template match="Banner">
436   <SPAN class="label" id="BannerLabel.{./@id}"><xsl:value-of select="@name"/></SPAN>
437    <xsl:choose> 
438      <xsl:when test="@type = 'Image'">
439        <div id="{@id}" onclick="NOF_StyleView_CallInspector(this, 'graphic')" ondblclick="NOF_StyleView_DblClick(this, 'graphic')" class="objNormal">
440            <img id="{@id}" src="{./Image/@path}" />
441        </div>
442      </xsl:when>       
443      <xsl:when test="@type = 'Text'">   
444        <div id="{@id}" onclick="NOF_StyleView_CallInspector(this, 'graphic')" ondblclick="NOF_StyleView_DblClick(this, 'graphic')" class="objNormal">
445  <img src="labels/spacer.gif" width="1" height="1"/><xsl:apply-templates select="." mode="bannerText"/></div>
446      </xsl:when> 
447      <xsl:when test="@type = 'Flash'">
448        <xsl:variable name="source"><xsl:value-of select="./Flash/@path"/></xsl:variable>
449                <xsl:variable name="flashId">Banner_Flash_<xsl:value-of select="@id"/></xsl:variable>
450                <xsl:variable name="connectorUrl"><xsl:value-of select="./Flash/@connectorUrl"/></xsl:variable>
451                <xsl:variable name="labelText"><xsl:value-of select="./@caption"/></xsl:variable>
452               
453                <div id="{@id}" onclick="NOF_StyleView_CallInspector(this, 'graphic')" ondblclick="NOF_StyleView_DblClick(this, 'graphic')" class="objNormal">
454                        <script>
455                                if (typeof bannerColl == "object") {                           
456                                        nof_<xsl:value-of select="$flashId"/> = bannerColl.createMovie("<xsl:value-of select="$flashId"/>", "<xsl:value-of select="$source"/>", <xsl:value-of select="./Flash/@width"/>, <xsl:value-of select="./Flash/@height"/>);
457                                        nof_<xsl:value-of select="$flashId"/>.setVariable("nof_xmlConnectorURL", "<xsl:value-of select="$connectorUrl"/>");
458                                        nof_<xsl:value-of select="$flashId"/>.setVariable("nof_labelText", "<xsl:value-of select="$labelText"/>");
459
460                                        nof_<xsl:value-of select="$flashId"/>.captureEvents(NOF.Event.MOUSEDOWN_EVENT);
461                                        nof_<xsl:value-of select="$flashId"/>.addMouseListener(new NOF_Flash_Listener("<xsl:value-of select="$flashId"/>", <xsl:value-of select="@id"/>, -1));
462                                        nof_<xsl:value-of select="$flashId"/>.write();
463                                }
464                        </script>
465                </div>
466      </xsl:when>
467      <xsl:otherwise>
468        <div id="{@id}" onclick="NOF_StyleView_CallInspector(this, 'graphic')" ondblclick="NOF_StyleView_DblClick(this, 'graphic')" class="objNormal">
469         <img id="{@id}" src="{./Image/@path}" />
470        </div> 
471      </xsl:otherwise>
472    </xsl:choose>
473</xsl:template>
474
475<xsl:template match="Banner" mode="bannerText"> 
476  <xsl:variable name="hAlign"><xsl:value-of select="./@hAlign"/></xsl:variable>
477  <xsl:variable name="voffset"><xsl:value-of select="./@vAlign"/></xsl:variable>
478  <xsl:variable name="hoffset"><xsl:value-of select="./@hoffset"/></xsl:variable>
479
480  <xsl:variable name="cssClass">
481  <xsl:choose>
482    <xsl:when test="$hAlign = 'left'">;padding: <xsl:value-of select="$voffset"/>px 0px 0px <xsl:value-of select="$hoffset"/>px</xsl:when>
483    <xsl:when test="$hAlign = 'right'">;padding: <xsl:value-of select="$voffset"/>px <xsl:value-of select="$hoffset"/>px 0px 0px</xsl:when>
484    <xsl:otherwise>;padding: <xsl:value-of select="$voffset"/>px 0px 0px 0px</xsl:otherwise>
485  </xsl:choose>
486  </xsl:variable>
487   <span id="{@id}" style="{./Font/@css}{$cssClass}">Text Banner</span>
488</xsl:template>
489
490<!-- Template :: Bullet  -->
491<xsl:template match="Bullet">
492 <table border="0" cellspacing="0">
493   <tr><td>
494        <div id="{@id}" onclick="NOF_StyleView_CallInspector(this, 'graphic')" ondblclick="NOF_StyleView_DblClick(this, 'graphic')" class="objNormal">
495           <table  border="0" cellspacing="1" cellpadding="1" id="{@id}">
496             <tr>
497                <td width="10" align="left" scope="col" id="{@id}"><img  id="{@id}" src="{@path}"/></td>
498                <td width="100" align="left" scope="col" id="{@id}" class="dataList">Data List Icon</td>
499             </tr>     
500             <tr>
501                <td width="10" align="left" scope="col" id="{@id}"><img  id="{@id}" src="{@path}"/></td>
502                <td width="100" align="left" scope="col" id="{@id}" class="dataList">Data List Icon</td>             
503             </tr>
504             <tr>
505                <td width="10" align="left" scope="col" id="{@id}"><img  id="{@id}" src="{@path}"/></td>
506                <td width="100" align="left" scope="col" id="{@id}" class="dataList">Data List Icon</td>             
507             </tr>                     
508           </table>
509        </div> 
510    </td>
511    <td width="*"></td>
512    </tr>
513  </table>
514</xsl:template>
515
516<!-- Template :: Bullet  mode=preview-->
517<xsl:template match="Bullet" mode="preview">
518 <table border="0" cellspacing="0">
519   <tr><td>       
520           <table  border="0" cellspacing="1" cellpadding="1" id="{@id}">
521             <tr>
522                <td width="10" align="left" scope="col" id="{@id}"><img  id="{@id}" src="{@path}"/></td>
523                <td width="100" align="left" scope="col" id="{@id}" class="dataList">Data List Icon</td>
524             </tr>     
525             <tr>
526                <td width="10" align="left" scope="col" id="{@id}"><img  id="{@id}" src="{@path}"/></td>
527                <td width="100" align="left" scope="col" id="{@id}" class="dataList">Data List Icon</td>             
528             </tr>
529             <tr>
530                <td width="10" align="left" scope="col" id="{@id}"><img  id="{@id}" src="{@path}"/></td>
531                <td width="100" align="left" scope="col" id="{@id}" class="dataList">Data List Icon</td>             
532             </tr>                     
533           </table>       
534    </td>
535    <td width="*"></td>
536    </tr>
537  </table>
538</xsl:template>
539 
540<xsl:template match="Line">
541 <table border="0" cellspacing="0">
542   <tr><td>
543       <div id="{@id}" onclick="NOF_StyleView_CallInspector(this, 'graphic')" ondblclick="NOF_StyleView_DblClick(this, 'graphic')" class="objNormal"><img id="{@id}" src="{@path}"/></div>     
544    </td>
545    <td width="*"></td>
546    </tr>
547  </table>     
548</xsl:template>
549
550
551<xsl:template match="Author">                          
552       <span id="{@id}"><font class="label"><xsl:value-of select="@name"/></font></span>       
553</xsl:template>
554
555<xsl:template match="TableStyles">
556    <table class="objNormal">
557      <tr>
558        <xsl:for-each select="TableStyle">
559          <xsl:if test="position() mod 4 = 0">
560            <xsl:text disable-output-escaping="yes">&lt;/td&gt;</xsl:text>
561            <xsl:text disable-output-escaping="yes">&lt;tr&gt;</xsl:text>
562          </xsl:if>         
563          <td>               
564            <div id="{./@id}" onclick="NOF_StyleView_CallInspector(this, 'graphic')" ondblclick="NOF_StyleView_DblClick(this, 'graphic')" onmousedown="NOF_StyleView_TsRightClick({./@id})" class="objNormal" bgcolor="#FFFFFF">
565              <table border="0" cellspacing="0" cellpadding="0">
566                <tr>
567                  <xsl:apply-templates select="."/>                 
568                </tr>
569              </table>
570            </div> 
571          </td>
572        </xsl:for-each>
573    </tr>
574  </table>       
575</xsl:template>
576
577
578<xsl:template match="TableStyle[position() != 1 and position() mod 3 = 1]">
579  <xsl:text disable-output-escaping="yes">&lt;/tr&gt;</xsl:text>
580  <xsl:text disable-output-escaping="yes">&lt;tr&gt;</xsl:text>
581  <xsl:call-template name="TableDescription"/>
582</xsl:template>
583<xsl:template match="TableStyle[position() = 1 or position() mod 3 != 1]">
584  <xsl:call-template name="TableDescription"/>
585</xsl:template>
586
587<xsl:template name="TableDescription"> 
588  <td align="left">         
589      <B>
590        <img src="labels/spacer.gif" width="5" height="1"/>
591        <font class="label"><xsl:value-of select="./@name" /></font>
592      </B>
593      <table cellpadding="2" cellspacing="2" border="1" bordercolor="#FFFFFF">                                 
594        <xsl:for-each select="TableLayout">                     
595          <xsl:apply-templates select="."/>                                     
596        </xsl:for-each>                         
597      </table>         
598  </td>
599</xsl:template>
600
601<xsl:variable name="ROWS">5</xsl:variable>
602<xsl:variable name="COLUMNS">5</xsl:variable>
603
604<xsl:template match="TableLayout">              
605  <xsl:variable name="pTop"><xsl:value-of select="parent::TableStyle/RepeatRegion/top"/></xsl:variable>
606  <xsl:variable name="pBottom"><xsl:value-of select="parent::TableStyle/RepeatRegion/bottom"/></xsl:variable>
607  <xsl:variable name="pLeft"><xsl:value-of select="parent::TableStyle/RepeatRegion/left"/></xsl:variable>
608  <xsl:variable name="pRight"><xsl:value-of select="parent::TableStyle/RepeatRegion/right"/></xsl:variable>
609
610  <xsl:variable name="h"><xsl:value-of select="count(parent::TableStyle/TableLayout/row)"/></xsl:variable>
611  <xsl:variable name="w"><xsl:value-of select="count(parent::TableStyle/TableLayout/row/cell) div $h"/></xsl:variable>
612  <xsl:variable name="rrW"><xsl:value-of select="$pRight - $pLeft + 1"/></xsl:variable>
613  <xsl:variable name="rrH"><xsl:value-of select="$pBottom - $pTop + 1"/></xsl:variable>
614 
615       
616  <!-- display row before counting      -->     
617  <xsl:for-each select="row[position() &lt; $pTop]">     
618    <xsl:apply-templates select=".">
619      <xsl:with-param name="pRepeatRegion">0</xsl:with-param>
620      <xsl:with-param name="pLeft"><xsl:value-of select="$pLeft"/></xsl:with-param>
621      <xsl:with-param name="pRight"><xsl:value-of select="$pRight"/></xsl:with-param>                   
622      <xsl:with-param name="pRRWidth"><xsl:value-of select="$rrW"/></xsl:with-param>
623      <xsl:with-param name="pWidth"><xsl:value-of select="$w"/></xsl:with-param>
624    </xsl:apply-templates>
625  </xsl:for-each>       
626   
627 
628  <xsl:call-template name="repeatRows">
629    <xsl:with-param name="pTop"><xsl:value-of select="$pTop"/></xsl:with-param>
630    <xsl:with-param name="pBottom"><xsl:value-of select="$pBottom"/></xsl:with-param>
631    <xsl:with-param name="pLeft"><xsl:value-of select="$pLeft"/></xsl:with-param>
632    <xsl:with-param name="pRight"><xsl:value-of select="$pRight"/></xsl:with-param>
633    <xsl:with-param name="pRRWidth"><xsl:value-of select="$rrW"/></xsl:with-param>
634    <xsl:with-param name="pRRHeight"><xsl:value-of select="$rrH"/></xsl:with-param>
635    <xsl:with-param name="pWidth"><xsl:value-of select="$w"/></xsl:with-param>
636    <xsl:with-param name="pHeight"><xsl:value-of select="$h - $rrH"/></xsl:with-param>
637  </xsl:call-template>
638 
639
640  <!-- display row after counting       -->     
641  <xsl:for-each select="row[position() &gt; $pBottom]">
642    <xsl:apply-templates select=".">
643      <xsl:with-param name="pRepeatRegion">0</xsl:with-param>
644      <xsl:with-param name="pLeft"><xsl:value-of select="$pLeft"/></xsl:with-param>
645      <xsl:with-param name="pRight"><xsl:value-of select="$pRight"/></xsl:with-param>
646      <xsl:with-param name="pRRWidth"><xsl:value-of select="$rrW"/></xsl:with-param>
647      <xsl:with-param name="pWidth"><xsl:value-of select="$w"/></xsl:with-param>
648    </xsl:apply-templates>
649  </xsl:for-each>       
650 
651</xsl:template>
652
653<xsl:template name="repeatRows">
654  <xsl:param name="pTop">1</xsl:param>
655  <xsl:param name="pBottom">1</xsl:param>
656  <xsl:param name="pLeft">1</xsl:param>
657  <xsl:param name="pRight">1</xsl:param>
658  <xsl:param name="pRRWidth">0</xsl:param>
659  <xsl:param name="pRRHeight">0</xsl:param>                     
660  <xsl:param name="pWidth">0</xsl:param>
661  <xsl:param name="pHeight">0</xsl:param>                       
662 
663  <xsl:for-each select="row[(position() &gt;= $pTop) and (position() &lt;= $pBottom)]">
664    <xsl:if test="(position() &lt;= $pRRHeight) and ((position() + $pHeight) &lt;= $ROWS)">
665      <xsl:apply-templates select=".">
666        <xsl:with-param name="pRepeatRegion">1</xsl:with-param>
667        <xsl:with-param name="pLeft"><xsl:value-of select="$pLeft"/></xsl:with-param>
668        <xsl:with-param name="pRight"><xsl:value-of select="$pRight"/></xsl:with-param>                 
669        <xsl:with-param name="pRRWidth"><xsl:value-of select="$pRRWidth"/></xsl:with-param>
670        <xsl:with-param name="pWidth"><xsl:value-of select="$pWidth"/></xsl:with-param>
671      </xsl:apply-templates>
672    </xsl:if>
673  </xsl:for-each>       
674  <xsl:if test="($pHeight + $pRRHeight) &lt; $ROWS">
675    <xsl:call-template name="repeatRows">
676      <xsl:with-param name="pTop"><xsl:value-of select="$pTop"/></xsl:with-param>
677      <xsl:with-param name="pBottom"><xsl:value-of select="$pBottom"/></xsl:with-param>
678      <xsl:with-param name="pLeft"><xsl:value-of select="$pLeft"/></xsl:with-param>
679      <xsl:with-param name="pRight"><xsl:value-of select="$pRight"/></xsl:with-param>                   
680      <xsl:with-param name="pRRWidth"><xsl:value-of select="$pRRWidth"/></xsl:with-param>
681      <xsl:with-param name="pRRHeight"><xsl:value-of select="$pRRHeight"/></xsl:with-param>
682      <xsl:with-param name="pWidth"><xsl:value-of select="$pWidth"/></xsl:with-param>
683      <xsl:with-param name="pHeight"><xsl:value-of select="$pRRHeight + $pHeight"/></xsl:with-param>                   
684    </xsl:call-template>
685  </xsl:if>
686</xsl:template>
687
688
689<xsl:template match="row">
690  <xsl:param name="pRepeatRegion">0</xsl:param>
691  <xsl:param name="pLeft">1</xsl:param>
692  <xsl:param name="pRight">1</xsl:param>
693  <xsl:param name="pRRWidth">1</xsl:param>
694  <xsl:param name="pWidth">1</xsl:param>
695 
696  <xsl:text disable-output-escaping="yes">&lt;tr&gt;</xsl:text>
697 
698  <xsl:for-each select="cell[position() &lt; $pLeft]">                 
699    <xsl:apply-templates select=".">
700      <xsl:with-param name="borderColor">#000000</xsl:with-param>
701    </xsl:apply-templates>             
702    </xsl:for-each>
703
704 
705  <xsl:call-template name="repeatCols">
706    <xsl:with-param name="pRepeatRegion"><xsl:value-of select="$pRepeatRegion"/></xsl:with-param>
707    <xsl:with-param name="pLeft"><xsl:value-of select="$pLeft"/></xsl:with-param>
708    <xsl:with-param name="pRight"><xsl:value-of select="$pRight"/></xsl:with-param>
709    <xsl:with-param name="pRRWidth"><xsl:value-of select="$pRRWidth"/></xsl:with-param>
710    <xsl:with-param name="pWidth"><xsl:value-of select="$pWidth - $pRRWidth"/></xsl:with-param>
711  </xsl:call-template>
712
713
714  <xsl:for-each select="cell[position() &gt; $pRight]">         
715    <xsl:apply-templates select=".">
716      <xsl:with-param name="borderColor">#000000</xsl:with-param>
717    </xsl:apply-templates>             
718    </xsl:for-each>
719   
720  <xsl:text disable-output-escaping="yes">&lt;/tr&gt;</xsl:text>
721   
722</xsl:template>
723
724
725<xsl:template name="repeatCols">
726  <xsl:param name="pRepeatRegion">0</xsl:param>
727  <xsl:param name="pLeft">1</xsl:param>
728  <xsl:param name="pRight">1</xsl:param>
729  <xsl:param name="pRRWidth">0</xsl:param>
730  <xsl:param name="pWidth">0</xsl:param>
731   
732  <xsl:for-each select="cell[(position() &gt;= $pLeft) and (position() &lt;= $pRight)]">
733    <xsl:if test="(position() &lt;= $pRRWidth) and ((position() + $pWidth) &lt;= $COLUMNS)">
734      <xsl:choose>
735        <xsl:when test="$pRepeatRegion = 1">
736          <xsl:apply-templates select=".">
737            <xsl:with-param name="borderColor">#FF0000</xsl:with-param>
738          </xsl:apply-templates>
739        </xsl:when>
740        <xsl:otherwise>
741          <xsl:apply-templates select=".">
742            <xsl:with-param name="borderColor">#000000</xsl:with-param>
743          </xsl:apply-templates>
744        </xsl:otherwise>
745      </xsl:choose>
746    </xsl:if>
747  </xsl:for-each>       
748  <xsl:if test="($pWidth + $pRRWidth) &lt; $COLUMNS">
749    <xsl:call-template name="repeatCols">
750      <xsl:with-param name="pRepeatRegion"><xsl:value-of select="$pRepeatRegion"/></xsl:with-param>             
751      <xsl:with-param name="pLeft"><xsl:value-of select="$pLeft"/></xsl:with-param>
752      <xsl:with-param name="pRight"><xsl:value-of select="$pRight"/></xsl:with-param>
753      <xsl:with-param name="pRRWidth"><xsl:value-of select="$pRRWidth"/></xsl:with-param>
754      <xsl:with-param name="pWidth"><xsl:value-of select="$pWidth + $pRRWidth"/></xsl:with-param>                       
755    </xsl:call-template>
756  </xsl:if>
757</xsl:template>
758
759
760<xsl:template match="cell">
761  <xsl:param name="borderColor">
762    #FFFFFF
763  </xsl:param>
764  <td bgcolor="{@bgcolor}" background="{@background}" width="40" height="30" bordercolor="{$borderColor}" align="center" valign="center">               
765    <xsl:if test="Font/@italic = 1">
766      <xsl:text disable-output-escaping="yes">&lt;I&gt;</xsl:text>
767    </xsl:if>
768    <xsl:if test="Font/@underline = 1">
769      <xsl:text disable-output-escaping="yes">&lt;U&gt;</xsl:text>
770    </xsl:if>
771     
772    <Font face="{Font/@face}" color="{Font/@color}">
773      Text
774    </Font>
775       
776    <xsl:if test="Font/@italic = 1">
777      <xsl:text disable-output-escaping="yes">&lt;/I&gt;</xsl:text>
778    </xsl:if>
779    <xsl:if test="Font/@underline = 1">
780      <xsl:text disable-output-escaping="yes">&lt;/U&gt;</xsl:text>
781    </xsl:if>           
782  </td>
783</xsl:template>
784
785</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.