I need to know if the variable $transformed_date will be evaluated each time, or is this variable as good as a variable affection (like in C, Java, etc.). I want to make sure I’m not reevaluating the same thing over and over.
<xsl:variable name="transformed_date" select="adjust-dateTime-to-timezone(xs:dateTime(concat(substring ($original_date, 1, 4),'-',substring ($original_date, 5, 2),'-',substring ($original_date, 7, 2),'T',substring ($original_date, 9, 2),':',substring ($original_date, 11, 2),':',substring ($original_date, 13, 2),'-00:00')), xs:dayTimeDuration('-PT5H'))"/>
<xsl:choose>
<xsl:when test="substring (xs:string($transformed_date), 6, 2) = '01'">
<fo:inline>
Jan.
</fo:inline>
</xsl:when>
<xsl:when test="substring (xs:string($transformed_date), 6, 2) = '02'">
<fo:inline>
Feb.
</fo:inline>
</xsl:when>
...
Variables in xslt can be set only once. Once set you cannot change them.