rem: var id = getId(tqp); if(id.length){ xpath += "[@id='"+id+"'][1]"; 
add: if(tqp.id){ xpath += "[@id='"+tqp.id+"'][1]"; 
context: 	var buildPath = function(query){		var xpath = ".";		var qparts = query.split(" "); // FIXME: this break on span[thinger = foo]		while(qparts.length){			var tqp = qparts.shift();			var prefix;			// FIXME: need to add support for ~ and +			if(tqp == ">"){				prefix = "/";				// prefix = "/child::node()";				tqp = qparts.shift();			}else{				prefix = "//";				// prefix = "/descendant::node()"			}			// get the tag name (if any)			var tagName = getTagName(tqp);			xpath += prefix + tagName;						// check to see if it's got an id. Needs to come first in xpath.			var id = getId(tqp);			if(id.length){				xpath += "[@id='"+id+"'][1]";			}			var cn = getClassName(tqp);			// check the class name component			if(cn.length){				var padding = " ";				if(cn.charAt(cn.length-1) == "*"){					padding = ""; cn = cn.substr(0, cn.length-1);				}				xpath += 					"[contains(concat(' ',@class,' '), ' "+					cn + padding + "')]";			}			handleAttrs(xPathAttrs, tqp, 				function(condition){						return "[@"+condition+"]";				},				function(matcher){					xpath += matcher;				}			);			// FIXME: need to implement pseudo-class checks!!		};		return xpath;	};
meta: 4497	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/4497/9d2d8b07235702c69fc064ab917871332f42d825/query.js/clean/_base/query.js