Firefox mi da problemi nella visualizzazione del mio books.xml
Esce infatti il messaggio in figura.
xml
xsltcodice:<?xml version="1.0" encoding="ISO-8859-1"?> <?xml-stylesheet type="text/xsl" href="books.xslt"?> <books> <book category="reference"> <author>Nigel Rees</author> <title>Sayings of the Century</title> <price>8.95</price> </book> <book category="fiction"> <author>Evelyn Waugh</author> <title>Sword of Honour</title> <price>12.99</price> </book> <book category="fiction"> <author>Herman Melville</author> <title>Moby Dick</title> <price>8.99</price> </book> <book category="fiction"> <author>J. R. R. Tolkien</author> <title>The Lord of the Rings</title> <price>22.99</price> </book> </books>
Ma se al posto di method="xhtml" ci metto method="html", tutto magicamente funziona.codice:<?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml"> <xsl:output method="xhtml" 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="books"> <html xmlns="http://www.w3.org/1999/xhtml"> <body> <h1>A list of books</h1> <table width="640"> <xsl:apply-templates/> </table> </body> </html> </xsl:template> <xsl:template match="book"> <tr> <td> <xsl:number/> </td> <xsl:apply-templates/> </tr> </xsl:template> <xsl:template match="author | title | price"> <td> <xsl:value-of select="."/> </td> </xsl:template> </xsl:stylesheet>
Su IE funziona sia con html che xhtml.
Qualcuno mi sa dare una risposta?
Grazie.

Rispondi quotando