diff --git a/src/apply/partial.xsl b/src/apply/partial.xsl
index 98700be..e078163 100644
--- a/src/apply/partial.xsl
+++ b/src/apply/partial.xsl
@@ -55,57 +55,32 @@
-
-
-
-
-
-
-
-
-
-
-
+ select="f:arity( $fnref )" />
-
-
-
-
-
-
-
+ select="$fnref">
+
+
-
-
+
-
-
-
-
-
-
-
+
@@ -149,24 +124,18 @@
match="f:ref"
priority="1">
-
-
+
-
-
@@ -183,14 +152,16 @@
are supported}. This should be enough.
-->
-
-
+
-
+
+
-
+
diff --git a/test/apply/partial-test.xsl b/test/apply/partial-test.xsl
index 99dfadd..bdb0422 100644
--- a/test/apply/partial-test.xsl
+++ b/test/apply/partial-test.xsl
@@ -41,8 +41,10 @@
-
-
+
+
+
diff --git a/test/apply/partial.xspec b/test/apply/partial.xspec
index 33e3743..aca7643 100644
--- a/test/apply/partial.xspec
+++ b/test/apply/partial.xspec
@@ -52,8 +52,7 @@
+ test="f:QName( $x:result) = f:QName( $fnref )" />
@@ -68,14 +67,12 @@
+ test="f:QName( $fnref ) = f:QName( $x:result )" />
-
+
+ test="$rargs[ 1 ] is $args/foo:a
+ and $rargs[ 2 ] is $args/foo:b" />
@@ -92,10 +89,11 @@
test="$x:result[ 1 ]
and $x:result[ 1 ] = foo:ternary-applied" />
+
+ test="$rargs[ 1 ] is $args/foo:a
+ and $rargs[ 2 ] is $args/foo:b
+ and $rargs[ 3 ] is $args/foo:c" />
@@ -107,18 +105,17 @@
-
+
+ test="count( f:args( $x:result ) ) = 2" />
+
+ test="$rargs[ 1 ] is $args/foo:a
+ and $rargs[ 2 ] is $args/foo:b" />
@@ -193,9 +190,9 @@
test="$x:result[ 1 ] = foo:applied[ @n = 3 ]" />
+ test="$x:result[ 2 ] = $args/foo:a
+ and $x:result[ 3 ] = $args/foo:b
+ and $x:result[ 4 ] = $args/foo:c" />
@@ -442,8 +439,7 @@
-
-
+ and $x:result[ 3 ] is $args/foo:c
+ and $x:result[ 4 ] is $args/foo:d" />