Subject: Re: [xsl] Node-sets using <xsl:with-param> From: Mir Farooq Ali <miali@xxxxxxxxx> Date: Thu, 22 Jan 2004 12:10:52 -0500 |
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
-Farooq. -- Mir Farooq Ali
Computer Science, Virginia Tech, Email: miali@xxxxxxxxx Web: http://purl.org/net/farooq -------------------------------------------- (c) 2004 Mir Farooq Ali All rights reserved --------------------------------------------
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Node-sets using <xsl:with, G. Ken Holman | Thread | Re: [xsl] Node-sets using <xsl:with, G. Ken Holman |
RE: [xsl] matching the first follow, Lars Huttar | Date | RE: [xsl] increment value, Andreas L. Delmelle |
Month |