@@ -73,8 +73,8 @@ public class MapFunction extends BasicFunction {
7373 "Searches the supplied input sequence and any contained maps and arrays for a map entry with the supplied key, " +
7474 "and returns the corresponding values." ,
7575 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" )
7878 );
7979
8080 public final static FunctionSignature FNS_SIZE = new FunctionSignature (
@@ -319,9 +319,9 @@ private Sequence forEach(final Sequence[] args) throws XPathException {
319319 * @param key the key to match
320320 * @param sequence the sequence to search within
321321 */
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 ) {
323323 for (int i = 0 ; i < sequence .getItemCount (); i ++) {
324- MapFunction . findRec (result , key , sequence .itemAt (i ));
324+ findRec (result , key , sequence .itemAt (i ));
325325 }
326326 }
327327
@@ -335,11 +335,11 @@ static private void findRec(final ArrayType result, final AtomicValue key, final
335335 * @param key the key to match
336336 * @param item the item to search within
337337 */
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 ) {
339339 if (Type .subTypeOf (item .getType (), Type .ARRAY )) {
340340 final ArrayType array = (ArrayType ) item ;
341341 for (final Sequence sequence : array .toArray ()) {
342- MapFunction . findRec (result , key , sequence );
342+ findRec (result , key , sequence );
343343 }
344344 } else if (Type .subTypeOf (item .getType (), Type .MAP )) {
345345 final AbstractMapType map = (AbstractMapType ) item ;
0 commit comments