if(process){ var attributeSet = this.parseAttributes(node); for(var attr in attributeSet){ if((!parsedNodeSet[tagName][attr])||(typeof parsedNodeSet[tagName][attr] != "array")){ parsedNodeSet[tagName][attr] = []; } parsedNodeSet[tagName][attr].push(attributeSet[attr]); }    parsedNodeSet[tagName].nodeRef = node; parsedNodeSet.tagName = tagName; parsedNodeSet.index = thisIdx||0; } 
var parsedNodeSet = {}; parsedNodeSet[tagName] = []; var pos = tagName.indexOf(":"); if(pos>0){ var ns = tagName.substring(0,pos); parsedNodeSet["ns"] = ns;  if((dojo.ns)&&(!dojo.ns.allow(ns))){process=false;} } 
	this.parseElement = function(	/*DomNode*/node,									/*Boolean*/hasParentNodeSet, 									/*Boolean*/optimizeForDojoML, 									/*Integer*/thisIdx	){		// summary:		//		recursively parse the passed node, returning a normalized data		//		structure that represents the "attributes of interest" of said		//		elements. If optimizeForDojoML is true, only nodes that contain		//		a "dojo tag name" will be inspected for attributes.		// node: the DomNode to be treated as the root of inspection		// hasParentNodeSet: no-op, please pass "null"		// optimizeForDojoML: should we ignore non-Dojo nodes? Defaults to false.		// thisIdx:		//		a way to specify a synthetic "index" property in the resulting		//		data structure. Otherwise the index property of the top-level		//		return element is always "0".		// TODOC: document return structure of a non-trivial element set		// run shortcuts to bail out of processing up front to save time and		// object alloc if possible.		var tagName = getTagName(node);		//There's a weird bug in IE where it counts end tags, e.g. </dojo:button> as nodes that should be parsed.  Ignore these		if(isIE && tagName.indexOf("/")==0){ return null; }		try{			var attr = node.getAttribute("parseWidgets");			if(attr && attr.toLowerCase() == "false"){				return {};			}		}catch(e){/*continue*/}				// look for a dojoml qualified name		// process dojoml only when optimizeForDojoML is true		var process = true;		if(optimizeForDojoML){			var dojoTagName = getDojoTagName(node);			tagName = dojoTagName || tagName;			process = Boolean(dojoTagName);		}		var parsedNodeSet = {};		parsedNodeSet[tagName] = [];		var pos = tagName.indexOf(":");		if(pos>0){			var ns = tagName.substring(0,pos);			parsedNodeSet["ns"] = ns;			// honor user namespace filters			if((dojo.ns)&&(!dojo.ns.allow(ns))){process=false;}		}		if(process){			var attributeSet = this.parseAttributes(node);			for(var attr in attributeSet){				if((!parsedNodeSet[tagName][attr])||(typeof parsedNodeSet[tagName][attr] != "array")){					parsedNodeSet[tagName][attr] = [];				}				parsedNodeSet[tagName][attr].push(attributeSet[attr]);			}				// FIXME: we might want to make this optional or provide cloning instead of			// referencing, but for now, we include a node reference to allow			// instantiated components to figure out their "roots"			parsedNodeSet[tagName].nodeRef = node;			parsedNodeSet.tagName = tagName;			parsedNodeSet.index = thisIdx||0;		}		var count = 0;		for(var i = 0; i < node.childNodes.length; i++){			var tcn = node.childNodes.item(i);			switch(tcn.nodeType){				case  dojo.dom.ELEMENT_NODE: // element nodes, call this function recursively					var ctn = getDojoTagName(tcn) || getTagName(tcn);					if(!parsedNodeSet[ctn]){						parsedNodeSet[ctn] = [];					}					parsedNodeSet[ctn].push(this.parseElement(tcn, true, optimizeForDojoML, count));					if(	(tcn.childNodes.length == 1)&&						(tcn.childNodes.item(0).nodeType == dojo.dom.TEXT_NODE)){						parsedNodeSet[ctn][parsedNodeSet[ctn].length-1].value = tcn.childNodes.item(0).nodeValue;					}					count++;					break;				case  dojo.dom.TEXT_NODE: // if a single text node is the child, treat it as an attribute					if(node.childNodes.length == 1){						parsedNodeSet[tagName].push({ value: node.childNodes.item(0).nodeValue });					}					break;				default: break;				/*				case  dojo.dom.ATTRIBUTE_NODE: // attribute node... not meaningful here					break;				case  dojo.dom.CDATA_SECTION_NODE: // cdata section... not sure if this would ever be meaningful... might be...					break;				case  dojo.dom.ENTITY_REFERENCE_NODE: // entity reference node... not meaningful here					break;				case  dojo.dom.ENTITY_NODE: // entity node... not sure if this would ever be meaningful					break;				case  dojo.dom.PROCESSING_INSTRUCTION_NODE: // processing instruction node... not meaningful here					break;				case  dojo.dom.COMMENT_NODE: // comment node... not not sure if this would ever be meaningful 					break;				case  dojo.dom.DOCUMENT_NODE: // document node... not sure if this would ever be meaningful					break;				case  dojo.dom.DOCUMENT_TYPE_NODE: // document type node... not meaningful here					break;				case  dojo.dom.DOCUMENT_FRAGMENT_NODE: // document fragment node... not meaningful here					break;				case  dojo.dom.NOTATION_NODE:// notation node... not meaningful here					break;				*/			}		}		//return (hasParentNodeSet) ? parsedNodeSet[node.tagName] : parsedNodeSet;		//if(parsedNodeSet.tagName)dojo.debug("parseElement: RETURNING NODE WITH TAGNAME "+parsedNodeSet.tagName);		return parsedNodeSet;	};
6315	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/6315/2f1d2cb699c9d9329e8b782b0463156e211cb0f6/struts_dojo.js.uncompressed.js/buggy/src/main/resources/org/apache/struts2/static/dojo/struts_dojo.js.uncompressed.js