You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Pradeep Sinha <pr...@intertechsys.com> on 2001/01/01 02:41:47 UTC

Evaluation on demand ...

The XSL spec states that order of appearance of elements does not matter in
evaluating results.

In the following example, I was therefore expecting that evaluation of
expression $v2 (in the body of the template) would translate into automatic
evaluation of v1 since v2 uses value of v1. But this does not work. Is this
expected ?


<xsl:variable name="v1" select="'23'" />
<xsl:variable name="v2" select="$v1" />
<xsl:template match="/">
  <var2>
     <xsl:value-of select="$v2" />
  </var2>
</xsl:template>


What I need is to declare a bunch of variable that potentially use each
others values, but these values are computed only on demand depending on use
by a template. Is there any way to do this ?


Thanks