if (start < 0) start = 0; else --start;
    public Sequence eval(Sequence contextSequence, Item contextItem) throws XPathException {        if (context.getProfiler().isEnabled()) {            context.getProfiler().start(this);            context.getProfiler().message(this, Profiler.DEPENDENCIES,                    "DEPENDENCIES",                    Dependency.getDependenciesName(this.getDependencies()));            if (contextSequence != null)                context.getProfiler().message(this, Profiler.START_SEQUENCES,                        "CONTEXT SEQUENCE", contextSequence);            if (contextItem != null)                context.getProfiler().message(this, Profiler.START_SEQUENCES,                        "CONTEXT ITEM", contextItem.toSequence());        }        Sequence result;        Sequence seq = getArgument(0).eval(contextSequence, contextItem);        if (seq.isEmpty())            result = Sequence.EMPTY_SEQUENCE;        else {            int start = ((DoubleValue) getArgument(1).eval(contextSequence,                    contextItem).convertTo(Type.DOUBLE)).getInt();            // TODO : exception? -pb            if (start < 0)                start = 0;            else                --start;            int length = Integer.MAX_VALUE;            if (getSignature().getArgumentCount() == 3)                length = ((DoubleValue) getArgument(2).eval(                        contextSequence, contextItem)                        .convertTo(Type.DOUBLE)).getInt();                                    Sequence tmp;            if (seq instanceof NodeSet)                tmp = new ExtArrayNodeSet();            else                tmp = new ValueSequence();                        Item item;            SequenceIterator iterator = seq.iterate();            for(int i = 0; i < start; i++) {                item = iterator.nextItem();            }             int i=0;            while (iterator.hasNext() && i < length) {                item = iterator.nextItem();                tmp.add(item);                i++;            }                        result = i>0?tmp:Sequence.EMPTY_SEQUENCE;        }        if (context.getProfiler().isEnabled())            context.getProfiler().end(this, "", result);        return result;    }