Example #1
0
 @Override
 public Item item(final QueryContext qc, final InputInfo ii) throws QueryException {
   final byte[] s;
   if (exprs.length == 0) {
     final Item it = ctxValue(qc).item(qc, info);
     if (it instanceof FItem) throw FISTRING_X.get(ii, it.type);
     s = it == null ? Token.EMPTY : it.string(ii);
   } else {
     s = toEmptyToken(arg(0, qc), qc);
   }
   return Int.get(Token.length(s));
 }
Example #2
0
 @Override
 public Item item(final QueryContext qc, final InputInfo ii) throws QueryException {
   ctxValue(qc);
   return Int.get(qc.focus.pos);
 }
Example #3
0
 @Override
 Item key(final QueryContext ctx, final int i) {
   return Int.get(i);
 }