Rev 1310 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
368 | jmachado | 1 | <?xml version="1.0" encoding="UTF-8"?> |
369 | jmachado | 2 | <xsl:stylesheet xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:cmPort="http://www.cm-portalegre.pt/projectos/" version="1.0" xmlns:saxon="http://saxon.sf.net/" extension-element-prefixes="saxon" xmlns:d="http://www.estgp.pt/baco/directory/" xmlns:foo="foo" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" |
368 | jmachado | 3 | xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > |
4 | <xsl:import href="utils.xsl"/> |
||
5 | <xsl:output method="html" encoding="UTF-8" omit-xml-declaration="yes" /> |
||
6 | |||
1312 | jmachado | 7 | <xsl:param name="language"></xsl:param> |
368 | jmachado | 8 | <xsl:param name="contextPath">/baco</xsl:param> |
9 | <xsl:param name="username">jmachado</xsl:param> |
||
10 | <xsl:param name="name">Jorge Machado</xsl:param> |
||
11 | <xsl:param name="roles">professor,administrador</xsl:param> |
||
12 | <!--<xsl:param name="ACTUAL">pagina_a1.2.1</xsl:param>--> |
||
13 | <!--<xsl:param name="ACTUAL">ficha_trabalhoIncluido</xsl:param>--> |
||
379 | jmachado | 14 | <xsl:param name="ACTUAL">ionline</xsl:param> |
380 | jmachado | 15 | <xsl:param name="ACTUAL_REMOTE_CHILD">FTP_3_Trabalhos</xsl:param> |
368 | jmachado | 16 | <xsl:param name="includeXML">oai_dc.xml</xsl:param> |
17 | |||
18 | <xsl:template match="/"> |
||
19 | <div> |
||
20 | <xsl:apply-templates select="//*[@id=$ACTUAL]" mode="root"/> |
||
21 | </div> |
||
22 | </xsl:template> |
||
23 | |||
369 | jmachado | 24 | <xsl:template match="cmPort:dadosProjecto"> |
25 | <table> |
||
26 | <tr> |
||
27 | <th colspan="2">Dados de Projecto</th> |
||
28 | </tr> |
||
29 | <tr> |
||
30 | <th>Nome</th> |
||
31 | <td><xsl:value-of select="./cmPort:nome/text()"/></td> |
||
32 | </tr> |
||
33 | <tr> |
||
34 | <th>Data</th> |
||
35 | <td><xsl:value-of select="./cmPort:data/text()"/></td> |
||
36 | </tr> |
||
37 | <tr> |
||
38 | <th>Local</th> |
||
39 | <td><xsl:value-of select="./cmPort:local/text()"/></td> |
||
40 | </tr> |
||
41 | <tr> |
||
42 | <th>Equipa Técnica</th> |
||
43 | <td><xsl:value-of select="./cmPort:equipaTecnica/text()"/></td> |
||
44 | </tr> |
||
45 | <xsl:if test="./cmPort:parecer/text()"> |
||
46 | <tr> |
||
47 | <th>Parecer</th> |
||
48 | <td><xsl:value-of select="./cmPort:parecer/text()"/></td> |
||
49 | </tr> |
||
50 | </xsl:if> |
||
51 | </table> |
||
368 | jmachado | 52 | |
369 | jmachado | 53 | </xsl:template> |
54 | |||
368 | jmachado | 55 | <xsl:template match="/" mode="single"> |
56 | <html> |
||
57 | <head> |
||
58 | <title>O meu Directório ESTG</title> |
||
59 | <style type="text/css"> |
||
60 | body |
||
61 | { |
||
62 | color: black; |
||
63 | border: 0; |
||
64 | padding: 0; |
||
65 | margin-left: auto; |
||
66 | margin-right: auto; |
||
67 | margin-top: 0; |
||
68 | font-family: sans-serif; |
||
69 | font-size: 0.7em; |
||
70 | } |
||
71 | ul |
||
72 | { |
||
73 | margin:0; |
||
74 | } |
||
75 | #header, #header td, #header td a |
||
76 | { |
||
77 | padding-left:10px; |
||
78 | background-color:#396F9D; |
||
79 | color:white; |
||
80 | } |
||
81 | |||
82 | #bigTable |
||
83 | { |
||
84 | width:100%; |
||
85 | } |
||
86 | |||
87 | #latNavContainer |
||
88 | { |
||
89 | width:160px; |
||
90 | vertical-align:top; |
||
91 | } |
||
92 | |||
93 | #footer |
||
94 | { |
||
95 | border-top: 1px solid black; |
||
96 | text-align:center; |
||
97 | } |
||
98 | |||
99 | #latNav |
||
100 | { |
||
101 | padding-left:10px; |
||
102 | background-color:lightgreen; |
||
103 | } |
||
104 | |||
105 | #latNav h2 |
||
106 | { |
||
107 | font-family: sans-serif; |
||
108 | font-size: 0.7em; |
||
109 | background-color: blue; |
||
110 | color:yellow; |
||
111 | margin-bottom:0; |
||
112 | } |
||
113 | |||
114 | #latNav ul |
||
115 | { |
||
116 | list-style:none; |
||
117 | padding-left: 15px; |
||
118 | margin-left:0; |
||
119 | |||
120 | } |
||
121 | #latNav li |
||
122 | { |
||
123 | font-size: 0.7em; |
||
124 | white-space:nowrap; |
||
125 | } |
||
126 | #latNav li .selected |
||
127 | { |
||
128 | background-color:green; |
||
129 | } |
||
130 | |||
131 | #topnav |
||
132 | { |
||
133 | padding-left:10px; |
||
134 | background-color:yellow; |
||
135 | } |
||
136 | #content |
||
137 | { |
||
138 | padding:4px; |
||
139 | border: 1px solid black; |
||
140 | } |
||
141 | |||
142 | <!--Blocos do conteudo dos directorios--> |
||
143 | .block |
||
144 | { |
||
145 | margin-bottom:10px; |
||
146 | border-left: 1px solid #8EC73F; |
||
147 | } |
||
148 | |||
149 | .block .head |
||
150 | { |
||
151 | font-style:italic; |
||
152 | } |
||
153 | |||
154 | .block |
||
155 | { |
||
156 | font-family: sans-serif; |
||
157 | font-size: 0.7em; |
||
158 | } |
||
159 | .block ul li p |
||
160 | { |
||
161 | background-color:transparent; |
||
162 | font-style:italic; |
||
163 | } |
||
164 | .block ul li ul li |
||
165 | { |
||
166 | padding-left: 0; |
||
167 | } |
||
168 | |||
169 | .block p, .navLeftMenu h2 { |
||
170 | background-color: #8EC73F; |
||
171 | padding-left: 0; |
||
172 | margin: 0; |
||
173 | |||
174 | } |
||
175 | .block ul |
||
176 | { |
||
177 | list-style:none; |
||
178 | padding-left: 5px; |
||
179 | margin-left:0; |
||
180 | } |
||
181 | .block ul li{ |
||
182 | padding-top:3px; |
||
183 | padding-left:0; |
||
184 | margin-left:0; |
||
185 | } |
||
186 | .block a { |
||
187 | color: #4d4d4d; |
||
188 | text-decoration: none; |
||
189 | } |
||
190 | .block a:visited { |
||
191 | /*color: #4d4d4d;*/ |
||
192 | text-decoration: none; |
||
193 | } |
||
194 | .block a:hover, .linkUnderlineGrayToGreen a:hover { |
||
195 | color: #8EC73F; |
||
196 | text-decoration: underline; |
||
197 | } |
||
198 | .links p |
||
199 | { |
||
200 | background-color:yellow; |
||
201 | } |
||
202 | .links .block |
||
203 | { |
||
204 | border-left: 1px solid yellow; |
||
205 | } |
||
206 | .columnTable |
||
207 | { |
||
208 | width:100%; |
||
209 | } |
||
210 | .columnTable td |
||
211 | { |
||
212 | margin-left: 10px; |
||
213 | } |
||
214 | td.column { |
||
215 | vertical-align: top; |
||
216 | } |
||
217 | |||
218 | </style> |
||
219 | </head> |
||
220 | <body> |
||
221 | <xsl:call-template name="header"/> |
||
222 | |||
223 | <xsl:apply-templates select="//*[@id=$ACTUAL]" mode="root"/> |
||
224 | |||
225 | <xsl:call-template name="footer"/> |
||
226 | </body> |
||
227 | </html> |
||
228 | </xsl:template> |
||
229 | |||
230 | <xsl:template name="header"> |
||
231 | <div id="header"> |
||
232 | <h1>Bem vindos ao meu directorio</h1> |
||
233 | Está autenticado como <xsl:value-of select="$name"/> com os papeis: <xsl:value-of select="$roles"/> |
||
234 | </div> |
||
235 | </xsl:template> |
||
236 | <xsl:template name="footer"> |
||
237 | <div id="footer"> |
||
238 | Sistema de Directorios da <a href="http://www.estgp.pt">ESTG</a> 2008 |
||
239 | </div> |
||
240 | </xsl:template> |
||
241 | <!-- |
||
242 | =========================================================== |
||
243 | | Página de Apresentação de um Nó no Corpo da Página |
||
244 | =========================================================== |
||
245 | --> |
||
246 | <xsl:template match="d:directory" mode="root"> |
||
247 | <xsl:apply-templates select="." mode="topNav"/> |
||
248 | <xsl:apply-templates select="." mode="childs"/> |
||
249 | </xsl:template> |
||
250 | |||
1067 | jmachado | 251 | <xsl:template match="d:leaf[@node='true']" mode="root"> |
368 | jmachado | 252 | <xsl:apply-templates select="." mode="topNav"/> |
253 | <table cellpadding="0" cellspacing="0" width="100%" border="0"> |
||
254 | <tr> |
||
255 | <td id="leftPage"> |
||
256 | <xsl:apply-templates select=".." mode="latNav"/> |
||
257 | </td> |
||
258 | <td class="contentPortal"> |
||
259 | <div class="portal"> |
||
260 | <xsl:apply-templates select="." mode="childs"/> |
||
261 | </div> |
||
262 | </td> |
||
263 | </tr> |
||
264 | </table> |
||
265 | </xsl:template> |
||
266 | |||
267 | <xsl:template match="d:directory" mode="childs"> |
||
268 | <table class="columnTable"> |
||
269 | <tr> |
||
270 | <td class="column"> |
||
1067 | jmachado | 271 | <xsl:if test="d:leaf[@node='false']"> |
368 | jmachado | 272 | <div class="block links"> |
273 | <p><xsl:call-template name="leafsBlockLabel"/></p> |
||
274 | <ul> |
||
1067 | jmachado | 275 | <xsl:for-each select="d:leaf[@node='false']"> |
368 | jmachado | 276 | <li> |
277 | <xsl:apply-templates select="." mode="link"/> |
||
278 | </li> |
||
279 | </xsl:for-each> |
||
280 | </ul> |
||
281 | </div> |
||
282 | </xsl:if> |
||
283 | </td> |
||
1067 | jmachado | 284 | <xsl:if test="d:leaf[@node='true']"> |
368 | jmachado | 285 | <xsl:choose> |
1067 | jmachado | 286 | <xsl:when test="d:groupsDeclaration/d:group/d:name"> |
287 | <xsl:for-each select="d:groupsDeclaration/d:group/d:name"> |
||
368 | jmachado | 288 | <tr> |
289 | <xsl:variable name="group" select="."/> |
||
1067 | jmachado | 290 | <xsl:for-each select="../../../d:leaf[@node='true' and @group=$group]"> |
368 | jmachado | 291 | <td class="column"> |
292 | <xsl:apply-templates select="." mode="block"/> |
||
293 | </td> |
||
294 | </xsl:for-each> |
||
295 | </tr> |
||
296 | </xsl:for-each> |
||
297 | </xsl:when> |
||
298 | <xsl:otherwise> |
||
1067 | jmachado | 299 | <xsl:for-each select="d:leaf[@node='true']"> |
368 | jmachado | 300 | <td class="column"> |
301 | <xsl:apply-templates select="." mode="block"/> |
||
302 | </td> |
||
303 | </xsl:for-each> |
||
304 | </xsl:otherwise> |
||
305 | </xsl:choose> |
||
306 | </xsl:if> |
||
307 | </tr> |
||
308 | </table> |
||
309 | </xsl:template> |
||
310 | |||
1067 | jmachado | 311 | <xsl:template match="d:leaf[@node='true']" mode="childs"> |
368 | jmachado | 312 | <table class="columnTable"> |
313 | <tr> |
||
314 | <td class="column"> |
||
1067 | jmachado | 315 | <xsl:if test="d:leaf[@node='false']"> |
368 | jmachado | 316 | <div class="block links"> |
317 | <p><xsl:call-template name="leafsBlockLabel"/></p> |
||
318 | <ul> |
||
1067 | jmachado | 319 | <xsl:for-each select="d:leaf[@node='false']"> |
368 | jmachado | 320 | <li> |
321 | <xsl:apply-templates select="." mode="link"/> |
||
322 | </li> |
||
323 | </xsl:for-each> |
||
324 | </ul> |
||
325 | </div> |
||
326 | </xsl:if> |
||
327 | </td> |
||
1067 | jmachado | 328 | <xsl:if test="d:leaf[@node='true']"> |
368 | jmachado | 329 | <xsl:choose> |
1067 | jmachado | 330 | <xsl:when test="d:groupsDeclaration/d:group/d:name"> |
331 | <xsl:for-each select="d:groupsDeclaration/d:group/d:name"> |
||
368 | jmachado | 332 | <tr> |
333 | <xsl:variable name="group" select="."/> |
||
1067 | jmachado | 334 | <xsl:for-each select="../../../d:leaf[@node='true' and @group=$group]"> |
368 | jmachado | 335 | <td class="column"> |
336 | <xsl:apply-templates select="." mode="block"/> |
||
337 | </td> |
||
338 | </xsl:for-each> |
||
339 | </tr> |
||
340 | </xsl:for-each> |
||
341 | </xsl:when> |
||
342 | <xsl:otherwise> |
||
1067 | jmachado | 343 | <xsl:for-each select="d:leaf[@node='true']"> |
368 | jmachado | 344 | <td class="column"> |
345 | <xsl:apply-templates select="." mode="block"/> |
||
346 | </td> |
||
347 | </xsl:for-each> |
||
348 | </xsl:otherwise> |
||
349 | </xsl:choose> |
||
350 | </xsl:if> |
||
351 | </tr> |
||
352 | </table> |
||
353 | </xsl:template> |
||
354 | |||
1067 | jmachado | 355 | <xsl:template match="d:leaf[@node='true']" mode="block"> |
368 | jmachado | 356 | <div class="block"> |
357 | <p><xsl:apply-templates select="." mode="link"/></p> |
||
358 | <ul> |
||
1067 | jmachado | 359 | <xsl:for-each select="d:leaf[@node='false']"> |
368 | jmachado | 360 | <li> |
361 | <xsl:apply-templates select="." mode="link"/> |
||
362 | </li> |
||
363 | </xsl:for-each> |
||
1067 | jmachado | 364 | <xsl:for-each select="d:leaf[@node='true']"> |
368 | jmachado | 365 | <li> |
366 | <xsl:apply-templates select="." mode="link"/> |
||
367 | </li> |
||
368 | </xsl:for-each> |
||
369 | </ul> |
||
370 | </div> |
||
371 | </xsl:template> |
||
372 | <!-- |
||
373 | =========================================================== |
||
374 | | Página de Apresentação de uma Folha no Corpo da Página |
||
375 | =========================================================== |
||
376 | --> |
||
1067 | jmachado | 377 | <xsl:template match="d:leaf[@node='false']" mode="root"> |
368 | jmachado | 378 | <xsl:apply-templates select="." mode="topNav"/> |
385 | jmachado | 379 | <table id="bigTable" cellspacing="0" cellpadding="0"> |
368 | jmachado | 380 | <tr> |
381 | <td id="leftPage"> |
||
382 | <xsl:apply-templates select=".." mode="latNav"/> |
||
383 | </td> |
||
384 | <td class="contentPortal"> |
||
379 | jmachado | 385 | <xsl:choose> |
385 | jmachado | 386 | <xsl:when test="not(@remoteExtensionRoot='true') and not(./d:*[@ftpDirectory])"> |
379 | jmachado | 387 | <xsl:apply-templates select="." mode="bodyContent"/> |
388 | </xsl:when> |
||
389 | <xsl:otherwise> |
||
390 | <xsl:choose> |
||
391 | <xsl:when test="//*[@id=$ACTUAL_REMOTE_CHILD]"> |
||
392 | <xsl:apply-templates select="//*[@id=$ACTUAL_REMOTE_CHILD]" mode="remoteChildsContent"/> |
||
393 | </xsl:when> |
||
394 | <xsl:otherwise> |
||
385 | jmachado | 395 | <xsl:apply-templates select="." mode="remoteChildsContent"/> |
379 | jmachado | 396 | </xsl:otherwise> |
397 | </xsl:choose> |
||
398 | </xsl:otherwise> |
||
399 | </xsl:choose> |
||
368 | jmachado | 400 | </td> |
401 | </tr> |
||
402 | </table> |
||
403 | </xsl:template> |
||
404 | |||
380 | jmachado | 405 | |
406 | <xsl:template match="d:*" mode="remoteChildsContent"> |
||
379 | jmachado | 407 | <xsl:apply-templates select="." mode="topNavRemote"/> |
408 | <div class="files"> |
||
409 | <table cellpadding="0" cellspacing="0"> |
||
410 | <tr> |
||
411 | <th> |
||
412 | Nome do ficheiro/pasta |
||
413 | </th> |
||
414 | <th> |
||
415 | Data de Modificação |
||
416 | </th> |
||
417 | <th> |
||
418 | Tamanho |
||
419 | </th> |
||
420 | </tr> |
||
1067 | jmachado | 421 | <xsl:apply-templates select="./d:leaf[@node='false' and @ftpDirectory='true']" mode="ftpLine"/> |
422 | <xsl:apply-templates select="./d:leaf[@node='false' and @ftpDirectory='false']" mode="ftpLine"/> |
||
379 | jmachado | 423 | </table> |
424 | </div> |
||
425 | </xsl:template> |
||
1067 | jmachado | 426 | <xsl:template match="d:leaf[@node='false']" mode="ftpLine"> |
379 | jmachado | 427 | <xsl:choose> |
380 | jmachado | 428 | <xsl:when test="./@ftpDirectory='true'"> |
429 | <tr class="dir"> |
||
430 | <td colspan="3" > |
||
379 | jmachado | 431 | <img> |
432 | <xsl:attribute name="src"><xsl:value-of select="$contextPath"/>/imgs/folder.gif</xsl:attribute> |
||
433 | </img> |
||
380 | jmachado | 434 | <xsl:text> </xsl:text> |
435 | <xsl:apply-templates select="." mode="link"/> |
||
379 | jmachado | 436 | </td> |
437 | </tr> |
||
438 | </xsl:when> |
||
439 | <xsl:otherwise> |
||
380 | jmachado | 440 | <tr class="file"> |
379 | jmachado | 441 | <td> |
380 | jmachado | 442 | <xsl:apply-templates select="." mode="mime"/><xsl:text> </xsl:text> |
443 | <xsl:apply-templates select="." mode="link"/> |
||
379 | jmachado | 444 | </td> |
445 | <td> |
||
380 | jmachado | 446 | <xsl:value-of select="./@lastModification"/> |
379 | jmachado | 447 | </td> |
448 | <td> |
||
380 | jmachado | 449 | <xsl:value-of select="./@size"/> |
379 | jmachado | 450 | </td> |
451 | </tr> |
||
452 | </xsl:otherwise> |
||
453 | </xsl:choose> |
||
454 | </xsl:template> |
||
1067 | jmachado | 455 | <xsl:template match="d:leaf[@node='false']" mode="mime"> |
380 | jmachado | 456 | <img> |
457 | <xsl:attribute name="alt"><xsl:value-of select="."/></xsl:attribute> |
||
458 | <xsl:attribute name="src"> |
||
459 | <xsl:choose> |
||
460 | <xsl:when test="contains(@extension, 'rtf')"><xsl:value-of select="$contextPath"/>/imgs/mime/doc.gif</xsl:when> |
||
392 | jmachado | 461 | <xsl:when test="contains(@extension, 'doc')"><xsl:value-of select="$contextPath"/>/imgs/mime/doc.gif</xsl:when> |
462 | <xsl:when test="contains(@extension, 'docx')"><xsl:value-of select="$contextPath"/>/imgs/mime/doc.gif</xsl:when> |
||
380 | jmachado | 463 | <xsl:when test="contains(@extension, 'pdf')"><xsl:value-of select="$contextPath"/>/imgs/mime/pdf.gif</xsl:when> |
464 | <xsl:when test="contains(@extension, 'ppt')"><xsl:value-of select="$contextPath"/>/imgs/mime/ppt.gif</xsl:when> |
||
392 | jmachado | 465 | <xsl:when test="contains(@extension, 'zip')"><xsl:value-of select="$contextPath"/>/imgs/mime/zip.gif</xsl:when> |
466 | <xsl:when test="contains(@extension, 'gz')"><xsl:value-of select="$contextPath"/>/imgs/mime/zip.gif</xsl:when> |
||
467 | <xsl:when test="contains(@extension, 'tgz')"><xsl:value-of select="$contextPath"/>/imgs/mime/zip.gif</xsl:when> |
||
468 | <xsl:when test="contains(@extension, 'rar')"><xsl:value-of select="$contextPath"/>/imgs/mime/rar.gif</xsl:when> |
||
469 | <xsl:when test="contains(@extension, 'html')"><xsl:value-of select="$contextPath"/>/imgs/mime/html.gif</xsl:when> |
||
470 | <xsl:when test="contains(@extension, 'html')"><xsl:value-of select="$contextPath"/>/imgs/mime/html.gif</xsl:when> |
||
471 | <xsl:when test="contains(@extension, 'xls')"><xsl:value-of select="$contextPath"/>/imgs/mime/xls.gif</xsl:when> |
||
472 | <xsl:when test="contains(@extension, 'xlsx')"><xsl:value-of select="$contextPath"/>/imgs/mime/xls.gif</xsl:when> |
||
380 | jmachado | 473 | <xsl:when test="contains(@extension, 'txt')"><xsl:value-of select="$contextPath"/>/imgs/mime/txt.gif</xsl:when> |
474 | <xsl:otherwise><xsl:value-of select="$contextPath"/>/imgs/mime/unknown.gif</xsl:otherwise> |
||
475 | </xsl:choose> |
||
476 | </xsl:attribute> |
||
477 | </img> |
||
478 | </xsl:template> |
||
368 | jmachado | 479 | <!--<xsl:function name="d:parse" as="document-node()"> |
480 | <xsl:param name="s" as="xs:string"/> |
||
481 | <xsl:sequence select="doc(concat('data:text/xml','<ola>teste</ola>'))"/> |
||
482 | |||
483 | --><!--<xsl:sequence select="doc(concat('data:text/xml',$s))"/> --><!-- |
||
484 | </xsl:function>--> |
||
485 | |||
486 | |||
487 | <!-- |
||
488 | =========================================================== |
||
489 | | Barra de Navegação Superior |
||
490 | =========================================================== |
||
491 | --> |
||
492 | |||
380 | jmachado | 493 | |
1067 | jmachado | 494 | <xsl:template match="d:leaf[@node='false']" mode="topNav"> |
368 | jmachado | 495 | <div id="topnav"> |
496 | <ul> |
||
497 | <xsl:apply-templates select=".." mode="navBack"/> |
||
498 | <li class="navPlace"> |
||
499 | > |
||
500 | <xsl:apply-templates select="." mode="label"/> |
||
501 | </li> |
||
502 | </ul> |
||
503 | </div> |
||
504 | </xsl:template> |
||
505 | |||
1067 | jmachado | 506 | <xsl:template match="d:leaf[@node='true']" mode="topNav"> |
368 | jmachado | 507 | <div id="topnav"> |
508 | <ul> |
||
509 | <xsl:apply-templates select=".." mode="navBack"/> |
||
510 | <li class="navPlace"> |
||
511 | > |
||
512 | <xsl:apply-templates select="." mode="label"/> |
||
513 | </li> |
||
514 | </ul> |
||
515 | </div> |
||
516 | </xsl:template> |
||
517 | |||
518 | <xsl:template match="d:directory" mode="topNav"> |
||
519 | <!--O Baco faz isto por nós para que a barra superior fique alinhada correctamente--> |
||
520 | <!--<div id="topnav"> |
||
521 | <ul> |
||
522 | <li class="navPlace"> |
||
523 | <xsl:call-template name="homeLink"/> |
||
524 | </li> |
||
525 | <li class="navPlace"> |
||
526 | > |
||
527 | <xsl:apply-templates select="." mode="label"/> |
||
528 | </li> |
||
529 | </ul> |
||
530 | </div>--> |
||
531 | </xsl:template> |
||
532 | |||
1067 | jmachado | 533 | <xsl:template match="d:leaf[@node='false']" mode="topNavRemote"> |
379 | jmachado | 534 | <div id="topnav"> |
535 | <ul> |
||
536 | <li class="navPlace"> |
||
380 | jmachado | 537 | <xsl:value-of select="@label"/></li> |
379 | jmachado | 538 | </ul> |
539 | </div> |
||
540 | </xsl:template> |
||
368 | jmachado | 541 | |
1067 | jmachado | 542 | <xsl:template match="d:leaf[@node='true']" mode="topNavRemote"> |
379 | jmachado | 543 | <div id="topnav"> |
544 | <ul> |
||
545 | <xsl:apply-templates select=".." mode="navBackRemote"/> |
||
546 | <li class="navPlace"> |
||
547 | > |
||
548 | <xsl:apply-templates select="." mode="label"/> |
||
549 | </li> |
||
550 | </ul> |
||
551 | </div> |
||
552 | </xsl:template> |
||
553 | |||
554 | |||
368 | jmachado | 555 | <xsl:template match="d:directory" mode="navBack"> |
556 | <li class="navPlace"> |
||
557 | <xsl:call-template name="homeLink"/> |
||
558 | </li> |
||
559 | <li class="navPlace"> |
||
560 | > |
||
561 | <xsl:apply-templates select="." mode="link"/> |
||
562 | </li> |
||
563 | </xsl:template> |
||
564 | |||
1067 | jmachado | 565 | <xsl:template match="d:leaf[@node='true']" mode="navBack"> |
368 | jmachado | 566 | <xsl:apply-templates select=".." mode="navBack"/> |
567 | |||
568 | <li class="navPlace"> |
||
569 | > |
||
570 | <xsl:apply-templates select="." mode="link"/> |
||
571 | </li> |
||
572 | </xsl:template> |
||
573 | |||
1067 | jmachado | 574 | <xsl:template match="d:leaf[@node='false']" mode="navBack"> |
380 | jmachado | 575 | <xsl:apply-templates select=".." mode="navBack"/> |
576 | |||
379 | jmachado | 577 | <li class="navPlace"> |
578 | > |
||
579 | <xsl:apply-templates select="." mode="link"/> |
||
580 | </li> |
||
581 | </xsl:template> |
||
380 | jmachado | 582 | |
1067 | jmachado | 583 | <xsl:template match="d:leaf[@node='false']" mode="navBackRemote"> |
380 | jmachado | 584 | <li class="navPlace"> |
585 | <xsl:apply-templates select="." mode="link"/> |
||
586 | </li> |
||
587 | </xsl:template> |
||
1067 | jmachado | 588 | <xsl:template match="d:leaf[@node='true']" mode="navBackRemote"> |
380 | jmachado | 589 | <xsl:apply-templates select=".." mode="navBackRemote"/> |
379 | jmachado | 590 | <li class="navPlace"> |
591 | > |
||
592 | <xsl:apply-templates select="." mode="link"/> |
||
593 | </li> |
||
594 | </xsl:template> |
||
595 | |||
368 | jmachado | 596 | <!-- |
597 | =========================================================== |
||
598 | | Barra de Navegação Lateral Esquerda |
||
599 | =========================================================== |
||
600 | --> |
||
1067 | jmachado | 601 | <xsl:template match="d:leaf[@node='true']" mode="latNav"> |
602 | <!--<xsl:if test="./d:leaf or ./d:node">--> |
||
380 | jmachado | 603 | |
368 | jmachado | 604 | <div class="linkMenuBlock"> |
605 | <div class="linkMenuBlockTitle"><xsl:apply-templates select="." mode="label"/></div> |
||
606 | <div class="linkLeftMenu"> |
||
607 | <div class="listClean"> |
||
608 | <ul id="portalMenu"> |
||
1067 | jmachado | 609 | <xsl:for-each select="./d:leaf[@node='true']"> |
368 | jmachado | 610 | <xsl:choose> |
611 | <xsl:when test="@id = $ACTUAL"> |
||
612 | <li class="navPlace selected"> |
||
613 | <xsl:apply-templates select="." mode="label"/> |
||
614 | </li> |
||
615 | </xsl:when> |
||
616 | <xsl:otherwise> |
||
617 | <li class="navPlace"> |
||
618 | <xsl:apply-templates select="." mode="link"/> |
||
619 | </li> |
||
620 | </xsl:otherwise> |
||
621 | </xsl:choose> |
||
622 | </xsl:for-each> |
||
1067 | jmachado | 623 | <xsl:for-each select="./d:leaf[@node='false']"> |
368 | jmachado | 624 | <li class="navPlace">...<xsl:apply-templates select="." mode="link"/></li> |
625 | </xsl:for-each> |
||
626 | </ul> |
||
627 | </div> |
||
628 | </div> |
||
629 | </div> |
||
1067 | jmachado | 630 | <!--</xsl:if>--> |
368 | jmachado | 631 | </xsl:template> |
632 | |||
1067 | jmachado | 633 | <xsl:template match="d:leaf[@node='false']" mode="latNav"> |
634 | <!--<xsl:if test="./d:leaf or ./d:node">--> |
||
380 | jmachado | 635 | <div class="linkMenuBlock"> |
636 | <div class="linkMenuBlockTitle"><xsl:apply-templates select="." mode="label"/></div> |
||
637 | <div class="linkLeftMenu"> |
||
638 | <div class="listClean"> |
||
639 | <ul id="portalMenu"> |
||
1067 | jmachado | 640 | <xsl:for-each select="./d:leaf[@node='true']"> |
380 | jmachado | 641 | <xsl:choose> |
642 | <xsl:when test="@id = $ACTUAL"> |
||
643 | <li class="navPlace selected"> |
||
644 | <xsl:apply-templates select="." mode="label"/> |
||
645 | </li> |
||
646 | </xsl:when> |
||
647 | <xsl:otherwise> |
||
648 | <li class="navPlace"> |
||
649 | <xsl:apply-templates select="." mode="link"/> |
||
650 | </li> |
||
651 | </xsl:otherwise> |
||
652 | </xsl:choose> |
||
653 | </xsl:for-each> |
||
1067 | jmachado | 654 | <xsl:for-each select="./d:leaf[@node='false']"> |
380 | jmachado | 655 | <li class="navPlace">...<xsl:apply-templates select="." mode="link"/></li> |
656 | </xsl:for-each> |
||
657 | </ul> |
||
658 | </div> |
||
659 | </div> |
||
660 | </div> |
||
1067 | jmachado | 661 | <!--</xsl:if>--> |
380 | jmachado | 662 | </xsl:template> |
663 | |||
369 | jmachado | 664 | <xsl:template match="d:directory" mode="latNav"> |
1067 | jmachado | 665 | <!--<xsl:if test="./d:leaf or ./d:node">--> |
369 | jmachado | 666 | <div class="linkMenuBlock"> |
667 | <div class="linkMenuBlockTitle"><xsl:apply-templates select="." mode="label"/></div> |
||
668 | <div class="linkLeftMenu"> |
||
669 | <div class="listClean"> |
||
670 | <ul id="portalMenu"> |
||
1067 | jmachado | 671 | <xsl:for-each select="./d:leaf[@node='true']"> |
369 | jmachado | 672 | <xsl:choose> |
673 | <xsl:when test="@id = $ACTUAL"> |
||
674 | <li class="navPlace selected"> |
||
675 | <xsl:apply-templates select="." mode="label"/> |
||
676 | </li> |
||
677 | </xsl:when> |
||
678 | <xsl:otherwise> |
||
679 | <li class="navPlace"> |
||
680 | <xsl:apply-templates select="." mode="link"/> |
||
681 | </li> |
||
682 | </xsl:otherwise> |
||
683 | </xsl:choose> |
||
684 | </xsl:for-each> |
||
1067 | jmachado | 685 | <xsl:for-each select="./d:leaf[@node='false']"> |
381 | jmachado | 686 | <li class="navPlace"><xsl:call-template name="linkPrefix"/><xsl:apply-templates select="." mode="link"/></li> |
369 | jmachado | 687 | </xsl:for-each> |
688 | </ul> |
||
689 | </div> |
||
690 | </div> |
||
691 | </div> |
||
1067 | jmachado | 692 | <!--</xsl:if>--> |
369 | jmachado | 693 | </xsl:template> |
694 | |||
381 | jmachado | 695 | <xsl:template name="linkPrefix"> |
696 | ... |
||
697 | </xsl:template> |
||
368 | jmachado | 698 | <!-- |
699 | =========================================================== |
||
700 | | Apresentar Todo o Directorio em árvore - NAO ESTA EM USO DE MOMENTO |
||
701 | =========================================================== |
||
702 | --> |
||
703 | |||
704 | <xsl:template name="treeRoot"> |
||
1067 | jmachado | 705 | <xsl:if test="/d:directory/d:leaf[@node='true']"> |
368 | jmachado | 706 | <ul> |
1067 | jmachado | 707 | <xsl:for-each select="/d:directory/d:leaf[@node='true']"> |
368 | jmachado | 708 | <li> |
709 | <xsl:apply-templates select="." mode="treeLoop"/> |
||
710 | </li> |
||
711 | </xsl:for-each> |
||
712 | </ul> |
||
713 | </xsl:if> |
||
714 | </xsl:template> |
||
715 | |||
1067 | jmachado | 716 | <xsl:template match="d:leaf[@node='true']" mode="treeLoop"> |
368 | jmachado | 717 | <div> |
718 | <xsl:if test="$ACTUAL=@id"> |
||
719 | <xsl:attribute name="style">background-color:yellow</xsl:attribute> |
||
720 | </xsl:if> |
||
721 | <p><xsl:value-of select="@label"/></p> |
||
1067 | jmachado | 722 | <xsl:if test="./d:leaf[@node='false']"> |
723 | <xsl:for-each select="./d:leaf[@node='false']"> |
||
368 | jmachado | 724 | <xsl:apply-templates select="." mode="tree"/> |
725 | </xsl:for-each> |
||
726 | </xsl:if> |
||
1067 | jmachado | 727 | <xsl:if test="./d:leaf[@node='true']"> |
368 | jmachado | 728 | <ul> |
1067 | jmachado | 729 | <xsl:for-each select="./d:leaf[@node='true']"> |
368 | jmachado | 730 | <li> |
731 | <xsl:apply-templates select="." mode="treeLoop"/> |
||
732 | </li> |
||
733 | </xsl:for-each> |
||
734 | </ul> |
||
735 | </xsl:if> |
||
736 | </div> |
||
737 | </xsl:template> |
||
738 | |||
1067 | jmachado | 739 | <xsl:template match="d:leaf[@node='false']" mode="tree"> |
368 | jmachado | 740 | <div> |
741 | <xsl:if test="$ACTUAL=@id"> |
||
742 | <xsl:attribute name="style">background-color:yellow</xsl:attribute> |
||
743 | </xsl:if> |
||
744 | <p>...<xsl:apply-templates mode="label"/></p> |
||
745 | </div> |
||
746 | </xsl:template> |
||
747 | |||
748 | |||
749 | <!-- |
||
750 | =========================================================== |
||
751 | | TEMPLATES DE OUTROS ESQUEMAS |
||
752 | =========================================================== |
||
753 | --> |
||
754 | <!-- Foo Templates --> |
||
755 | <xsl:template match="foo:record"> |
||
756 | <p>titulo:<xsl:value-of select="foo:title"/></p> |
||
757 | <p>texto:<xsl:value-of select="foo:text"/></p> |
||
758 | </xsl:template> |
||
759 | |||
760 | |||
761 | <!--OAIDC Templates--> |
||
762 | |||
763 | <xsl:template match="oai_dc:dc"> |
||
764 | <table> |
||
765 | <tr> |
||
766 | <th colspan="2">Registo Bibliografico</th> |
||
767 | </tr> |
||
768 | <xsl:apply-templates select="./dc:*"/> |
||
769 | </table> |
||
770 | </xsl:template> |
||
771 | |||
772 | <xsl:template match="dc:*"> |
||
773 | <tr> |
||
774 | <th><xsl:value-of select="local-name(.)"/></th> |
||
775 | <td><xsl:value-of select="./text()"/></td> |
||
776 | </tr> |
||
777 | </xsl:template> |
||
778 | |||
779 | |||
780 | </xsl:stylesheet> |