
15/04/2014, 09:31
|
| | Fecha de Ingreso: abril-2014
Mensajes: 1
Antigüedad: 11 años Puntos: 0 | |
Tengo problemas al convertir un xml en xhtml con xslt Aqui esta el codigo que me da problemas algún alma caritativa que me diga que hago mal ya que los encabezados de la tabla y el titulo de la msima si sale.
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes" encoding="UTF-8"/>
<xsl:template match="/notas">
<html>
<head>
<tittle>TRANSFORMACION XSLT JOSE ANTONIO GOMEZ</tittle>
</head>
<body>
<h2 align="center">Listado de notas (Convocatoria de Junio)</h2>
<table border="1" align="center">
<tr bgcolor="#00ccff">
<th colspan="3">Alumnos</th>
<th colspan="3">Notas</th>
</tr>
<tr bgcolor="#0033ff">
<th>NOMBRE</th>
<th>APELLIDOS</th>
<th>Cuestionarios</th>
<th>Tareas</th>
<th>Examen</th>
<th>Final</th>
</tr>
<xsl:for-each select="notas/alumno">
<xsl:if test="./@convocatoria='Junio'">
<tr>
<td><xsl:value-of select="nombre"/></td>
<td><xsl:value-of select="apellidos"/></td>
<td bgcolor="ffff00"><xsl:value-of select="cuestionarios"/></td>
<td bgcolor="ffff00"><xsl:value-of select="tareas"/></td>
<td bgcolor="ffff00"><xsl:value-of select="examen"/></td>
<td bgcolor="ff6600"><xsl:choose>
<xsl:when test="final>=9">
Sobresaliente
</xsl:when>
<xsl:when test="final>=7">
Notable
</xsl:when>
<xsl:when test="final>=6">
Bien
</xsl:when>
<xsl:when test="final>=5">
Suficiente
</xsl:when>
<xsl:otherwise>
Insuficiente
</xsl:otherwise>
</xsl:choose></td>
</tr>
</xsl:if>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet> |