
Tengo problemas al pasar un xml a xhtml con el codigo XSL
Publicado por Jose Antonio (1 intervención) el 15/04/2014 17:42:09
Hola por mas que lo miro no entiendo porque este codigo no me permite salir todos los elementos seleccionados ya que solo me muestra la tabla de los encabezados, paso el codigo por si alguien sabe donde meto la pata
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?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>
Valora esta pregunta


0