Beispiel #1
0
 @Override
 public Item item(final QueryContext qc, final InputInfo ii) throws QueryException {
   final Iter ir = iter(qc);
   final Item it = ir.next();
   if (it == null || ir.size() == 1) return it;
   final Item n = ir.next();
   if (n != null) {
     final ValueBuilder vb = new ValueBuilder().add(it).add(n);
     if (ir.next() != null) vb.add(Str.get(DOTS));
     throw SEQFOUND_X.get(info, vb.value());
   }
   return it;
 }
Beispiel #2
0
 @Override
 public final Item ebv(final QueryContext qc, final InputInfo ii) throws QueryException {
   final Item it;
   if (seqType().zeroOrOne()) {
     it = item(qc, info);
   } else {
     final Iter ir = iter(qc);
     it = ir.next();
     if (it != null && !(it instanceof ANode)) {
       final Item n = ir.next();
       if (n != null) {
         final ValueBuilder vb = new ValueBuilder().add(it).add(n);
         if (ir.next() != null) vb.add(Str.get(DOTS));
         throw EBV_X.get(info, vb.value());
       }
     }
   }
   return it == null ? Bln.FALSE : it;
 }