[xsl] xsl:key in a function?

Subject: [xsl] xsl:key in a function?
From: ihe onwuka <ihe.onwuka@xxxxxxxxxxxxxx>
Date: Mon, 5 Mar 2012 20:12:06 +0000
My client is using a tool to generate all transforms.

We have an external file lookup which I am told is doing i/o every
time it is invoked because of the way the code is generated.

Well I know the solution - keys, read the file once and stick it in a
variable, however this is not an option because they don't want to let
me tweak the generated code.

The tool does allow custom functions to be written.

My feeling is that that won't solve this problem and I'd like to confirm this.

My concern is that every call to the custom function to do the look up
would still entail I/O (unless they let me tweak the code and create a
variable for the document node. Worse it might result in the key index
being rebuilt on every invocation, since the xsl:key command would
have to be in the custom function. As a matter of fact is it even even
possible to have xsl:key in a custom function?

Current Thread