Hi there,

I'm curious about how saxon handles a function call in a variable performance wise.
 
If I have something like:

   <xsl:variable name="price" select="fn:getPrice($matNr)"/>

   <td class="price">
<xsl:value-of select="$price"/>
   </td>

   <td class="cost">
<xsl:value-of select="qty * $price"/>
   </td>


I wonder if it actually makes any difference compared to not using the variable and just calling the function twice:

   <td class="price">
<xsl:value-of select="fn:getPrice($matNr)"/>
   </td>

   <td class="cost">
<xsl:value-of select="qty * fn:getPrice($matNr)"/>
   </td>


If the variable is just a reference I guess both times it would evaluate the function twice... is that correct?

Thanks,
Tobias