[Home] [By Thread] [By Date] [Recent Entries]
On 05/03/2012 20:12, ihe onwuka wrote:
As a matter of fact is it even even possible to have xsl:key in a custom function?
In the former case, you can use a key, but as in templates they key() function is used in the function or template, but xsl:key is a top level declaration that is always a child of xsl:stylesheet. You also need recall at the top level of a function body there is no current node, so no current document, so you need to pass a node in as the third argument of key() or use xsl:for-each or a similar construct within the function body so that there is a current document at the point you call key(). If you mean that you want to write an extension function, then that's not xslt so I'm not sure what using xsl:key would mean at all?
|

Cart



