<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet href="../../make-menu.xsl" type="text/xsl"?><html>
   <head>
      <this-is section="extensions" page="attributes" subpage="memo-function"/>
      <!--
           Generated at 2010-10-29T18:20:48.427+01:00--><title>Saxonica: XSLT and XQuery Processing: saxon:memo-function</title>
      <meta name="coverage" content="Worldwide"/>
      <meta name="copyright" content="Copyright Saxonica Ltd"/>
      <meta name="title"
            content="Saxonica: XSLT and XQuery Processing: saxon:memo-function"/>
      <meta name="robots" content="noindex,nofollow"/>
      <link rel="stylesheet" href="../../saxondocs.css" type="text/css"/>
   </head>
   <body class="main">
      <h1>saxon:memo-function</h1>
      <p>This attribute may be set on the <code>xsl:function</code> element. The permitted values
are "yes" and "no". Specifying "yes" indicates that Saxon should remember the
results of calling the function in a cache, and if the function is called again
with the same arguments, the result is retrieved from the cache rather than being
recalculated. Don't use this if the function has side-effects (for example, if
it calls <code>saxon:assign</code>, or an extension function with side-effects).
Don't use it if the function accesses context information such as the context node
or <code>position()</code> or <code>last()</code>. And be careful if the function constructs and returns a
temporary tree: the effect will be that the function returns the same tree each
time, rather than a copy of the tree (this difference will only show up if you
compare the identity of nodes in the two trees).</p>
      <p><i>Memo functions are not available in Saxon-HE. When running under Saxon-HE, this attribute
is ignored with a warning.</i></p>
      <table width="100%">
         <tr>
            <td>
               <p align="right"><a class="nav" href="read-once.xml">Next</a></p>
            </td>
         </tr>
      </table>
   </body>
</html>