Crovax2000
Programmer
I keep getting this message from IE:Keyword xsl:stylesheet may not contain xsl:if.
Is there only certain places that xsl:if can be placed??
Thank you for you help, code listed below.
Crovax
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="<xsl:template match="/">
<html><head><title>Comedy Movies</title></head>
<body>
<xsl:for-each select="/">
<div styles="width:275px; margin-bottom:10px; border:5px double black; color:black; background-color:yellow;
test-align:center">
<xsl:apply-templates select="Movie"/>
<xsl:apply-templates select="ReleaseYear"/>
<xsl:apply-templates select="Genre"/>
</div>
</xsl:for-each>
</body>
</html>
</xsl:template>
<xsl:if test="IsItComedy = 1">
<xsl:template match="Movie">
<div style="fontfamily:Times, serif; fontsize:13pt; font-weight:bold">
<xsl:value-of select="."/>
</div>
</xsl:template>
<xsl:template match="Year">
<div style="fontfamily:Times, serif; fontsize:13pt">
<xsl:value-of select="."/>
</div>
</xsl:template>
<xsl:template match="Genre">
<div style="fontfamily:Times, serif; fontsize:13pt">
<xsl:value-of select="."/>
</div>
</xsl:template>
</xsl:if>
</xsl:stylesheet>
Is there only certain places that xsl:if can be placed??
Thank you for you help, code listed below.
Crovax
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="<xsl:template match="/">
<html><head><title>Comedy Movies</title></head>
<body>
<xsl:for-each select="/">
<div styles="width:275px; margin-bottom:10px; border:5px double black; color:black; background-color:yellow;
test-align:center">
<xsl:apply-templates select="Movie"/>
<xsl:apply-templates select="ReleaseYear"/>
<xsl:apply-templates select="Genre"/>
</div>
</xsl:for-each>
</body>
</html>
</xsl:template>
<xsl:if test="IsItComedy = 1">
<xsl:template match="Movie">
<div style="fontfamily:Times, serif; fontsize:13pt; font-weight:bold">
<xsl:value-of select="."/>
</div>
</xsl:template>
<xsl:template match="Year">
<div style="fontfamily:Times, serif; fontsize:13pt">
<xsl:value-of select="."/>
</div>
</xsl:template>
<xsl:template match="Genre">
<div style="fontfamily:Times, serif; fontsize:13pt">
<xsl:value-of select="."/>
</div>
</xsl:template>
</xsl:if>
</xsl:stylesheet>