Subject: Re: [xsl] Node-sets using <xsl:with-param> From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Thu, 22 Jan 2004 14:00:16 -0500 |
G. Ken Holman wrote: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/>.... This is my stylesheet
<xsl:apply-templates mode="modify" select="/TM/
TC[@name=$tc]/
TTM[@type=$ttm]/
UCM[@prefnum=$uc]/
UPS/part[@prefnum=$ups]/*">
<xsl:with-param name="id1" select="$id"/>
<xsl:with-param name="curnode" select="."/>
</xsl:apply-templates>
...
<xsl:template mode="modify" match="*">
<xsl:param name="id1"></xsl:param>
<xsl:param name="curnode"></xsl:param>
<xsl:variable name="idd" select="translate($id1,' ','_')"></xsl:variable>
<xsl:variable name="newid" select="concat($idd, position())"></xsl:variable>
<part class="{name()}" id="{$newid}">
<xsl:apply-templates mode="modify">
<xsl:with-param name="id1" select="$newid"></xsl:with-param>
</xsl:apply-templates>
<!--xsl:apply-templates mode="structure1" select="$curnode" /--> <!-----******* Error on this line here -->
...
Ken, could you please elaborate on what the built-in template rule is for the situation above?
-- 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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Node-sets using <xsl:with, Mir Farooq Ali | Thread | Re: [xsl] Node-sets using <xsl:with, Mir Farooq Ali |
RE: RE: RE: [xsl] Linear counting p, cknell | Date | RE: [xsl] increment value - philoso, Govil, Anoop (Contra |
Month |