cclloyd9785 Posted January 25, 2013 Share Posted January 25, 2013 (edited) I was following the XML tutorial, and had an XML page with an XSL stylesheet attached. Neither of them had any errors according to my browser, but it's showing a blank page. When I opened it in chrome and inspected the blank page, the only thing it showed was "xsl-stylesheet" and nothing else.Edit: I actually tried opening it in IE10 and it worked... but not working in Chrome. /edit Below is the code for the XML and XSL sheets. <?xml version="1.0" encoding="ISO-8859-1"?><?xml-stylesheet type="text/xsl" href="style.xsl"?><collection> <game> <name>Halo 4</name> <genre>FPS</genre> <developer>343 Industries</developer> <release>4Q12</release> <system>Xbox 360</system> <esrb>M</esrb> </game> <game> <name>Gears of War 3</name> <genre>FPS</genre> <developer>Epic Games</developer> <release>3Q11</release> <system>Xbox 360</system> <esrb>M</esrb> </game></collection> <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/"> <html> <body> <h2>My Game Collection</h2> <table border="1"> <tr bgcolor="#9acd32"> <th>Game</th> <th>Genre</th> <th>Developer</th> <th>Release Date</th> <th>Platform</th> <th>ESRB Rating</th> </tr> <xsl:for-each select="collection/game"> <tr> <td><xsl:value-of select="name"/></td> <td><xsl:value-of select="genre"/></td> <td><xsl:value-of select="developer"/></td> <td><xsl:value-of select="release"/></td> <td><xsl:value-of select="system"/></td> <td><xsl:value-of select="esrb"/></td> </tr> </xsl:for-each> </table> </body> </html></xsl:template></xsl:stylesheet> Edited January 25, 2013 by cclloyd 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