Examples of SequenceExtent


Examples of net.sf.saxon.value.SequenceExtent

        // For lists consisting entirely of constant atomic values, build a SequenceExtent at compile time

        if (isAtomicSequence()) {
            try {
                return new SequenceExtent(iterate(null));
            } catch (XPathException err) {
                throw new StaticError(err);
                // Can't happen
            }
        }
View Full Code Here

Examples of net.sf.saxon.value.SequenceExtent

                    nodes[i] = ((NodeOverNodeInfo)list.item(i)).getUnderlyingNodeInfo();
                } else {
                    return null;
                }
            }
            return new SequenceExtent(nodes);

            // Note, we accept the nodes in the order returned by the function; there
            // is no requirement that this should be document order.
        } else if (object instanceof NodeOverNodeInfo) {
            return Value.asValue(((NodeOverNodeInfo)object).getUnderlyingNodeInfo());
View Full Code Here

Examples of net.sf.saxon.value.SequenceExtent

     * @return the corresponding SequenceValue
     */

    public GroundedValue materialize() {
        if (start==0 && end == items.length) {
            return new SequenceExtent(items);
        } else {
            SequenceExtent e = new SequenceExtent(items);
            return new SequenceExtent(e, start, end-start);
        }
    }
View Full Code Here

Examples of net.sf.saxon.value.SequenceExtent

                    DocumentInfo doc = wrapDocument(list.item(i), "", config);
                    NodeInfo node = wrapNode(doc, list.item(i));
                    nodes[i] = node;
                }
            }
            return new SequenceExtent(nodes);

            // Note, we accept the nodes in the order returned by the function; there
            // is no requirement that this should be document order.
        } else {
            return null;
View Full Code Here

Examples of net.sf.saxon.value.SequenceExtent

            case 0:
                return EmptySequence.getInstance();
            case 1:
                return (Item)list.get(0);
            default:
                return new SequenceExtent(list);
        }
    }
View Full Code Here

Examples of net.sf.saxon.value.SequenceExtent

    public XdmValue(Iterable<XdmItem> items) {
        List values = new ArrayList();
        for (XdmItem item : items) {
            values.add(item.getUnderlyingValue());
        }
        value = new SequenceExtent(values);
    }
View Full Code Here

Examples of net.sf.saxon.value.SequenceExtent

     public Expression simplify(ExpressionVisitor visitor) throws XPathException {
        operand = visitor.simplify(operand);
        if (operand instanceof Literal) {
            return Literal.makeLiteral(
                    new SequenceExtent(iterate(visitor.getStaticContext().makeEarlyEvaluationContext())));
        }
        return this;
    }
View Full Code Here

Examples of net.sf.saxon.value.SequenceExtent

            if (allAtomic) {
                AtomicValue[] values = new AtomicValue[children.length];
                for (int c=0; c<children.length; c++) {
                    values[c] = (AtomicValue)((Literal)children[c]).getValue();
                }
                return Literal.makeLiteral(new SequenceExtent(values));
            }
        } else {
            return Literal.makeEmptySequence();
        }
View Full Code Here

Examples of net.sf.saxon.value.SequenceExtent

            if (allAtomic) {
                Item[] items = new Item[children.length];
                for (int c=0; c<children.length; c++) {
                    items[c] = (AtomicValue)((Literal)children[c]).getValue();
                }
                return new Literal(new SequenceExtent(items));
            }
        }
        return this;
    }
View Full Code Here

Examples of net.sf.saxon.value.SequenceExtent

        } else if (object instanceof Node[]) {
            NodeInfo[] nodes = new NodeInfo[((Node[])object).length];
            for (int i=0; i<nodes.length; i++) {
                nodes[i] = wrapNode(((Node[])object)[i], config);
            }
            return new SequenceExtent(nodes);
        } else {
            return null;
        }
    }
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.