for (each.current = each.from; each.current < each.to; ++each.current) {
for (each.current = each.from; each.current <= each.to; ++each.current) {
	protected void endForEach() throws SAXException {		isRecording = false;		if (commandStack.isEmpty())			return;		ForEach each = (ForEach) commandStack.peek();		DocumentFragment fragment = endRecording();		if (each.queryResult == null)			return;		DOMStreamer streamer = new DOMStreamer(this);		for (each.current = each.from; each.current < each.to; ++each.current) {			try {				each.currentResource = (XMLResource)					each.queryResult.getResource(each.current);				currentResource = each.currentResource;				streamer.stream(fragment);			} catch (XMLDBException e) {				reportError(WARNING, "error while retrieving resource " +					each.current, e);			}		}		commandStack.pop();		if (commandStack.isEmpty())			super.endElement(NAMESPACE, RESULT_SET_ELEMENT, PREFIX + RESULT_SET_ELEMENT);	}