diff --git a/src/apply/ref.xsl b/src/apply/ref.xsl index c1a7be4..b1a2881 100644 --- a/src/apply/ref.xsl +++ b/src/apply/ref.xsl @@ -31,15 +31,25 @@ The descriptor @var{desc} has the following format: @example - + @end example where the @var{target} node shares the same QName as the function to - be applied, and @var{@arity} is its arity. The @var{f:ref} node may - be decorated with additional attributes depending on its context or + be applied, and @var{@arity} is its arity. @var{@length} caches the + number of items (in a sequence) that make up the reference; it can + be retrieved with @code{f:length}. The @var{f:ref} node may be + decorated with additional attributes depending on its context or constructor. + + Each of these functions respects data adjacent to the given + reference (which is at the head of the sequence). For example, + @code{f:set-args} will set the arguments of the dynamic function + reference represented by the head of the provided sequence, but will + leave all data following the reference untouched; this allows + references to be processed in a streaming manner without cutting the + sequence up before operating on the reference. --> - + @@ -160,7 +170,12 @@ - + + + + @@ -200,10 +215,17 @@ + + - + + @@ -234,4 +256,28 @@ ($args, f:args( $fnref )) )" /> + + + + + + + + + + diff --git a/test/apply/partial.xspec b/test/apply/partial.xspec index aca7643..605b7ea 100644 --- a/test/apply/partial.xspec +++ b/test/apply/partial.xspec @@ -27,6 +27,11 @@ xmlns:foo="http://www.lovullo.com/_junk" stylesheet="partial-test.xsl"> + + + @@ -89,11 +94,10 @@ test="$x:result[ 1 ] and $x:result[ 1 ] = foo:ternary-applied" /> - + test="$x:result[ 2 ] is $args/foo:a + and $x:result[ 3 ] is $args/foo:b + and $x:result[ 4 ] is $args/foo:c" /> @@ -144,9 +148,9 @@ arguments to a target"> - - - + @@ -160,9 +164,9 @@ - - - + @@ -178,9 +182,9 @@ - - - + @@ -198,9 +202,9 @@ - - - + - - - + - - - + - - - + - - - + + + + @@ -102,6 +109,19 @@ + + + + + + + + + @@ -223,14 +243,30 @@ + + + + + + + + + + + - - + + @@ -242,6 +278,20 @@ + + + + + + + + + + + + @@ -296,6 +350,10 @@ + + @@ -313,6 +371,10 @@ + + @@ -330,6 +392,10 @@ + + @@ -347,6 +413,36 @@ + + + + + + + + + + + + + + + + + + + + @@ -396,6 +492,23 @@ + + + + + + + + + + + @@ -419,6 +532,10 @@ + + @@ -448,6 +565,10 @@ + + @@ -470,6 +591,43 @@ + + + + + + + + + + + + + + + + + + + + + + @@ -494,6 +652,10 @@ + + @@ -523,6 +685,10 @@ + + @@ -545,6 +711,43 @@ + + + + + + + + + + + + + + + + + + + + + +