Files
colegio-en-java/colegio_api/files/xslt/toHtmlReporteGeneral.xsl
2017-07-31 13:07:07 -04:00

161 lines
7.4 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
<html>
<style>
.separator {
height: 100px;
}
</style>
<body>
<h2>Reporte General Apoderado</h2>
<xsl:for-each select="map/entry">
<div class="general">
<table border="1px solid black" class="apoderado">
<tr bgcolor="#9acd32">
<th>Apoderado</th>
<th>Rut</th>
</tr>
<tr>
<td>
<xsl:value-of select="Apoderado/nombre"/>
</td>
<td>
<xsl:value-of select="Apoderado/rut"/>
</td>
</tr>
</table>
<h3>Notas</h3>
<xsl:for-each select="logica.reportes.ReporteApoderado/notas/entry">
<table border="1px solid black" class="estudiante">
<tr bgcolor="#9acd32">
<th>Estudiante</th>
<th>Rut</th>
</tr>
<tr>
<td>
<xsl:value-of select="Estudiante/nombre"/>
</td>
<td>
<xsl:value-of select="Estudiante/rut"/>
</td>
</tr>
</table>
<table border="1px solid black" class="notas">
<tr bgcolor="#9acd32">
<th>Asignatura</th>
<th>Nota</th>
</tr>
<xsl:for-each select="Nota-array/Nota">
<tr>
<td>
<xsl:value-of select="asignatura__id__fk/nombre"/>
</td>
<td>
<xsl:value-of select="valor"/>
</td>
</tr>
</xsl:for-each>
</table>
</xsl:for-each>
<h3>Planificaciones</h3>
<xsl:for-each select="logica.reportes.ReporteApoderado/planificaciones/entry">
<table border="1px solid black" class="estudiante">
<tr bgcolor="#9acd32">
<th>Estudiante</th>
<th>Rut</th>
</tr>
<tr>
<td>
<xsl:value-of select="Estudiante/nombre"/>
</td>
<td>
<xsl:value-of select="Estudiante/rut"/>
</td>
</tr>
</table>
<xsl:for-each select="map/entry">
<h5>
<xsl:value-of select="Asignatura/nombre"/>
</h5>
<table border="1px solid black" class="planificaciones">
<tr bgcolor="#9acd32">
<th>Tipo</th>
<th>Fecha</th>
</tr>
<xsl:for-each select="Actividad-array/Actividad">
<tr>
<td>
<xsl:value-of select="tipo"/>
</td>
<td>
<xsl:value-of select="fecha"/>
</td>
</tr>
</xsl:for-each>
</table>
</xsl:for-each>
</xsl:for-each>
<h3>Anotaciones</h3>
<xsl:for-each select="logica.reportes.ReporteApoderado/anotaciones/entry">
<table border="1px solid black" class="estudiante">
<tr bgcolor="#9acd32">
<th>Estudiante</th>
<th>Rut</th>
</tr>
<tr>
<td>
<xsl:value-of select="Estudiante/nombre"/>
</td>
<td>
<xsl:value-of select="Estudiante/rut"/>
</td>
</tr>
</table>
<table border="1px solid black" class="anotaciones">
<tr bgcolor="#9acd32">
<th>Profesor</th>
<th>Tipo</th>
<th>Descripcion</th>
</tr>
<xsl:for-each select="Anotacion-array/Anotacion">
<tr>
<td>
<xsl:value-of select="profesor__id__fk/nombre"/>
</td>
<td>
<xsl:choose>
<xsl:when test="positiva = 'true'">
Positiva
</xsl:when>
<xsl:otherwise>
Negativa
</xsl:otherwise>
</xsl:choose>
</td>
<td>
<xsl:value-of select="descripcion"/>
</td>
</tr>
</xsl:for-each>
</table>
</xsl:for-each>
</div>
<div class="separator">
</div>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>