i have xml page (www.shiningpixel.co.uk/databaseconnect.php) uses xsl , css style it. currently, nothing shows , cannot see going wrong. ideas?
xsl page:
<?xml version="1.0" encoding="iso-8859-1"?> <!-- edited xmlspy速 --> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/xsl/transform"> <xsl:template match="/"> <html> <head> <link rel="stylesheet" type="text/css" href="xmlstyle.css"/> </head> <body> <h2>your traces</h2> <table border="1"> <tr bgcolor="#9acd32"> <th>first name</th> <th>last name</th> <th>username</th> </tr> <xsl:for-each select="users/person"> <tr> <td><xsl:value-of select="firstname"/></td> <td><xsl:value-of select="lastname"/></td> <td><xsl:value-of select="username"/></td> </tr> </xsl:for-each> </table> <table> <xsl:for-each select="users/person"> <tr><td><xsl:value-of select="firstname"/></td></tr> <tr><td colspan="9"><hr size="1" width="100%" /></td></tr> <tr><td><xsl:value-of select="username"/></td></tr> </table></br></br> </body> </html> </xsl:template> </xsl:stylesheet>
css page: /xmlstyle.css , located in same root folder xml , xslt file above.
body { background-image:url('bg.png'); } body { font-family: 'lucida grande', 'helvetica neue', helvetica, arial, sans-serif; padding: 100px; font-size: 13px; } table { background: #fff; margin: 0 auto; width: 600px; padding: 15px; text-align: center; /* border-radius */ -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; /* box-shadow */ -webkit-box-shadow: rgba(0,0,0,0.2) 0px 1px 3px; -moz-box-shadow: rgba(0,0,0,0.2) 0px 1px 3px; box-shadow: rgba(0,0,0,0.2) 0px 1px 3px; } hr { border:none; border-top:1px #cccccc solid; height: 1px; width: 80%; } <hr> }
well browser (or @ least firefox) tells there problem stylesheet:
xml parsing error: mismatched tag. expected: </xsl:for-each>. location: http://www.shiningpixel.co.uk/style.xsl line number 40, column 3:</table></br></br> --^
you have not closed second <xsl:for-each select="users/person">
@ all.
Comments
Post a Comment