rem: var addSuffixToIds = function(element, idSuffix) { if (element.id) element.id += idSuffix; if (element.htmlFor) element.htmlFor += idSuffix;  if (xformsIsDefined(element.labelElement)) element.labelElement = null; if (xformsIsDefined(element.hintElement)) element.hintElement = null; if (xformsIsDefined(element.helpElement)) element.helpElement = null; if (xformsIsDefined(element.alertElement)) element.alertElement = null; element.styleListenerRegistered = false; for (var childIndex = 0; childIndex < element.childNodes.length; childIndex++) { var childNode = element.childNodes[childIndex]; if (childNode.nodeType == ELEMENT_TYPE) addSuffixToIds(childNode, idSuffix); 
add: function addSuffixToIds(element, idSuffix, repeatDepth) { var idSuffixWithDepth = idSuffix; for (var repeatDepthIndex = 0; repeatDepthIndex < repeatDepth; repeatDepthIndex++) idSuffixWithDepth += "-1"; if (element.id) element.id += idSuffixWithDepth; if (element.htmlFor) element.htmlFor += idSuffixWithDepth;  if (xformsIsDefined(element.labelElement)) element.labelElement = null; if (xformsIsDefined(element.hintElement)) element.hintElement = null; if (xformsIsDefined(element.helpElement)) element.helpElement = null; if (xformsIsDefined(element.alertElement)) element.alertElement = null; element.styleListenerRegistered = false; for (var childIndex = 0; childIndex < element.childNodes.length; childIndex++) { var childNode = element.childNodes[childIndex]; if (childNode.nodeType == ELEMENT_TYPE) { if (childNode.id && childNode.id.indexOf("repeat-end-") == 0) repeatDepth--; addSuffixToIds(childNode, idSuffix, repeatDepth); if (childNode.id && childNode.id.indexOf("repeat-begin-") == 0) repeatDepth++ } } 
context:                                                     var addSuffixToIds = function(element, idSuffix) {                                                        if (element.id) element.id += idSuffix;                                                        if (element.htmlFor) element.htmlFor += idSuffix;                                                        // Remove references to hint, help, alert, label as they might have changed                                                        if (xformsIsDefined(element.labelElement)) element.labelElement = null;                                                        if (xformsIsDefined(element.hintElement)) element.hintElement = null;                                                        if (xformsIsDefined(element.helpElement)) element.helpElement = null;                                                        if (xformsIsDefined(element.alertElement)) element.alertElement = null;                                                        element.styleListenerRegistered = false;                                                        for (var childIndex = 0; childIndex < element.childNodes.length; childIndex++) {                                                            var childNode = element.childNodes[childIndex];                                                            if (childNode.nodeType == ELEMENT_TYPE)                                                                addSuffixToIds(childNode, idSuffix);                                                        }                                                    };
meta: 7801	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/7801/4cb45056616c6c7564f30cb54ee08de5498d5add/xforms.js/buggy/src/examples/web/config/theme/javascript/xforms.js