saxonica.com

saxon:memo-function

This attribute may be set on the xsl:function 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 saxon:assign, or an extension function with side-effects). Don't use it if the function accesses context information such as the context node or position() or last(). 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).

Memo functions are not available in Saxon-HE. When running under Saxon-HE, this attribute is ignored with a warning.

Next