Re: [xsl] can a value of a parameter depends on a other value

Subject: Re: [xsl] can a value of a parameter depends on a other value
From: Susanne Wunsch <xsl@xxxxxxxxxxxxxxxxx>
Date: Wed, 30 Nov 2011 14:26:45 +0100
Wolfgang Laun <wolfgang.laun@xxxxxxxxx> writes:

> A parameter is only applicable to a named template, and
> <xsl:with-param> is used with the call, not the definition. 

No. You can also use <xsl:with-param> within <xsl:apply-templates>, e.g.

  <xsl:apply-templates select="*">
      <xsl:with-param name="foo" select="'bar'" as="xs:string"/>
  </xsl:apply-templates>

But that is needed very seldom, I think. It's more often used in named
templates, e.g.

  <xsl:call-template name="baz">
      <xsl:with-param name="foo" select="'bar'" as="xs:string"/>
  </xsl:call-template>

> You aren't using the "parameter" anyway, so omit it.

+1

Kind regards...
Susanne 

Current Thread