xsl:param namespace error (may not be used in namespace)

IvIr.VVack.0ff

New Member
I don't understand why the xsl:param is giving me an error of 'Keyword xsl:param may not be used in namespace http://www.w3.org/TR/WD-xsl.' in the following xsl code with the style sheet declaration.\[code\]<?xml version="1.0"?><xsl:stylesheet xmlns:xsl="uri:xsl">\[/code\]Given the xml\[code\]<?xml version="1.0" encoding="ISO-8859-1"?><catalog> <cd n="a"> <title>Empire Burlesque</title> <artist>Bob Dylan</artist> <country>USA</country> <company>Columbia</company> <price>10.90</price> <year>1985</year> </cd></catalog>\[/code\]and the xsl code\[code\]<?xml version="1.0"?><xsl:stylesheet xmlns:xsl="uri:xsl"><xsl:param name="test" select="'a'"/><xsl:template match="/"> <html> <body> <h2>My CD Collection</h2> <table border="1"> <tr bgcolor="#9acd32"> <th>Title</th> <th>Artist</th> </tr> <xsl:for-each select="catalog/cd"><xsl:choose> <xsl:when match=".[@n = $test]"> <tr> <td><xsl:value-of select="title" /></td> <td><xsl:value-of select="artist" /></td> </tr> </xsl:when> <xsl:otherwise> </xsl:otherwise></xsl:choose> </xsl:for-each> </table> </body> </html></xsl:template></xsl:stylesheet>\[/code\]I can't change the Style Sheet Declaration. Looking over the w3c documentation I'm allowed to declare param as a child of stylesheet and it doesn't need to be in a template.
 
Back
Top