Rev 885 |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:curso="http://www.estgp.pt/xsd/planoestudos/1.0/">
<xsl:template match="/">
<html>
<head>
<title></title>
<meta content="UTF-8" http-equiv="encoding"></meta>
<style type="text/css">
body *, .contentPortal, .contentPortal p, .contentPortal li, div
{
font-family: "bitstream vera sans",Verdana,Arial,Helvetica,sans-serif;
font-size: 11px;
}
.planoCurricular td, .planoCurricular th
{
font-family: "bitstream vera sans",Verdana,Arial,Helvetica,sans-serif;
}
.planoCurricular
{
border:1px solid black;
}
.planoCurricular th
{
font-weight:normal;
border:1px solid black;
}
.planoCurricular td.unidade
{
text-align:right;
}
td.unidade span
{
width:100%;
}
.semestre
{
background-color:#8ec73f;
}
.semestreHead
{
background-color:#8ec73f;
}
.perfilNome, .perfilHead
{
background-color:#D6D6D6
}
.ects
{
background-color:#EBFCD6;
}
.ficha
{
background-color:#EEEEEE;
text-alignment: center;
}
</style>
</head>
<body>
<xsl:call-template name="fragmentoCurso"/>
</body>
</html>
</xsl:template>
<xsl:template name="fragmentoCurso">
<div class="seccao">
<table class="planoCurricular">
<xsl:for-each select="//curso:semestre">
<tr>
<th class="semestre">
<xsl:if test="./curso:perfil">
<xsl:attribute name="colspan"><xsl:value-of select="count(distinct-values(//curso:horasContacto/*/name())) + 3"/></xsl:attribute>
</xsl:if>
<xsl:choose>
<xsl:when test="@id = 'S1'">1º ano 1º semestre</xsl:when>
<xsl:when test="@id = 'S2'">1º ano 2º semestre</xsl:when>
<xsl:when test="@id = 'S3'">2º ano 1º semestre</xsl:when>
<xsl:when test="@id = 'S4'">2º ano 2º semestre</xsl:when>
<xsl:when test="@id = 'S5'">3º ano 1º semestre</xsl:when>
<xsl:when test="@id = 'S6'">3º ano 2º semestre</xsl:when>
<xsl:when test="@id = 'S7'">4º ano 1º semestre</xsl:when>
<xsl:when test="@id = 'S8'">4º ano 2º semestre</xsl:when>
<xsl:when test="@id = 'S9'">5º ano 1º semestre</xsl:when>
<xsl:when test="@id = 'S10'">5º ano 2º semestre</xsl:when>
<xsl:when test="@id = 'S11'">6º ano 1º semestre</xsl:when>
<xsl:when test="@id = 'S12'">6º ano 2º semestre</xsl:when>
<xsl:when test="@id = 'A1'">Anuais 1º Ano</xsl:when>
<xsl:when test="@id = 'A2'">Anuais 2º Ano</xsl:when>
<xsl:when test="@id = 'A3'">Anuais 3º Ano</xsl:when>
<xsl:when test="@id = 'A4'">Anuais 4º Ano</xsl:when>
<xsl:when test="@id = 'A5'">Anuais 5º Ano</xsl:when>
<xsl:otherwise><xsl:value-of select="@id"/></xsl:otherwise>
</xsl:choose>
</th>
<xsl:if test="not(./curso:perfil)">
<th class="semestreHead">total</th>
<xsl:if test="//curso:T"><th class="semestreHead">T</th></xsl:if>
<xsl:if test="//curso:TP"><th class="semestreHead">TP</th></xsl:if>
<xsl:if test="//curso:P"><th class="semestreHead">P</th></xsl:if>
<xsl:if test="//curso:PL"><th class="semestreHead">PL</th></xsl:if>
<xsl:if test="//curso:PD"><th class="semestreHead">PD</th></xsl:if>
<xsl:if test="//curso:OT"><th class="semestreHead">OT</th></xsl:if>
<xsl:if test="//curso:E"><th class="semestreHead">E</th></xsl:if>
<xsl:if test="//curso:S"><th class="semestreHead">S</th></xsl:if>
<xsl:if test="//curso:TC"><th class="semestreHead">TC</th></xsl:if>
<xsl:if test="//curso:O"><th class="semestreHead">O</th></xsl:if>
<th class="semestreHead ectsHead">ECTS</th>
<th class="semestreHead ectsHead">Ficha</th>
</xsl:if>
</tr>
<xsl:choose>
<xsl:when test="./curso:perfil">
<xsl:apply-templates select="./curso:perfil" />
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="./curso:unidade" />
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</table>
</div>
</xsl:template>
<xsl:template match="curso:perfil">
<tr>
<th class="perfilNome">
<xsl:value-of select="@nome"/>
</th>
<th class="perfilHead">total</th>
<xsl:if test="//curso:T"><th class="perfilHead">T</th></xsl:if>
<xsl:if test="//curso:TP"><th class="perfilHead">TP</th></xsl:if>
<xsl:if test="//curso:P"><th class="perfilHead">P</th></xsl:if>
<xsl:if test="//curso:PL"><th class="perfilHead">PL</th></xsl:if>
<xsl:if test="//curso:PD"><th class="perfilHead">PD</th></xsl:if>
<xsl:if test="//curso:OT"><th class="perfilHead">OT</th></xsl:if>
<xsl:if test="//curso:E"><th class="perfilHead">E</th></xsl:if>
<xsl:if test="//curso:S"><th class="perfilHead">S</th></xsl:if>
<xsl:if test="//curso:TC"><th class="perfilHead">TC</th></xsl:if>
<xsl:if test="//curso:O"><th class="perfilHead">O</th></xsl:if>
<th class="perfilHead ectsHead">ECTS</th>
<th class="semestreHead ectsHead">Ficha</th>
<xsl:apply-templates select="./curso:unidade" mode="perfil"/>
</tr>
</xsl:template>
<xsl:template match="curso:unidade" mode="perfil">
<tr>
<td class="perfil unidadeNome">
<span>
<xsl:choose>
<xsl:when test="@siges">
<a>
<xsl:attribute name="href">startLoadCourseUnitSiges.do?unitCode=<xsl:value-of select="@siges"/>&courseCode=<xsl:value-of select="$COURSE_SIGES_CODE"/>&semestre=<xsl:value-of select="../../@id"/></xsl:attribute>
<xsl:value-of select="./curso:nome"/>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="./curso:nome"/>
</xsl:otherwise>
</xsl:choose>
</span>
</td>
<td class="perfil unidade"><span><xsl:value-of select="./curso:totalHoras"/></span></td>
<xsl:if test="//curso:T"><td class="perfil unidade"><span><xsl:if test="./curso:horasContacto/curso:T"><xsl:attribute name="class">unidade celula</xsl:attribute><xsl:value-of select="./curso:horasContacto/curso:T"/></xsl:if></span></td></xsl:if>
<xsl:if test="//curso:TP"><td class="perfil unidade"><span><xsl:if test="./curso:horasContacto/curso:TP"><xsl:attribute name="class">unidade celula</xsl:attribute><xsl:value-of select="./curso:horasContacto/curso:TP"/></xsl:if></span></td></xsl:if>
<xsl:if test="//curso:P"><td class="perfil unidade"><span><xsl:if test="./curso:horasContacto/curso:P"><xsl:attribute name="class">unidade celula</xsl:attribute><xsl:value-of select="./curso:horasContacto/curso:P"/></xsl:if></span></td></xsl:if>
<xsl:if test="//curso:PL"><td class="perfil unidade"><span><xsl:if test="./curso:horasContacto/curso:PL"><xsl:attribute name="class">unidade celula</xsl:attribute><xsl:value-of select="./curso:horasContacto/curso:PL"/></xsl:if></span></td></xsl:if>
<xsl:if test="//curso:PD"><td class="perfil unidade"><span><xsl:if test="./curso:horasContacto/curso:PD"><xsl:attribute name="class">unidade celula</xsl:attribute><xsl:value-of select="./curso:horasContacto/curso:PD"/></xsl:if></span></td></xsl:if>
<xsl:if test="//curso:OT"><td class="perfil unidade"><span><xsl:if test="./curso:horasContacto/curso:OT"><xsl:attribute name="class">unidade celula</xsl:attribute><xsl:value-of select="./curso:horasContacto/curso:OT"/></xsl:if></span></td></xsl:if>
<xsl:if test="//curso:E"><td class="perfil unidade"><span><xsl:if test="./curso:horasContacto/curso:E"><xsl:attribute name="class">unidade celula</xsl:attribute><xsl:value-of select="./curso:horasContacto/curso:E"/></xsl:if></span></td></xsl:if>
<xsl:if test="//curso:S"><td class="perfil unidade"><span><xsl:if test="./curso:horasContacto/curso:S"><xsl:attribute name="class">unidade celula</xsl:attribute><xsl:value-of select="./curso:horasContacto/curso:S"/></xsl:if></span></td></xsl:if>
<xsl:if test="//curso:TC"><td class="perfil unidade"><span><xsl:if test="./curso:horasContacto/curso:TC"><xsl:attribute name="class">unidade celula</xsl:attribute><xsl:value-of select="./curso:horasContacto/curso:TC"/></xsl:if></span></td></xsl:if>
<xsl:if test="//curso:O"><td class="perfil unidade"><span><xsl:if test="./curso:horasContacto/curso:O"><xsl:attribute name="class">unidade celula</xsl:attribute><xsl:value-of select="./curso:horasContacto/curso:O"/></xsl:if></span></td></xsl:if>
<td class="perfil unidade ects"><span><xsl:if test="./curso:ECTS"><xsl:attribute name="class">unidade celula</xsl:attribute><xsl:value-of select="./curso:ECTS"/></xsl:if></span></td>
<td class="perfil unidade ficha" align="center">
<xsl:if test="@siges">
<a>
<xsl:attribute name="href">startLoadCourseUnitProgramSiges.do?unitCode=<xsl:value-of select="@siges"/>&courseCode=<xsl:value-of select="$COURSE_SIGES_CODE"/>&semestre=<xsl:value-of select="../../@id"/></xsl:attribute>
<img src="imgs/mime/pdf.gif"/>
</a>
</xsl:if>
</td>
</tr>
</xsl:template>
<xsl:template match="curso:unidade">
<tr>
<td class="unidadeNome">
<span>
<xsl:choose>
<xsl:when test="@siges">
<a>
<xsl:attribute name="href">startLoadCourseUnitSiges.do?unitCode=<xsl:value-of select="@siges"/>&courseCode=<xsl:value-of select="$COURSE_SIGES_CODE"/>&semestre=<xsl:value-of select="../@id"/></xsl:attribute>
<xsl:value-of select="./curso:nome"/>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="./curso:nome"/>
</xsl:otherwise>
</xsl:choose>
</span>
</td>
<td class="unidade"><span><xsl:value-of select="./curso:totalHoras"/></span></td>
<xsl:if test="//curso:T"><td class="unidade"><span><xsl:if test="./curso:horasContacto/curso:T"><xsl:attribute name="class">unidade celula</xsl:attribute><xsl:value-of select="./curso:horasContacto/curso:T"/></xsl:if></span></td></xsl:if>
<xsl:if test="//curso:TP"><td class="unidade"><span><xsl:if test="./curso:horasContacto/curso:TP"><xsl:attribute name="class">unidade celula</xsl:attribute><xsl:value-of select="./curso:horasContacto/curso:TP"/></xsl:if></span></td></xsl:if>
<xsl:if test="//curso:P"><td class="unidade"><span><xsl:if test="./curso:horasContacto/curso:P"><xsl:attribute name="class">unidade celula</xsl:attribute><xsl:value-of select="./curso:horasContacto/curso:P"/></xsl:if></span></td></xsl:if>
<xsl:if test="//curso:PL"><td class="unidade"><span><xsl:if test="./curso:horasContacto/curso:PL"><xsl:attribute name="class">unidade celula</xsl:attribute><xsl:value-of select="./curso:horasContacto/curso:PL"/></xsl:if></span></td></xsl:if>
<xsl:if test="//curso:PD"><td class="unidade"><span><xsl:if test="./curso:horasContacto/curso:PD"><xsl:attribute name="class">unidade celula</xsl:attribute><xsl:value-of select="./curso:horasContacto/curso:PD"/></xsl:if></span></td></xsl:if>
<xsl:if test="//curso:OT"><td class="unidade"><span><xsl:if test="./curso:horasContacto/curso:OT"><xsl:attribute name="class">unidade celula</xsl:attribute><xsl:value-of select="./curso:horasContacto/curso:OT"/></xsl:if></span></td></xsl:if>
<xsl:if test="//curso:E"><td class="unidade"><span><xsl:if test="./curso:horasContacto/curso:E"><xsl:attribute name="class">unidade celula</xsl:attribute><xsl:value-of select="./curso:horasContacto/curso:E"/></xsl:if></span></td></xsl:if>
<xsl:if test="//curso:S"><td class="unidade"><span><xsl:if test="./curso:horasContacto/curso:S"><xsl:attribute name="class">unidade celula</xsl:attribute><xsl:value-of select="./curso:horasContacto/curso:S"/></xsl:if></span></td></xsl:if>
<xsl:if test="//curso:TC"><td class="unidade"><span><xsl:if test="./curso:horasContacto/curso:TC"><xsl:attribute name="class">unidade celula</xsl:attribute><xsl:value-of select="./curso:horasContacto/curso:TC"/></xsl:if></span></td></xsl:if>
<xsl:if test="//curso:O"><td class="unidade"><span><xsl:if test="./curso:horasContacto/curso:O"><xsl:attribute name="class">unidade celula</xsl:attribute><xsl:value-of select="./curso:horasContacto/curso:O"/></xsl:if></span></td></xsl:if>
<td class="unidade ects"><span><xsl:if test="./curso:ECTS"><xsl:value-of select="./curso:ECTS"/></xsl:if></span></td>
<td class="unidade ficha" align="center">
<xsl:if test="@siges">
<a>
<xsl:attribute name="href">startLoadCourseUnitProgramSiges.do?unitCode=<xsl:value-of select="@siges"/>&courseCode=<xsl:value-of select="$COURSE_SIGES_CODE"/>&semestre=<xsl:value-of select="../@id"/></xsl:attribute>
<img src="imgs/mime/pdf.gif"/>
</a>
</xsl:if>
</td>
</tr>
</xsl:template>
</xsl:stylesheet>