Me gustaría corregir este código
Publicado por Miguel (1 intervención) el 01/05/2015 10:00:41
Hola muy buenas tengo la siguiente estructura de código y de 20 filas tan solo me sale la primera ponga como lo ponga, y la cosa es que tengo la misma estructura pero con diferentes etiquetas en otro xml y me va perfectamente, me gustaría a ver si me pudierais ayudar. Antes de que digáis nada el fallo no está en el XML.
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
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
<html>
<body>
<h2>Escaños</h2>
<table border="1">
<tr bgcolor="#DFDFDF">
<th>Partido</th>
<th>Logo</th>
<th>Escaños</th>
</tr>
<xsl:for-each select="//escrutinio_sitio">
<xsl:choose>
<xsl:when test="//electos >= 20">
<tr bgcolor="#01DF01">
<td><xsl:value-of select="//nombre"/></td>
<td></td>
<td><xsl:value-of select="//electos"/></td>
</tr>
</xsl:when>
<xsl:when test="(//electos < 20) and (//electos > 0)">
<tr bgcolor="#01DF01">
<td><xsl:value-of select="//nombre"/></td>
<td></td>
<td><xsl:value-of select="//electos"/></td>
</tr>
</xsl:when>
<xsl:otherwise>
<tr bgcolor="#01DF01">
<td><xsl:value-of select="//nombre"/></td>
<td></td>
<td><xsl:value-of select="//electos"/></td>
</tr>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Valora esta pregunta


0