Exemplo n.º 1
0
 @Override
 public final boolean eq(
     final Item it, final Collation coll, final StaticContext sc, final InputInfo ii)
     throws QueryException {
   return it.type.isUntyped()
       ? coll == null
           ? Token.eq(string(), it.string(ii))
           : coll.compare(string(), it.string(ii)) == 0
       : it.eq(this, coll, sc, ii);
 }
Exemplo n.º 2
0
 @Override
 Expr opt(final QueryContext ctx, final VarScope scp) throws QueryException {
   if (sig == Function._UNIT_TEST_URIS || sig == Function._UNIT_TEST && expr.length == 0) {
     for (final StaticFunc fn : ctx.funcs.funcs()) {
       if (fn.compiled()) continue;
       final Ann ann = fn.ann;
       for (int i = ann.size(); --i >= 0; ) {
         if (Token.eq(ann.names[i].uri(), QueryText.UNITURI)) {
           fn.compile(ctx);
           break;
         }
       }
     }
   }
   return super.opt(ctx, scp);
 }