Subversion Repositories bacoAlunos

Rev

Rev 1306 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
386 jmachado 1
<?xml version="1.0" encoding="UTF-8"?>
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/"
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="style1.xsl"/>
5
 
405 jmachado 6
 
7
    <xsl:template name="homeLink">
8
          <a>
9
              <xsl:attribute name="href"><xsl:value-of select="$contextPath"/>/dir/<xsl:value-of select="/d:directory/@id"/>/<xsl:value-of select="/d:directory/*[1]/@id"/><xsl:value-of select="/d:directory/*[1]/@url"/></xsl:attribute>
10
              <xsl:value-of select="/d:directory/@label"/>
11
          </a>
12
      </xsl:template>
13
 
14
 
1067 jmachado 15
    <xsl:template match="d:leaf[@node='false']" mode="topNav">
386 jmachado 16
                <xsl:if test="not(local-name(..) = 'directory')">
17
                        <div id="topnav">
18
                                <ul>
19
                                        <xsl:apply-templates select=".." mode="navBack"/>
20
                                        <li class="navPlace">
21
                                                &gt;
22
                                                <xsl:apply-templates select="." mode="label"/>
23
                                        </li>
24
                                </ul>
25
                        </div>
26
                </xsl:if>
27
        </xsl:template>
28
 
1067 jmachado 29
        <xsl:template match="d:leaf[@node='true']" mode="topNav">
386 jmachado 30
                <xsl:if test="not(local-name(..) = 'directory')">
31
                        <div id="topnav">
32
                                <ul>                   
33
                                        <xsl:apply-templates select=".." mode="navBack"/>
34
                                        <li class="navPlace">
35
                                                &gt;
36
                                                <xsl:apply-templates select="." mode="label"/>
37
                                        </li>
38
                                </ul>
39
                        </div>
40
                </xsl:if>
41
        </xsl:template>
42
 
43
        <xsl:template match="d:directory" mode="topNav">
44
 
45
        </xsl:template>
46
 
47
        <xsl:template name="linkPrefix">
48
 
49
        </xsl:template>
50
 
1067 jmachado 51
        <xsl:template match="d:leaf[@node='false']" mode="topNavRemote">
386 jmachado 52
                <div id="topnav">
53
                        <ul>
54
                                <li class="navPlace">
55
                                        <xsl:value-of select="@label"/></li>
56
                        </ul>
57
                </div>
58
        </xsl:template>
59
 
1067 jmachado 60
        <xsl:template match="d:leaf[@node='true']" mode="topNavRemote">
386 jmachado 61
                <div id="topnav">
62
                        <ul>
63
                                <xsl:apply-templates select=".." mode="navBackRemote"/>
64
                                <li class="navPlace">
65
                                        &gt;
66
                                        <xsl:apply-templates select="." mode="label"/>
67
                                </li>
68
                        </ul>
69
                </div>
70
        </xsl:template>
71
 
72
 
73
        <xsl:template match="d:directory" mode="navBack">
74
                <li class="navPlace">
75
                <xsl:call-template name="homeLink"/>
76
                </li>
77
                <li class="navPlace">
78
                        &gt;
79
                        <xsl:apply-templates select="." mode="link"/>
80
                </li>
81
        </xsl:template>
82
 
1067 jmachado 83
        <xsl:template match="d:leaf[@node='true']" mode="navBack">
386 jmachado 84
        <xsl:if test="not(local-name(..) = 'directory')">
85
            <xsl:apply-templates select=".." mode="navBack"/>
86
        </xsl:if>
87
 
88
        <li class="navPlace">
405 jmachado 89
                        <xsl:if test="local-name(..) = 'directory'">
90
                                <xsl:call-template name="homeLink"/>
91
                        </xsl:if>
386 jmachado 92
            &gt;
93
            <xsl:apply-templates select="." mode="link"/>
94
                </li>
95
        </xsl:template>
96
 
1067 jmachado 97
        <xsl:template match="d:leaf[@node='false']" mode="navBack">
386 jmachado 98
        <xsl:if test="not(local-name(..) = 'directory')">
99
            <xsl:apply-templates select=".." mode="navBack"/>
100
        </xsl:if>
101
 
102
        <li class="navPlace">
405 jmachado 103
            <xsl:if test="local-name(..) = 'directory'">
104
                                <xsl:call-template name="homeLink"/>
