Examples of SequenceExtent


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

Examples of net.sf.saxon.value.SequenceExtent

        } else {
            origin = evaluator.getConfiguration().buildDocument(source);
        }
        XPathDynamicContext dynamicContext = createDynamicContext(origin);
        SequenceIterator iter = iterate(dynamicContext);
        SequenceExtent extent = new SequenceExtent(iter);
        //List result = (List)extent.convertToJava(List.class, dynamicContext.getXPathContextObject());
        List result = (List)PJConverter.ToCollection.INSTANCE.convert(
                extent, List.class, dynamicContext.getXPathContextObject());
        if (result == null) {
            result = Collections.EMPTY_LIST;
View Full Code Here

Examples of net.sf.saxon.value.SequenceExtent

    public SequenceIterator iterate(XPathContext context) throws XPathException {
        SequenceIterator forwards = argument[0].iterate(context);
        if (forwards instanceof ReversibleIterator) {
            return ((ReversibleIterator)forwards).getReverseIterator();
        } else {
            SequenceExtent extent = new SequenceExtent(forwards);
            return extent.reverseIterate();
        }
    }
View Full Code Here

Examples of net.sf.saxon.value.SequenceExtent

     * @return the typed value.
     * @since 8.5
     */

    public Value atomize(NodeInfo node) throws XPathException {
        return new SequenceExtent(getTypedValue(node)).simplify();
    }
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

            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 DocumentOrderIterator(SequenceIterator base, NodeOrderComparer comparer) throws XPathException {

        this.comparer = comparer;

        sequence = new SequenceExtent(base);
        //System.err.println("sort into document order: sequence length = " + sequence.getLength());
        if (sequence.getLength()>1) {
            //QuickSort.sort(this, 0, sequence.getLength()-1);
            GenericSorter.quickSort(0, sequence.getLength(), this);
            //GenericSorter.mergeSort(0, sequence.getLength(), this);
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

            values.add(item.getUnderlyingValue());
        }
        for (XdmItem item : otherValue) {
            values.add(item.getUnderlyingValue());
        }
        return new XdmValue(new SequenceExtent(values));
    }
View Full Code Here

Examples of net.sf.saxon.value.SequenceExtent

     */

    public NodeList getChildNodes() {
        try {
            return new DOMNodeList(
                    new SequenceExtent(iterateAxis(Axis.CHILD)));
        } catch (XPathException err) {
            return null;
            // can't happen
        }
    }
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.