dsci2000 Posted December 3, 2006 Share Posted December 3, 2006 Hi, I have a problem with my site. I have to show the content of an xml file using an xsl but when I run it appear a white form. The xml and xsl text is bellow. Is there anyone that can help me to solve the problem?XML<?xml version="1.0" encoding="iso-8859-1"?><?xml-stylesheet type="text/xsl" href="vedinews.xsl"?><listanews> <news> <titolo>Barcolana 2006</titolo> <data>20061031</data> <describreve>Alfa Romeo si aggiudica l'edizione 2006</describreve> <descrizione>Anche quest'anno ad aggiudicarsi il titolo della Regata in flottiglia ormai più ambita d'Italia e non ha messo in campo la famigerata Bora dello scorso anno.</descrizione> <ref>EsitoBarcolana2006.xml</ref> </news> <news> <titolo>Barcolana 2006</titolo> <data>20061015</data> <describreve>Domenica prossima l'edizione 2006 della più famosa regata in flottiglia italiana</describreve> <descrizione>Si svolgerà la prossima settimana, domenica 8 ottobre, a Trieste, l'edizione 2006 della Barcolana, </descrizione> <ref>Barcolana2006.xml</ref> </news></listanews>XSL<?xml version="1.0" encoding="iso-8859-1"?><xsl:stylesheet version="1.0" xmlns:xsl="http://wwww.w3.org/1999/XSL/trasform"><xsl:template match="/"><html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></meta><title>Io Velista - Il sito completo per chi naviga a vela</title><link href="dsstyle.css" rel="stylesheet" type="text/css"></link></head><body>......... <table> <tr> <td width="60" valign="top"> </td> <td> <table> <tr><td> <table width="500" id="tabnews" border="0"> <xsl:for-each select="listanews/news"> <tr> <td width="450" background="logos\Sf_TitoloNews.png" class="titolonews"> <a><xsl:value-of select="titolo"/></a> </td> </tr> <tr> <td class="descrinews"><a><xsl:value-of select="describreve"/></a></td> </tr> </xsl:for-each> </table> </td></tr> </table> </td> </tr> </table> </td> </tr> <tr height="400"><td></td></tr></table></body></html> </xsl:template></xsl:stylesheet>thanks Link to comment Share on other sites More sharing options...
boen_robot Posted December 3, 2006 Share Posted December 3, 2006 Well, your namespace declaration is slightly incorrect. Replace the second line of the XSLT with this: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> Also the lines </td></tr><tr height="400"><td></td></tr></table> were creating an error, but I guess that's just from the partial copying. Link to comment Share on other sites More sharing options...
dsci2000 Posted December 4, 2006 Author Share Posted December 4, 2006 Well, your namespace declaration is slightly incorrect. Replace the second line of the XSLT with this:<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> Also the lines </td></tr><tr height="400"><td></td></tr></table> were creating an error, but I guess that's just from the partial copying. Thanks for suggest. Now I'll try to modify the code. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now