I get this error message when I try to load my xml in Firefox and a blank page when I try to load in Safari and Google. Is there an error I am missing? My styling requirements:
- Year---bold
- Title---- dark blue font weight of 900
- Director—dark green, bold
- Actors --- blue if male, pink if female
- Type---- italic and underline
- Time---- dark red, bold, underline
XML:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="lab4_part2.xsl"?>
<streaming>
<movies>
<year>1985</year>
<title>The Breakfast Club</title>
<director>John Hughes</director>
<actors>
<male>Emilio Estevez</male>
<male>Paul Gleason</male>
<male>Anthony Micheal Hall</male>
<male>Judd Nelson</male>
<female>Molly Ringwald</female>
<female>Ally Sheedy</female>
</actors>
<type>Comedy, Drama</type>
<time>97</time>
</movies>
<movies>
<year>1994</year>
<title>Forrest Gump</title>
<director>Robert Zemeckis</director>
<actors>
<male>Tom Hanks</male>
<male>Mykelti Williamson</male>
<male>Gary Sinise</male>
<male>Haley Joel Osment</male>
<female>Sally Field</female>
<female>Robin Wright</female>
</actors>
<type>Comedy, Drama, Romance</type>
<time>142</time>
</movies>
</streaming>
XSLT:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<xsl:for-each select="streaming/movies">
<div>
<p><xsl:value-of select="year" style="font-weight:bold;"/></p>
<p><xsl:value-of select="title" style="color:DarkBlue; font-
weight:900;"/></p>
<p><xsl:value-of select="director" style="color:DarkGreen; font-
weight:bold;"/></p>
<p>Actors</p>
<ul>
<xsl:for-each select="streaming/movies/actors">
<xsl:if test="name() = 'male'">
<li><xsl:value-of select="male" style="color:blue;"/></li>
</xsl:if>
<xsl:if test="name() = 'female'">
<li><xsl:value-of select="male" style="color:pink;"/></li>
</xsl:if>
</xsl:for-each>
</ul>
<p><xsl:value-of select="type" style="text-decoration:underline;
font-style:italic;"/></p>
<p><xsl:value-of select="time" style="color:DarkRed; text-
decoration:underline; font-weight:bold;"/></p>
</div>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>