105
                        </xsl:if>
106
            &gt; <xsl:apply-templates select="." mode="link"/>
386 jmachado 107
                </li>
108
        </xsl:template>
109
 
1067 jmachado 110
        <xsl:template match="d:leaf[@node='false']" mode="navBackRemote">
386 jmachado 111
                <li class="navPlace">
112
                        <xsl:apply-templates select="." mode="link"/>
113
                </li>
114
        </xsl:template>
1067 jmachado 115
        <xsl:template match="d:leaf[@node='true']" mode="navBackRemote">
386 jmachado 116
                <xsl:apply-templates select=".." mode="navBackRemote"/>
117
                <li class="navPlace">
118
                        &gt;
119
                        <xsl:apply-templates select="." mode="link"/>
120
                </li>
121
        </xsl:template>
122
 
123
        <!--
124
                ===========================================================
125
                |       Barra de Navegação Lateral Esquerda
126
                ===========================================================
127
        -->
1067 jmachado 128
        <xsl:template match="d:leaf[@node='true']" mode="latNav">
129
                <!--<xsl:if test="./d:leaf or ./d:node">-->
386 jmachado 130
 
131
                        <div class="linkMenuBlock">
132
                                <div class="linkMenuBlockTitle"><xsl:apply-templates select="." mode="label"/></div>
133
                                <div class="linkLeftMenu">
134
                                        <div class="listClean">
135
                                                <ul id="portalMenu">
1067 jmachado 136
                                                        <xsl:for-each select="./d:leaf[@node='true']">
386 jmachado 137
                                                                <xsl:choose>
138
                                                                        <xsl:when test="@id = $ACTUAL">
139
                                                                                <li class="navPlace selected">
140
                                                                                        <xsl:apply-templates select="." mode="label"/>
141
                                                                                </li>
142
                                                                        </xsl:when>
143
                                                                        <xsl:otherwise>
144
                                                                                <li class="navPlace">
145
                                                                                        <xsl:apply-templates select="." mode="link"/>
146
                                                                                </li>                                          
147
                                                                        </xsl:otherwise>
148
                                                                </xsl:choose>  
149
                                                        </xsl:for-each>
1067 jmachado 150
                                                        <xsl:for-each select="./d:leaf[@node='false']">
386 jmachado 151
                                                                <li class="navPlace">...<xsl:apply-templates select="." mode="link"/></li>     
152
                                                        </xsl:for-each>
153
                                                </ul>
154
                                        </div>
155
                                </div>
156
                        </div>
1067 jmachado 157
                <!--</xsl:if>-->
386 jmachado 158
        </xsl:template>
159
 
1067 jmachado 160
        <xsl:template match="d:leaf[@node='false']" mode="latNav">
161
                <!--<xsl:if test="./d:leaf or ./d:node">-->
386 jmachado 162
                        <div class="linkMenuBlock">
163
                                <div class="linkMenuBlockTitle"><xsl:apply-templates select="." mode="label"/></div>
164
                                <div class="linkLeftMenu">
165
                                        <div class="listClean">
166
                                                <ul id="portalMenu">
1067 jmachado 167
                                                        <xsl:for-each select="./d:leaf[@node='true']">
386 jmachado 168
                                                                <xsl:choose>
169
                                                                        <xsl:when test="@id = $ACTUAL">
170
                                                                                <li class="navPlace selected">
171
                                                                                        <xsl:apply-templates select="." mode="label"/>
172
                                                                                </li>
173
                                                                        </xsl:when>
174
                                                                        <xsl:otherwise>
175
                                                                                <li class="navPlace">
176
                                                                                        <xsl:apply-templates select="." mode="link"/>
177
                                                                                </li>                                          
178
                                                                        </xsl:otherwise>
179
                                                                </xsl:choose>  
180
                                                        </xsl:for-each>
1067 jmachado 181
                                                        <xsl:for-each select="./d:leaf[@node='false']">
386 jmachado 182
                                                                <li class="navPlace"><xsl:apply-templates select="." mode="link"/></li>
183
                                                        </xsl:for-each>
184
                                                </ul>
185
                                        </div>
186
                                </div>
187
                        </div>
1067 jmachado 188
                <!--</xsl:if>-->
386 jmachado 189
        </xsl:template>
190
 
191
 
405 jmachado 192
 
386 jmachado 193
 
194
</xsl:stylesheet>