xsl-list
[Top] [All Lists]

cascading evaluation of variables

2004-10-11 03:02:03
Hi all,
I have this following template rule within my stylesheet. I have a problem with a cascade evaluation of variable.

the template is:
<xsl:template match="object">
<xsl:variable name="select"><xsl:value-of select="@select"/></xsl:variable>

<xsl:variable name="path1"><xsl:value-of select="concat('document($sourcefile)/descendant-or-
self::',$select,'/parent::node()')"/>
</xsl:variable>

<xsl:variable name="essai"><xsl:value-of select="$path1"/>
</xsl:variable>

<xsl:value-of select="$path1"/>
<xsl:value-of select="$essai"/>
</xsl:template>

the results are:

<xsl:value-of select="$path1"/> return the string 'document($sourcefile)/descendant-or-self::files/record/parent::node()'. <xsl:value-of selec="$essai"/> return the same string instead of the nodes set resulting to its evaluation.

I expected that variable $essai was take like entry the result of evaluation of $path1, and return the results nodes set.

Could anyone know, please, what is wrong in my declaration?
I thank all of you in advance.

regards

Majirus

_________________________________________________________________
Hotmail : bientôt 250 Mo de stockage ! http://www.imagine-msn.com/hotmail/fr-fr/



<Prev in Thread] Current Thread [Next in Thread>