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

Re: Node-sets using <xsl:with-param>

Subject: Re: Node-sets using <xsl:with-param>
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 22 Jan 2004 08:15:30 -0500
with param pass in node
At 2004-01-22 00:26 -0500, Mir Farooq Ali wrote:
I'm getting an error when trying to pass the current node into a template using <xsl:with-param name="current" select="current()"/> or <xsl:with-param name="current" select="."/>

The place where I'm trying to access it
<xsl:apply-templates mode="structure1" select="$current"/> is where I'm getting an error message using Saxon indicating that the select attribute is expecting node and what it's getting is xs:string.


What am I doing wrong here?

I think we need more code fragments to see ... nothing strikes me as incorrect in the two snippets you've given.


If you are using <xsl:with-param/> inside of <xsl:apply-templates/> (you don't say if you are using <xsl:call-template or not) make sure you don't have any built-in templates being triggered between the processing of the two templates. If so, the built-in template will not pass the node parameter, the template with the parameter declaration will get called by the built-in template with no parameters, the default value for an empty parameter declaration is string, and you will have an empty string passed for the <xsl:apply-templates/>.

But that is just a guess based on your evidence.

I hope this helps.

......................... Ken


-- Public courses: sign up for one or both soon to reserve your seat! Each week: Monday-Wednesday: XSLT/XPath; Thursday-Friday: XSL-FO Washington, DC: 2004-03-15 San Francisco, CA: 2004-03-22 Hong Kong, China: 2004-05-17 Bremen, Germany: 2004-05-24 World-wide on-site corporate, government & user group XML 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 Breast Cancer Awareness  http://www.CraneSoftwrights.com/s/bc


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



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.