<xsl:variable name="selected-month">
<xsl:variable name="selected-month" select="java:clone($calendar)"/>
<xsl:if test="java:set($selected-month, $date-field-value, 1)"/>
<xsl:if test="java:add($selected-month, $month-field-value, $month-offset)"/>
<xsl:value-of select="$selected-month"/>
</xsl:variable>
So, while I manipulate the value of the internal variable, it is only used to temporarily define the final outcome. However, <xsl:value-of> is not doing the same thing that <xsl:variable select=""/> would do. My variable is not getting a Java object assigned. When I later try to reference it for example:
<xsl:value-of select="java:get($selected-month, $month-field-value)"/>
I get this error: org.apache.cocoon.ProcessingException: Failed to execute pipeline.: java.lang.RuntimeException: java.lang.NoSuchMethodException: For extension function, could not find method org.apache.xml.dtm.ref.DTMNodeIterator.get([ExpressionContext,] #NUMBER).
Any thoughts? Thanks, RRM
