ho un file xml, nel quale all' interno è contenuta una tabella:
voglio visualizzare tale file utilizzando un xls, ma non riesco a vedere correttamente i dati contenuti all' interno di <table>:codice:<?xml version="1.0" encoding="iso-8859-1"?> <?xml-stylesheet type="text/xsl" href="style.xsl"?> <elemento> <titolo>titolo</titolo> <corpo> <table> <tr> <td>primo</td> <td>secondo</td> </tr> </table> </corpo> </elemento>
dove sto sbagliando?codice:<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml"> <xsl:output method="html" indent="yes" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" /> <xsl:template match="/"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" title="main" href="screen.css" type="text/css" /> </head> <body> <xsl:for-each select="//elemento"> <h1><xsl:value-of select="titolo" /></h1> <xsl:for-each select="//table"> <table> <xsl:for-each select="//tr"> <tr> <xsl:for-each select="//td"> <xsl:value-of select="//td" /> </xsl:for-each> </tr> </xsl:for-each> </table> </xsl:for-each> </xsl:for-each> </body> </html> </xsl:template> </xsl:stylesheet>


Rispondi quotando
