rem:  if(expression.lastIndexOf('/') != -1) { 
add:  if(expression.lastIndexOf('/') != -1) { 
context: Freja.QueryEngine.prototype.set = function(document, expression, value) {	try {		var node = this._find(document, expression);		if(node)			node.nodeValue = value;	} catch(x) {		// text node not found. Might need to be created.		// try not to process field names that are not meant to be xpath expressions  		if(expression.lastIndexOf('/') != -1) {					var nodeName = expression.substr(expression.lastIndexOf('/')+1);			if(nodeName.charAt(0)=='@') {				// trying to set a non-existing attribute. Let's create it.				var parentExpression =  expression.substring(0, expression.lastIndexOf('/'));				var pNode = this._find(document, parentExpression);				if(pNode) {					// this._find returns a text node					pNode = pNode.parentNode;					pNode.setAttribute(nodeName.substr(1),value);				}			}			// else parent element does not exist.. can't do anything		}	}};
meta: 8607	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8607/8b42fb2ed090da7f1e336726dcb69d2649658e7c/QueryEngine.js/clean/trunk/src/QueryEngine.js