if (param[2]) temp += '[@id="' + param[2] + '"]'; if (param[3]) temp += '[contains(concat(" ", @class, " "), " ' + param[3] + ' ")]'; if (param[4]){ var attr = param[4].match(DOM.aRegExp); if (!attr) throw new Error('bad attribute selector'); if (attr[2] && attr[3]){ switch(attr[2]){ case '=': temp += '[@' + attr[1] + '="' + attr[3] + '"]'; break; case '*=': temp += '[contains(@' + attr[1] + ', "' + attr[3] + '")]'; break; case '^=': temp += '[starts-with(@' + attr[1] + ', "' + attr[3] + '")]'; break; case '$=': temp += '[substring(@' + attr[1] + ', string-length(@' + attr[1] + ') - ' + attr[3].length + ' + 1) = "' + attr[3] + '"]'; break; case '!=': temp += '[@' + attr[1] + '!="' + attr[3] + '"]'; break; case '~=': temp += '[contains(concat(" ", @' + attr[1] + ', " "), " ' + attr[3] + ' ")]'; 
if (id) temp += '[@id="' + id + '"]'; if (klass) temp += '[contains(concat(" ", @class, " "), " ' + klass + ' ")]'; if (attribute){ attribute = attribute.match(DOM.aRegExp); if (!attribute) throw new Error('bad attribute selector'); if (attribute[2] && attribute[3]){ switch(attribute[2]){ case '=': temp += '[@' + attribute[1] + '="' + attribute[3] + '"]'; break; case '*=': temp += '[contains(@' + attribute[1] + ', "' + attribute[3] + '")]'; break; case '^=': temp += '[starts-with(@' + attribute[1] + ', "' + attribute[3] + '")]'; break; case '$=': temp += '[substring(@' + attribute[1] + ', string-length(@' + attribute[1] + ') - ' + attribute[3].length + ' + 1) = "' + attribute[3] + '"]'; break; case '!=': temp += '[@' + attribute[1] + '!="' + attribute[3] + '"]'; break; case '~=': temp += '[contains(concat(" ", @' + attribute[1] + ', " "), " ' + attribute[3] + ' ")]'; 
	getParam: function(items, separator, context, param){		var temp = context.namespaceURI ? 'xhtml:' : '';		switch(separator){			case ' ~ ': case ' + ': temp += '/following-sibling::'; break;			case ' > ': temp += '/'; break;			case ' ': temp += '//';		}		temp += param[1];		if (separator == ' + ') temp += '[1]';		if (param[5]){			var pseudo = DOM.parsePseudo(param[5]);			switch(pseudo.name){				case 'nth':					var nth = '';					switch(pseudo.params[2]){						case 'n': nth = 'mod ' + pseudo.params[1] + ' = ' + pseudo.params[3]; break;						case 'odd': nth = 'mod 2 = 1'; break;						case 'even': nth =  'mod 2 = 0'; break;						case false: nth = '= ' + pseudo.params[1];					}					temp += '[count(./preceding-sibling::*) ' + nth + ']';				break;			}		}		if (param[2]) temp += '[@id="' + param[2] + '"]';		if (param[3]) temp += '[contains(concat(" ", @class, " "), " ' + param[3] + ' ")]';		if (param[4]){			var attr = param[4].match(DOM.aRegExp);			if (!attr) throw new Error('bad attribute selector');			if (attr[2] && attr[3]){				switch(attr[2]){					case '=': temp += '[@' + attr[1] + '="' + attr[3] + '"]'; break;					case '*=': temp += '[contains(@' + attr[1] + ', "' + attr[3] + '")]'; break;					case '^=': temp += '[starts-with(@' + attr[1] + ', "' + attr[3] + '")]'; break;					case '$=': temp += '[substring(@' + attr[1] + ', string-length(@' + attr[1] + ') - ' + attr[3].length + ' + 1) = "' + attr[3] + '"]'; break;					case '!=': temp += '[@' + attr[1] + '!="' + attr[3] + '"]'; break;					case '~=': temp += '[contains(concat(" ", @' + attr[1] + ', " "), " ' + attr[3] + ' ")]';				}			} else {				temp += '[@' + attr[1] + ']';			}		}		items.push(temp);		return items;	},
5733	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5733/65a9f70d359930b4cfdd505d1447cd6f11210b7e/Element.Selectors.js/clean/Element/Element.Selectors.js