[xsl] How to make a xsl:function that returns the function()

Subject: [xsl] How to make a xsl:function that returns the function()
From: Toshihiko Makita <tmakita@xxxxxxxxxxxxx>
Date: Sun, 20 Jan 2013 00:16:35 +0900
Hi List,

I'm very interested in XSLT 3.0 and have a question about the function
that returns the function as its return value.
Is it possible to make a such xsl:function?
I tested using the following code in oXygen 14.1 with Saxon

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="3.0"

<xsl:template match="root">
<xsl:variable name="slectFunc" as="function(*)"
<xsl:sequence select="$slectFunc(.)"/>

<xsl:function name="ahf:funcGetChildElementByName" as="function(*)">
<xsl:param name="prmElemName" as="xs:string"/>
<xsl:sequence select="function($a as element()) as element()*


However Saxon returns following error.

System ID: D:\My Documents\Proj\XSLT-TEST\20130113-func\test.xsl
Main validation file: D:\My Documents\Proj\XSLT-TEST\20130113-func\test.xsl
Engine name: Saxon-EE
Severity: error
Description: 0

Is there any workarounds?


Toshihiko Makita

Current Thread