Examples of effectiveBooleanValue()


Examples of client.net.sf.saxon.ce.value.Value.effectiveBooleanValue()

        if (test instanceof Literal) {
            Value testVal = ((Literal)test).getValue();
            // condition known statically, so we only need compile the code if true.
            // This can happen with expressions such as test="function-available('abc')".
            try {
                if (testVal.effectiveBooleanValue()) {
                    return compileSequenceConstructor(exec, decl, iterateAxis(Axis.CHILD));
//                    Block block = new Block();
//                    block.setLocationId(allocateLocationId(getSystemId(), getLineNumber()));
//                    compileChildren(exec, block, true);
//                    return block.simplify(getStaticContext());
View Full Code Here

Examples of net.sf.saxon.value.Value.effectiveBooleanValue()

        if (test instanceof Literal) {
            Value testVal = ((Literal)test).getValue();
            // condition known statically, so we only need compile the code if true.
            // This can happen with expressions such as test="function-available('abc')".
            try {
                if (testVal.effectiveBooleanValue()) {
                    return compileSequenceConstructor(exec, iterateAxis(Axis.CHILD), true);
//                    Block block = new Block();
//                    block.setLocationId(allocateLocationId(getSystemId(), getLineNumber()));
//                    compileChildren(exec, block, true);
//                    return block.simplify(getStaticContext());
View Full Code Here

Examples of net.sf.saxon.value.Value.effectiveBooleanValue()

        if (test instanceof Literal) {
            Value testVal = ((Literal)test).getValue();
            // condition known statically, so we only need compile the code if true.
            // This can happen with expressions such as test="function-available('abc')".
            try {
                if (testVal.effectiveBooleanValue()) {
                    return compileSequenceConstructor(exec, iterateAxis(Axis.CHILD), true);
//                    Block block = new Block();
//                    block.setLocationId(allocateLocationId(getSystemId(), getLineNumber()));
//                    compileChildren(exec, block, true);
//                    return block.simplify(getStaticContext());
View Full Code Here

Examples of org.exist.xquery.value.Sequence.effectiveBooleanValue()

                        {((NodeProxy)contextItem).addContextNode(getExpressionId(), (NodeProxy)contextItem);}
                    final Sequence bool = applyWhereExpression(null);
                    if (contextItem instanceof NodeProxy)
                        {((NodeProxy)contextItem).clearContext(getExpressionId());}
                    // if where returned false, continue
                    if (!bool.effectiveBooleanValue())
                        {continue;}
                } else {
                    val = contextItem.toSequence();
                }
                //Reset the context position
View Full Code Here

Examples of org.exist.xquery.value.Sequence.effectiveBooleanValue()

                " (or more specific), got " + Type.getTypeName(item.getType()), inSeq);}
            //trigger the old behaviour
            else {var.checkType();}
            } 
           
      found = satisfiesSeq.effectiveBooleanValue();
      if ((mode == SOME ) && found)
        {break;}
      if ((mode == EVERY) && !found)
        {break;}
    }
View Full Code Here

Examples of org.exist.xquery.value.Sequence.effectiveBooleanValue()

   * @param arg
   * @throws XPathException
   */
  private Sequence evalBoolean(Sequence contextSequence, Item contextItem, Expression arg) throws XPathException {
        final Sequence seq = arg.eval(contextSequence, contextItem);
    return seq.effectiveBooleanValue() ? BooleanValue.FALSE : BooleanValue.TRUE;
  }
}
View Full Code Here

Examples of org.exist.xquery.value.Sequence.effectiveBooleanValue()

    try {
      seq = xquery.execute(compiled, null);
    } finally {
      pool.returnCompiledXQuery(source, compiled);
    }
    if(seq.effectiveBooleanValue()) {
      long mods = 0;
      for (final Modification modification : modifications) {
        mods += modification.process(transaction);
        broker.flush();
      }
View Full Code Here

Examples of org.exist.xquery.value.Sequence.effectiveBooleanValue()

     */
    public Sequence eval(Sequence contextSequence, Item contextItem) throws XPathException {
        context.expressionStart(this);
        final Sequence testSeq = testExpr.eval(contextSequence, contextItem);
        try {
            if (testSeq.effectiveBooleanValue()) {
                return thenExpr.eval(contextSequence, contextItem);
            } else {
                return elseExpr.eval(contextSequence, contextItem);
            }
        } catch (final XPathException e) {
View Full Code Here

Examples of org.exist.xquery.value.Sequence.effectiveBooleanValue()

                    if (filtered.isEmpty()) {
                        if (context.getProfiler().isEnabled())
                            {context.getProfiler().end(this, "", Sequence.EMPTY_SEQUENCE);}
                        return Sequence.EMPTY_SEQUENCE;
                    } else if (filtered.getItemType() == Type.BOOLEAN &&
                               !filtered.effectiveBooleanValue()) {
                        if (context.getProfiler().isEnabled())
                            {context.getProfiler().end(this, "", Sequence.EMPTY_SEQUENCE);}
                        return Sequence.EMPTY_SEQUENCE;
                    }
                }
View Full Code Here

Examples of org.exist.xquery.value.Sequence.effectiveBooleanValue()

            ref.analyze(cachedContextInfo);
          for (final SequenceIterator i = seq.iterate(); i.hasNext(); ) {
            final Item item = i.nextItem();
            final Sequence r = ref.evalFunction(contextSequence, null, new Sequence[] { item.toSequence() });
            if (r.effectiveBooleanValue())
              {result.add(item);}
          }
        } else if (isCalledAs("fold-left")) {
            final FunctionReference ref = (FunctionReference) args[2].itemAt(0);
            ref.analyze(cachedContextInfo);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.