Package net.sf.saxon.value

Examples of net.sf.saxon.value.SequenceExtent


                   min = x;
                   lowest.clear();
                   lowest.add(it);
               }
           }
            return new SequenceExtent(lowest);
        } catch (NumberFormatException e) {
            return EmptySequence.getInstance();
        }
    }
View Full Code Here


    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);
        }
        iterator = sequence.iterate(null);
View Full Code Here

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

    */

     public Expression simplify(StaticContext env) throws XPathException {
        operand = operand.simplify(env);
        if (operand instanceof Value) {
            return new SequenceExtent(iterate(null));
        }
        return this;
    }
View Full Code Here

        // 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

                    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

     * @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

                    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

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

    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

TOP

Related Classes of net.sf.saxon.value.SequenceExtent

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.