Subject: re: [xls] run-time variable name generation (e.g. "double de-referencing" {$($name)} )
From: Florent Georges <lists@xxxxxxxxxxxx>
Date: Tue, 12 May 2009 09:47:58 +0000 (GMT)
|
Vladimir Nesterovsky wrote:
Hi,
> <xsl:variable name="A" select="100"/>
> <xsl:variable name="B" select="BBB"/>
> <xsl:template mode="t:get-var" match="A">
> <xsl:sequence select="$A"/>
> </xsl:template>
> <xsl:template mode="t:get-var" match="B">
> <xsl:sequence select="$A"/>
> </xsl:template>
I guess you mean select="$B" ;-)
> <xsl:variable name="VAR" as="element()">
> <xsl:element name="{$var}"/>
> </xsl:variable/>
> <xsl:variable name="value" as="item()">
> <xsl:apply-templates mode="t:get-var" select="$var"/>
> </xsl:variable>
Yes. Actually, that's the idea of using first-class function
objects, as already noted by someone else (FCF as defined in
FXSL, at least.)
Regards,
--
Florent Georges
http://www.fgeorges.org/
|