No me escribe el codigo HTML
Publicado por Nadal (1 intervención) el 13/10/2010 13:41:02
Hola,
Tengo un template xsl tal que así:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="html" />
<xsl:template match="/">
<table width="100%">
<thead>
<tr>
<th style="text-align:right" class="tituloAzulCabeceraListado">
<b> Prueba 1 </b>
</th>
<th style="text-align:right" class="tituloAzulCabeceraListado">
<b> Prueba 2 </b>
</th>
<th style="text-align:right" class="tituloAzulCabeceraListado">
<b> Prueba 3 </b>
</th>
</tr>
</thead>
<tbody class="scrollContent" style="width:100%; height:146px;">
<xsl:for-each select="//tutorial">
<tr>
<td>
<xsl:value-of select="nombre" />
</td>
<td>
<xsl:value-of select="enlace" />
</td>
<td>
<xsl:value-of select="descripcion" />
</td>
</tr>
</xsl:for-each>
</tbody>
</table>
</xsl:template>
</xsl:stylesheet>
Y lo escribo de esta manera en un jsp:
<c:import var="xslt" url="/WEB-INF/xml/book.xsl" />
<x:transform xslt="${xslt}" >
<tutoriales>
<tutorial>
<nombre>JSP 2.0</nombre>
<enlace>jspel</enlace>
<descripcion>Nuevas caracteristicas de JSPs</descripcion>
</tutorial>
<tutorial>
<nombre>Struts</nombre>
<enlace>struts</enlace>
<descripcion>Configuración del entorno Structs</descripcion>
</tutorial>
</tutoriales>
</x:transform>
Me escribe los parametros de los nodos pasados en el jsp, pero no el código HTML escrito en el template. Alguien podria decirme por qué?
Gracias y salu2
Tengo un template xsl tal que así:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="html" />
<xsl:template match="/">
<table width="100%">
<thead>
<tr>
<th style="text-align:right" class="tituloAzulCabeceraListado">
<b> Prueba 1 </b>
</th>
<th style="text-align:right" class="tituloAzulCabeceraListado">
<b> Prueba 2 </b>
</th>
<th style="text-align:right" class="tituloAzulCabeceraListado">
<b> Prueba 3 </b>
</th>
</tr>
</thead>
<tbody class="scrollContent" style="width:100%; height:146px;">
<xsl:for-each select="//tutorial">
<tr>
<td>
<xsl:value-of select="nombre" />
</td>
<td>
<xsl:value-of select="enlace" />
</td>
<td>
<xsl:value-of select="descripcion" />
</td>
</tr>
</xsl:for-each>
</tbody>
</table>
</xsl:template>
</xsl:stylesheet>
Y lo escribo de esta manera en un jsp:
<c:import var="xslt" url="/WEB-INF/xml/book.xsl" />
<x:transform xslt="${xslt}" >
<tutoriales>
<tutorial>
<nombre>JSP 2.0</nombre>
<enlace>jspel</enlace>
<descripcion>Nuevas caracteristicas de JSPs</descripcion>
</tutorial>
<tutorial>
<nombre>Struts</nombre>
<enlace>struts</enlace>
<descripcion>Configuración del entorno Structs</descripcion>
</tutorial>
</tutoriales>
</x:transform>
Me escribe los parametros de los nodos pasados en el jsp, pero no el código HTML escrito en el template. Alguien podria decirme por qué?
Gracias y salu2
Valora esta pregunta


0