Tengo que crear un archivo xsl que vaya creando filas segun datos que recibe de un archivo xml. El problema esta en que alguna de las filas puede tener dos columnas en las que contenga varias filas.
El problema que tengo es que cuando esta el cursor del raton encima de una fila se marque entera (incluyendo si tiene una columna con varias filas)
Es dificil de explicar pero os pongo los archivos y lo entendereis enseguida. solo teneis que abrir el xml con un explorador. Os pongo tambien la hoja de estilos.
si alguien me da una solucion le amaré
gracias por adelantado.
el archivo xsl:
Código PHP:
<?xml version='1.0' encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output media-type="text/html" encoding="ISO-8859-1"/>
<xsl:template match="/">
<html>
<head>
<title>Estadística</title>
<link type="text/css" href="crm.css" media="screen" rel="stylesheet"/>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
</head>
<body style="margin-left=0;margin-top=0;margin-right=0;margin-width=0;">
<form method="post" action="" name="Relaciones">
<table width="590" class="table_list" style="table-layout:fixed">
<tbody id="registros">
<xsl:for-each select="reclamaciones/reclamacion">
<xsl:variable name="pos" select="position()"/>
<tr onMouseOver="this.className='celda_list_sel'" onClick="document.getElementById('prueba'+{position()}).checked=true;document.getElementById('prueba'+{position()}).click();">
<xsl:attribute name="class">celda_list_imp</xsl:attribute>
<xsl:attribute name="onMouseOut">this.className='celda_list_imp'</xsl:attribute>
<xsl:if test="position() mod 2 = 0">
<xsl:attribute name="class">celda_list_par</xsl:attribute>
<xsl:attribute name="onMouseOut">this.className='celda_list_par'</xsl:attribute>
</xsl:if>
<td style="width:10" align="center">
<xsl:attribute name="rowspan"><xsl:value-of select="count(motivos/codmtr)"/></xsl:attribute>
<input type="radio" style="width:9;height:9"
id="prueba{position()}" name="relacion" value="{idrel}" onClick="Llamar_Consulta(this.value, '{refrel}', '{numarchivo}')"/>
</td>
<td style="width:70" align="center" >
<xsl:attribute name="rowspan"><xsl:value-of select="count(motivos/codmtr)"/></xsl:attribute>
<xsl:value-of select="refrel"/>
</td>
<td style="width:160" align="center">
<xsl:attribute name="rowspan"><xsl:value-of select="count(motivos/codmtr)"/></xsl:attribute>
<xsl:value-of select="nompax"/>
</td>
<td style="width:80" align="center" >
<xsl:attribute name="rowspan"><xsl:value-of select="count(motivos/codmtr)"/></xsl:attribute>
<xsl:value-of select="datins"/>
</td>
<td style="width:60" align="center">
<xsl:value-of select="motivos/codmtr"/>
</td>
<td style="width:150">
<xsl:value-of select="motivos/descr"/>
</td>
<td style="width:65" align="center" >
<xsl:attribute name="rowspan"><xsl:value-of select="count(motivos/codmtr)"/></xsl:attribute>
<xsl:value-of select="escaneado"/>
</td>
<td style="width:0" align="center">
<xsl:attribute name="rowspan"><xsl:value-of select="count(motivos/codmtr)"/></xsl:attribute>
<xsl:value-of select="numArchivo"/>
</td>
</tr>
<xsl:for-each select="motivos/codmtr[not(position()=1)]">
<tr onMouseOver="this.className='celda_list_sel'" onClick="document.getElementById('prueba'+{$pos}).checked=true;document.getElementById('prueba'+{$pos}).click();">
<xsl:attribute name="class">celda_list_imp</xsl:attribute>
<xsl:attribute name="onMouseOut">this.className='celda_list_imp'</xsl:attribute>
<xsl:if test="$pos mod 2 = 0">
<xsl:attribute name="class">celda_list_par</xsl:attribute>
<xsl:attribute name="onMouseOut">this.className='celda_list_par'</xsl:attribute>
</xsl:if>
<td style="width:60" align="center">
<xsl:value-of select="text()"/>
</td>
<td style="width:150">
<xsl:value-of select="following::descr"/>
</td>
</tr>
</xsl:for-each>
</xsl:for-each>
</tbody>
</table>
</form>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
el archivo xml
Código PHP:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="Xml_Reclamacion_Rcp.list_relaciones_html.xsl" type="text/xsl"?>
<reclamaciones>
<reclamacion>
<refrel>ref002</refrel>
<datins>11/07/1990</datins>
<nompax>jose</nompax>
<motivos>
<codmtr>1</codmtr>
<descr>galletas</descr>
<codmtr>2</codmtr>
<descr>leche</descr>
<codmtr>3</codmtr>
<descr>bbbb</descr>
</motivos>
<escaneado>s</escaneado>
</reclamacion>
<reclamacion>
<refrel>ref002</refrel>
<datins>11/07/1990</datins>
<nompax>jose</nompax>
<motivos>
<codmtr>1</codmtr>
<descr>galletas</descr>
<codmtr>2.5</codmtr>
<descr>lfsaddf</descr>
<codmtr>3</codmtr>
<descr>aaaaaa</descr>
</motivos>
<escaneado>s</escaneado>
</reclamacion>
<reclamacion>
<refrel>ref002</refrel>
<datins>11/07/1990</datins>
<nompax>jose</nompax>
<motivos>
<codmtr>1</codmtr>
<descr>galletas</descr>
<codmtr>2.5</codmtr>
<descr>lfsaddf</descr>
<codmtr>3</codmtr>
<descr>aaaaaa</descr>
<codmtr>3</codmtr>
<descr>aaaaaa</descr>
</motivos>
<escaneado>s</escaneado>
</reclamacion>
<reclamacion>
<refrel>ref002</refrel>
<datins>11/07/1990</datins>
<nompax>jose</nompax>
<motivos>
<codmtr>1</codmtr>
<descr>galletas</descr>
<codmtr>2.5</codmtr>
<descr>lfsaddf</descr>
<codmtr>3</codmtr>
<descr>aaaaaa</descr>
<codmtr>2.5</codmtr>
<descr>lfsaddf</descr>
<codmtr>3</codmtr>
<descr>aaaaaa</descr>
</motivos>
<escaneado>s</escaneado>
</reclamacion>
</reclamaciones>