Examples of ValueRepresentation


Examples of client.net.sf.saxon.ce.om.ValueRepresentation

    public TailCall processLeavingTail(XPathContext context) throws XPathException {
        // minimize stack consumption by evaluating nested LET expressions iteratively
        LetExpression let = this;
        while (true) {
            ValueRepresentation val = let.eval(context);
            context.setLocalVariable(let.getLocalSlotNumber(), val);
            if (let.action instanceof LetExpression) {
                let = (LetExpression) let.action;
            } else {
                break;
View Full Code Here

Examples of client.net.sf.saxon.ce.om.ValueRepresentation

        }
        int index = params.getIndex(binding.getParameterId());
        if (index < 0) {
            return ParameterSet.NOT_SUPPLIED;
        }
        ValueRepresentation val = params.getValue(index);
        stackFrame.slots[binding.getSlotNumber()] = val;
        boolean checked = params.isTypeChecked(index);
        return (checked ? ParameterSet.SUPPLIED_AND_CHECKED : ParameterSet.SUPPLIED);
    }
View Full Code Here

Examples of client.net.sf.saxon.ce.om.ValueRepresentation

        }

        // Otherwise evaluate the function

        context.setStackFrame(getStackFrameMap(), actualArgs);
        ValueRepresentation result;
        try {
            result = ExpressionTool.evaluate(getBody(), evaluationMode, context, 1);
        } catch (XPathException err) {
            err.maybeSetLocation(getSourceLocator());
            throw err;
View Full Code Here

Examples of net.sf.saxon.om.ValueRepresentation

        }

        // Otherwise evaluate the function

        context.setStackFrame(getStackFrameMap(), actualArgs);
        ValueRepresentation result;
        try {
            result = ExpressionTool.evaluate(getBody(), evaluationMode, context, 1);
        } catch (XPathException err) {
            err.maybeSetLocation(this);
            throw err;
View Full Code Here

Examples of net.sf.saxon.om.ValueRepresentation

    public TailCall processLeavingTail(XPathContext context) throws XPathException {
        if (binding==null) {
            throw new IllegalStateException("saxon:assign binding has not been fixed up");
        }
        ValueRepresentation value = getSelectValue(context);
        if (value instanceof Closure) {
            value = SequenceExtent.makeSequenceExtent(((Closure)value).iterate());
        }
        if (binding instanceof GeneralVariable) {
            if (binding.isGlobal()) {
View Full Code Here

Examples of net.sf.saxon.om.ValueRepresentation

     *          if a dynamic error occurs during evaluation of the function.
     */

    public Item evaluateItem(XPathContext context) throws XPathException {
        FunctionItem f = (FunctionItem)getArguments()[0].evaluateItem(context);
        ValueRepresentation val = SequenceExtent.makeSequenceExtent(
                getArguments()[1].iterate(context));
        int arg = 1;
        if (getNumberOfArguments() == 3) {
            arg = (int)((IntegerValue)getArguments()[2].evaluateItem(context)).longValue();
        }
View Full Code Here

Examples of net.sf.saxon.om.ValueRepresentation

    }

    public Expression optimize(ExpressionVisitor visitor, ItemType contextItemType) throws XPathException {
        base = visitor.optimize(base, contextItemType);
        if (base instanceof Literal) {
            ValueRepresentation value =
                    SequenceExtent.makeSequenceExtent(iterate(visitor.getStaticContext().makeEarlyEvaluationContext()));
            return Literal.makeLiteral(Value.asValue(value));
        }
        return this;
    }
View Full Code Here

Examples of net.sf.saxon.om.ValueRepresentation

    * only when the cardinality is zero or one. If the function is tail recursive,
    * it returns an Object representing the arguments to the next (recursive) call
    */

    public Item evaluateItem(XPathContext c) throws XPathException {
        ValueRepresentation val = callFunction(c);
        return Value.asItem(val);
    }
View Full Code Here

Examples of net.sf.saxon.om.ValueRepresentation

    * Call the function, returning an iterator over the results. (But if the function is
    * tail recursive, it returns an iterator over the arguments of the recursive call)
    */

    public SequenceIterator iterate(XPathContext c) throws XPathException {
        ValueRepresentation result = callFunction(c);
        return Value.getIterator(result);
    }
View Full Code Here

Examples of net.sf.saxon.om.ValueRepresentation

      *     expression; or null to indicate that the result is an empty
      *     sequence
      */

    public Item evaluateItem(XPathContext context) throws XPathException {
        ValueRepresentation actual = context.evaluateLocalVariable(slotNumber);
        return Value.asItem(actual);
    }
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.