[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Named template param - variable not found

Subject: Re: Named template param - variable not found
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Fri, 26 Oct 2007 23:01:44 -0400
Re:  Named template param - variable not found
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.