@@ -73,8 +73,8 @@ public class MapFunction extends BasicFunction {
73
73
"Searches the supplied input sequence and any contained maps and arrays for a map entry with the supplied key, " +
74
74
"and returns the corresponding values." ,
75
75
returns (Type .ARRAY , "An array containing the found values with the input key" ),
76
- new FunctionParameterSequenceType ("input" , Type .ITEM , Cardinality . ZERO_OR_MORE , "The sequence of maps to search" ),
77
- new FunctionParameterSequenceType ("key" , Type .ATOMIC , Cardinality . EXACTLY_ONE , "The key to match" )
76
+ optManyParam ("input" , Type .ITEM , "The sequence of maps to search" ),
77
+ param ("key" , Type .ATOMIC , "The key to match" )
78
78
);
79
79
80
80
public final static FunctionSignature FNS_SIZE = new FunctionSignature (
@@ -319,9 +319,9 @@ private Sequence forEach(final Sequence[] args) throws XPathException {
319
319
* @param key the key to match
320
320
* @param sequence the sequence to search within
321
321
*/
322
- static private void findRec (final ArrayType result , final AtomicValue key , final Sequence sequence ) {
322
+ private static void findRec (final ArrayType result , final AtomicValue key , final Sequence sequence ) {
323
323
for (int i = 0 ; i < sequence .getItemCount (); i ++) {
324
- MapFunction . findRec (result , key , sequence .itemAt (i ));
324
+ findRec (result , key , sequence .itemAt (i ));
325
325
}
326
326
}
327
327
@@ -335,11 +335,11 @@ static private void findRec(final ArrayType result, final AtomicValue key, final
335
335
* @param key the key to match
336
336
* @param item the item to search within
337
337
*/
338
- static private void findRec (final ArrayType result , final AtomicValue key , final Item item ) {
338
+ private static void findRec (final ArrayType result , final AtomicValue key , final Item item ) {
339
339
if (Type .subTypeOf (item .getType (), Type .ARRAY )) {
340
340
final ArrayType array = (ArrayType ) item ;
341
341
for (final Sequence sequence : array .toArray ()) {
342
- MapFunction . findRec (result , key , sequence );
342
+ findRec (result , key , sequence );
343
343
}
344
344
} else if (Type .subTypeOf (item .getType (), Type .MAP )) {
345
345
final AbstractMapType map = (AbstractMapType ) item ;
0 commit comments