[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
At 2007-10-27 11:33 +1000, Matthew Lindfield Seager wrote:
That's the clue to tell you what's up ... XSLT instructions never show up in the result tree.
Don't kick yourself, but all you've done is forgotten the "xsl:" prefix for the param.
Therefore, as you have it now it is a literal result element and doesn't exist as an instruction, the variable reference is not in scope, and the literal result element shows up in your HTML.
I hope this helps.
. . . . . . . . . . . Ken
Re: [xsl] Named template param - variable not found
Subject: Re: [xsl] Named template param - variable not found From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Fri, 26 Oct 2007 23:01:44 -0400 |
At 2007-10-27 11:33 +1000, Matthew Lindfield Seager wrote:
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.
That's the clue to tell you what's up ... XSLT instructions never show up in the result tree.
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?
Don't kick yourself, but all you've done is forgotten the "xsl:" prefix for the param.
Therefore, as you have it now it is a literal result element and doesn't exist as an instruction, the variable reference is not in scope, and the literal result element shows up in your HTML.
I hope this helps.
. . . . . . . . . . . Ken
-- Comprehensive in-depth XSLT2/XSL-FO1.1 classes: Austin TX,Jan-2008 World-wide corporate, govt. & user group XML, XSL and UBL training RSS feeds: publicly-available developer resources and training G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Cancer Awareness Jul'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Named template param - variab, Matthew Lindfield Se | Thread | RE: [xsl] Named template param - va, Michael Kay |
[xsl] Named template param - variab, Matthew Lindfield Se | Date | RE: [xsl] Named template param - va, Michael Kay |
Month |