Skip to content

Commit 2281c66

Browse files
committed
[fix] remove variadic flag from functions
response:stream-binary and util:get-fragment-between are both non-variadic. fn:namespace-uri were flagged as non-variadic, which is the default. Note: there are variadic functions in the range module. Removing the flag results in failing tests, so it seems they really need to be variadic.
1 parent 04bf633 commit 2281c66

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

exist-core/src/main/java/org/exist/xquery/functions/fn/FunNamespaceURI.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,16 @@ public class FunNamespaceURI extends Function {
7171
new QName("namespace-uri", Function.BUILTIN_FUNCTION_NS),
7272
FUNCTION_DESCRIPTION_0_PARAM + FUNCTION_DESCRIPTION_COMMON,
7373
new SequenceType[0],
74-
new FunctionReturnSequenceType(Type.ANY_URI, Cardinality.EXACTLY_ONE, "the namespace URI"),
75-
false),
74+
new FunctionReturnSequenceType(Type.ANY_URI, Cardinality.EXACTLY_ONE, "the namespace URI")
75+
),
7676
new FunctionSignature(
7777
new QName("namespace-uri", Function.BUILTIN_FUNCTION_NS),
7878
FUNCTION_DESCRIPTION_1_PARAM + FUNCTION_DESCRIPTION_COMMON,
7979
new SequenceType[] {
8080
new FunctionParameterSequenceType("arg", Type.NODE, Cardinality.ZERO_OR_ONE, "The input node")
8181
},
82-
new FunctionReturnSequenceType(Type.ANY_URI, Cardinality.EXACTLY_ONE, "the namespace URI"),
83-
false)
82+
new FunctionReturnSequenceType(Type.ANY_URI, Cardinality.EXACTLY_ONE, "the namespace URI")
83+
)
8484
};
8585

8686
public FunNamespaceURI(final XQueryContext context, final FunctionSignature signature) {

exist-core/src/main/java/org/exist/xquery/functions/response/StreamBinary.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ public class StreamBinary extends StrictResponseFunction {
5252
+ "Note: the servlet output stream will be closed afterwards and mime-type settings in the prolog "
5353
+ "will not be passed.",
5454
new SequenceType[]{BINARY_DATA_PARAM, CONTENT_TYPE_PARAM, FILENAME_PARAM},
55-
new SequenceType(Type.EMPTY, Cardinality.EMPTY_SEQUENCE),
56-
true);
55+
new SequenceType(Type.EMPTY, Cardinality.EMPTY_SEQUENCE)
56+
);
5757

5858
public StreamBinary(final XQueryContext context) {
5959
super(context, signature);

exist-core/src/main/java/org/exist/xquery/functions/util/GetFragmentBetween.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ public class GetFragmentBetween extends BasicFunction {
8989
new FunctionParameterSequenceType("make-fragment", Type.BOOLEAN, Cardinality.ZERO_OR_ONE, "The flag make a fragment."),
9090
new FunctionParameterSequenceType("display-root-namespace", Type.BOOLEAN, Cardinality.ZERO_OR_ONE, "Display the namespace of the root node of the fragment.")
9191
},
92-
new FunctionReturnSequenceType(Type.STRING, Cardinality.EXACTLY_ONE, "the string containing the fragment between the two node/milestone elements."), true);
92+
new FunctionReturnSequenceType(Type.STRING, Cardinality.EXACTLY_ONE, "the string containing the fragment between the two node/milestone elements.")
93+
);
9394

9495
public GetFragmentBetween(final XQueryContext context) {
9596
super(context, signature);

0 commit comments

Comments
 (0)