rem: if (! beginElement) throw "Cannot find element with id '" + beginElementId + "'"; 
add: if (!beginElement) return null; 
context: function xformsFindRepeatDelimiter(repeatId, index) {    // Find id of repeat begin for the current repeatId    var parentRepeatIndexes = "";    {        var currentId = repeatId;        while (true) {            var parent = document.xformsRepeatTreeChildToParent[currentId];            if (parent == null) break;            var grandParent = document.xformsRepeatTreeChildToParent[parent];            parentRepeatIndexes = (grandParent == null ? REPEAT_HIERARCHY_SEPARATOR_1 : REPEAT_HIERARCHY_SEPARATOR_2)                    + document.xformsRepeatIndexes[parent] + parentRepeatIndexes;            currentId = parent;        }    }    var beginElementId = "repeat-begin-" + repeatId + parentRepeatIndexes;    var beginElement = document.getElementById(beginElementId);    if (! beginElement) throw "Cannot find element with id '" + beginElementId + "'";    var cursor = beginElement;    var cursorPosition = 0;    while (true) {        while (cursor.nodeType != ELEMENT_TYPE || !xformsArrayContains(cursor.className.split(" "), "xforms-repeat-delimiter")) {            cursor = cursor.nextSibling;            if (!cursor)                throw "Cannot find element #" + index + " with class 'xforms-repeat-delimiter' after element with id '"                        + beginElementId + "'";        }        cursorPosition++;        if (cursorPosition == index) break;        cursor = cursor.nextSibling;    }    return cursor;}
meta: 7519	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/7519/facf2baf27c785c945ab8d3c578595db077c94bd/xforms.js/clean/src/examples/web/ops/javascript/xforms.js