[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Named template param - variable not found
I have previously had no troubles getting named templates to work
however I am struggling to get a fairly basic navigation menu to
work. I'm using TestXSLT and when I attempt to process the page using
Sablotron, Saxon or Xalan-J I get an error (along the lines of
variable "currentPage" not found). Libxslt will process it but the
result has a superfluous "<param name="currentPage">" in the body of
the html.
An extremely cut down version of the xsl file is included below. I have tried using a select attribute with the supplied parameter (select="'Accounts'") but the result is the same. I have also tried modifying the test in the <xsl:when> block but that hasn't worked either. Am I making a subtle mistake or am I completely off the rails? Regards, Matthew <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/ Transform"> <xsl:output method="html" indent="yes" /> <xsl:template match="/"> <html> <head><title>myFinances Accounts Page</title></head> <body> <xsl:call-template name="footer"> <xsl:with-param name="currentPage">Accounts</xsl:with-param> </xsl:call-template> </body> </html> </xsl:template> <xsl:template name="footer"> <param name="currentPage" /> <xsl:choose> <xsl:when test="not($currentPage='Start')"> <a href="index.html" class="navigation">Start Page</a> </xsl:when> <xsl:otherwise> Start Page </xsl:otherwise> </xsl:choose> </xsl:template> </xsl:stylesheet>
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|