Package net.sf.saxon.om

Examples of net.sf.saxon.om.ValueRepresentation


    public SequenceIterator iterate(XPathContext context) throws XPathException {
        final XPathContextMajor cm = (XPathContextMajor)context;
        while (true) {
            SequenceIterator iter = operand.iterate(cm);
            ValueRepresentation extent = SequenceExtent.makeSequenceExtent(iter);
            UserFunction fn = cm.getTailCallFunction();
            if (fn == null) {
               return Value.asIterator(extent);
            }
            if (fn != containingFunction) {
View Full Code Here


    public ValueRepresentation evaluateVariable(XPathContext context) throws XPathException {
        final Controller controller = context.getController();
        final Bindery b = controller.getBindery();

        final ValueRepresentation v = b.getGlobalVariable(getSlotNumber());

        if (v != null) {
            return v;
        } else {

            // This is the first reference to a global variable; try to evaluate it now.
            // But first set a flag to stop looping. This flag is set in the Bindery because
            // the VariableReference itself can be used by multiple threads simultaneously

            try {
                b.setExecuting(this, true);
                ValueRepresentation value = getSelectValue(context);
                b.defineGlobalVariable(this, value);
                b.setExecuting(this, false);
                return value;

            } catch (XPathException err) {
View Full Code Here

     * @throws XPathException if the variable is undefined
     */

    public SequenceIterator iterate(XPathContext c) throws XPathException {
        try {
            ValueRepresentation actual = evaluateVariable(c);
            return Value.getIterator(actual);
        } catch (XPathException err) {
            err.maybeSetLocation(this);
            throw err;
        } catch (AssertionError err) {
View Full Code Here

        }
    }

    public Item evaluateItem(XPathContext c) throws XPathException {
        try {
            ValueRepresentation actual = evaluateVariable(c);
            if (actual instanceof Item) {
                return (Item) actual;
            }
            return Value.asItem(actual);
        } catch (XPathException err) {
View Full Code Here

        }
    }

    public void process(XPathContext c) throws XPathException {
        try {
            ValueRepresentation actual = evaluateVariable(c);
            if (actual instanceof NodeInfo) {
                actual = new SingletonNode((NodeInfo) actual);
            }
            ((Value) actual).process(c);
        } catch (XPathException err) {
View Full Code Here

TOP

Related Classes of net.sf.saxon.om.ValueRepresentation

Copyright © 2018 www.massapicom. 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.