In lazy evaluation, as implemented in Xalan-J, with this example what
will the value of month be? My observation is that the <xsl:choose>
actions definately cause the Java add() method to be called
immediately. This is what I want. Now, when I reference $month later
on, I get the values of $selected-calendar *prior* to the <xsl:choose>
actions. This is exactly what I want, but is this the way that lazy
evaluation should work? You see, by the time I reference the value of
$month, the underlying object has changed values to a previous month.
Prior to the <xsl:choose> actions I never evaluate the value of $month.
I would expect that lazy evaluation would give me the current values of
$selected-calendar and not the values from before <xsl:choose>. To
recap, it is behaving the way I want it to, but can I rely on that
behaviour under the rules of lazy evaluation? And, as always, I
appreciate your help with this :)
<xsl:variable name="selected-calendar" select="java:clone($calendar)"/>
<xsl:variable name="first-day-of-week"
select="java:get($selected-calendar, $day-of-week-field-value)"/>
<xsl:variable name="month" select="java:get($selected-calendar,
$month-field-value)"/>
<xsl:variable name="year" select="java:get($selected-calendar,
$year-field-value)"/>
<xsl:choose>
<xsl:when test="$first-day-of-week = 1">
<xsl:if test="java:add($selected-calendar, $date-field-value,
-8)"/>
</xsl:when>
<xsl:otherwise>
<xsl:if test="java:add($selected-calendar, $date-field-value,
(-1 * $first-day-of-week))"/>
</xsl:otherwise>
</xsl:choose>
- Xalan Java variable not assigned to Java object Richard R. McKinley
- Re: Xalan Java variable not assigned to Jav... Santiago Pericas-Geertsen
- Re: Xalan Java variable not assigned to... Richard R. McKinley
- Re: Xalan Java variable not assigne... Santiago Pericas-Geertsen
- Re: Xalan Java variable not ass... Joseph Kesselman
- Re: Xalan Java variable no... Richard R. McKinley
- Re: Xalan Java variable not assigne... Joseph Kesselman
- RE: Xalan Java variable not assigned to Jav... Andrew Welch
